Size: 3660
Comment:
|
← Revision 14 as of 2019-10-04 11:08:15 ⇥
Size: 1877
Comment: update for git
|
Deletions are marked like this. | Additions are marked like this. |
Line 4: | Line 4: |
You also should be familiar with the [[https://dev.launchpad.net/PolicyAndProcess/DatabaseSchemaChangesProcess|process for schema changes]]. |
|
Line 5: | Line 7: |
Create an alternative trunk directory called `db-devel` next to your `trunk` directory in your repository (e.g. ~/launchpad/lp-branches). | Check out the `db-devel` branch in your [[Running|existing git clone]]: |
Line 7: | Line 9: |
bzr branch lp:~launchpad-pqm/launchpad/db-devel db-devel | git checkout db-devel git pull |
Line 10: | Line 13: |
Set the public location for this branch in ~/.bazaar/locations.conf | Now you can use this to create new branches of db-devel: |
Line 12: | Line 15: |
[<your-home-dir>/launchpad/lp-branches/db-devel] public_branch = bzr+ssh://bazaar.launchpad.net/~launchpad-pqm/launchpad/db-devel }}} Now you can use this to create new branches of db-devel in lp-branches: {{{ bzr branch db-devel my-db-devel-branch |
git checkout -b my-db-devel-branch db-devel |
Line 23: | Line 20: |
cd db-devel bzr pull |
git checkout db-devel git pull |
Line 29: | Line 26: |
cd my-db-devel-branch bzr merge ../db-devel bzr commit -m"Merge db-devel." |
git checkout my-db-devel-branch git merge db-devel git commit -m "Merge db-devel" |
Line 34: | Line 31: |
To run code in your branch, you need to link the external source code. Normally rocketfuel-branch would do that for you. | Or rebase it if you prefer: |
Line 36: | Line 33: |
cd my-db-devel-branch utilities/link-external-sourcecode ../../lp-sourcedeps/ |
git checkout my-db-devel-branch git rebase db-devel |
Line 42: | Line 39: |
You should still run rocketfuel-get regularly because it updates lp-sourcedeps and the links in all your branches (including your db-devel branches). | == Pushing to Launchpad == You can push to Launchpad as usual. If you haven't set up a contributor remote already, replacing "myusername" with your Launchpad username: |
Line 44: | Line 43: |
rocketfuel-get | git remote add myusername lp:~myusername/launchpad |
Line 47: | Line 46: |
== Pushing to Launchpad == You can push to Launchpad as usual and it will currently actually stack on devel, so this should work even better than pushing to devel. |
Then, to push a branch: {{{ git push -u myusername my-db-devel-branch }}} |
Line 54: | Line 54: |
When creating a merge proposal through the UI make sure to pick db-devel. This is fairly easy. [[https://dev.launchpad.net/Code/BzrSend|Using bzr send]] is recommended. You can simply pass your local db-devel branch as the submit-branch to the lpsend command because you set up its public location earlier. {{{ cd my-db-devel-branch bzr lpsend ../db-devel/ }}} To get lpreview-body to work with lpsend and db-devel, so that you get a cover letter template, you need to do: {{{ bzr lpsend bzr+ssh://bazaar.launchpad.net/~launchpad-pqm/launchpad/db-devel }}} |
When creating a merge proposal through the UI make sure to set db-devel as the target branch path. |
Line 67: | Line 57: |
== Running ec2 test|land == [[https://dev.launchpad.net/EC2Test|Using ec2 test|land]] works as described. (Canonical employees also please see [[https://wiki.canonical.com/Launchpad/EC2Test|email setup]]). * For "ec2 land": just target your merge proposal to db-devel. * For "ec2 test": add the option "{{{-b launchpad=db-devel}}}". 'ec2 land' looks at your merge proposal to see which branch you have targeted. If you have that set-up correctly then it will do the right thing. {{{ cd my-db-devel-branch utilities/ec2 land <merge proposal url> }}} == Submitting to PQM without testing. DO NOT DO THIS == Lastly, if you need to submit to pqm without going through ec2 (why ever? ;), you can use pqm-submit and pass in db-devel as the --submit-branch. You must include the bracketed tags manually in this case. {{{ cd my-db-devel-branch bzr pqm-submit -m '[r=kermit][ui=none] Fix the frobnob.' --submit-branch=bzr+ssh://bazaar.launchpad.net/~launchpad-pqm/launchpad/db-devel }}} |
Working with db-devel
As the standard rocketfuel and ec2test scripts work on devel, some care must be taken when developing against db-devel. This is a guide for all who have only used rocketfuel-scripts so far.
You also should be familiar with the process for schema changes.
Alternative trunk
Check out the db-devel branch in your existing git clone:
git checkout db-devel git pull
Now you can use this to create new branches of db-devel:
git checkout -b my-db-devel-branch db-devel
You can update db-devel by pulling in changes.
git checkout db-devel git pull
You can merge changes from db-devel into your branch.
git checkout my-db-devel-branch git merge db-devel git commit -m "Merge db-devel"
Or rebase it if you prefer:
git checkout my-db-devel-branch git rebase db-devel
Note: Should we make it a habit to prefix these branches' names with "db-" so we never forget? —jtv
Pushing to Launchpad
You can push to Launchpad as usual. If you haven't set up a contributor remote already, replacing "myusername" with your Launchpad username:
git remote add myusername lp:~myusername/launchpad
Then, to push a branch:
git push -u myusername my-db-devel-branch
Creating a merge proposal
It is very important to get the merge target right when creating a merge proposal, otherwise your reviewer will see a much larger patch than what you thought you were submitting.
When creating a merge proposal through the UI make sure to set db-devel as the target branch path.
Note: It is a good idea to mention that you want to merge into db-devel in the cover letter because it is not very conspicuous to the reviewer otherwise.