Diff for "WorkingWithDbDevel"

Not logged in - Log In / Register

Differences between revisions 1 and 11 (spanning 10 versions)
Revision 1 as of 2009-07-22 09:29:04
Size: 3554
Editor: henninge
Comment: Copied from internal wiki, removed reference to the internal Experiments page.
Revision 11 as of 2010-09-01 19:05:41
Size: 3509
Editor: lifeless
Comment: remove cruft
Deletions are marked like this. Additions are marked like this.
Line 5: Line 5:
Create an alternative trunk directory called `db-devel` next to your `trunk` directory in `~/canonical/lp-branches`. Create an alternative trunk directory called `db-devel` next to your `trunk` directory in your repository (e.g. ~/launchpad/lp-branches).
Line 12: Line 12:
[/home/henning/canonical/lp-branches/db-devel] [<your-home-dir>/launchpad/lp-branches/db-devel]
Line 49: Line 49:
You can push to Launchpad as usual but it will stack on devel, so depending on how far they have diverged, the initial push may take a bit longer. The stacking on devel does no harm otherwise. 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.
Line 61: Line 61:
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
}}}
Line 64: Line 68:
== Running ec2test ==
[[https://wiki.canonical.com/Launchpad/EC2Test|Using ec2test.py]] works as desrcibed but you need to add one or two options to it. The `-b` option defines the public branch you are working on and the `--pqm-submit-location` defines where you want pqm to merge your branch into. The latter is only needed if you also supply the `-s` option with a submit message for pqm. This is a full call.
== Running ec2 test|land ==
[[https://wiki.canonical.com/Launchpad/EC2Test|Using ec2 test|land]] (sorry, still internal) works as described. Just target your merge proposal to 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.
Line 68: Line 75:
~/canonical/lp-dev-utils/ec2test.py --headless -s '[r=kermit][ui=none] Fix the frobnob.' -b launchpad=db-devel --pqm-submit-location=bzr+ssh://bazaar.launchpad.net/~launchpad-pqm/launchpad/db-devel utilities/ec2 land <merge proposal url>
Line 71: Line 78:
To my knowledge, the `lp:` address scheme cannot be used here.

== Submitting to PQM ==
Lastly, if you need to submit to pqm without going through ec2test (why ever? ;), you can use pqm-submit and pass in db-devel as the --submit-branch.
== 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.

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.

Alternative trunk

Create an alternative trunk directory called db-devel next to your trunk directory in your repository (e.g. ~/launchpad/lp-branches).

bzr branch lp:~launchpad-pqm/launchpad/db-devel db-devel

Set the public location for this branch in ~/.bazaar/locations.conf

[<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

You can update db-devel by pulling in changes.

cd db-devel
bzr pull

You can merge changes from db-devel into your branch.

cd my-db-devel-branch
bzr merge ../db-devel
bzr commit -m"Merge db-devel."

To run code in your branch, you need to link the external source code. Normally rocketfuel-branch would do that for you.

cd my-db-devel-branch
utilities/link-external-sourcecode ../../lp-sourcedeps/

Note: Should we make it a habit to prefix these branches' names with "db-" so we never forget? —jtv

You should still run rocketfuel-get regularly because it updates lp-sourcedeps and the links in all your branches (including your db-devel branches).

rocketfuel-get

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.

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 pick db-devel. This is fairly easy.

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

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.

Running ec2 test|land

Using ec2 test (sorry, still internal) works as described. Just target your merge proposal to 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 

WorkingWithDbDevel (last edited 2019-10-04 11:08:15 by cjwatson)