How to submit a patch to launchpad properly

Asked by Javier Collado on 2010-06-22


Let's say I'm working on a project whose trunk branch is hosted in launchpad (it has thousands of revisions) and that I maintain a local branch that is basically a mirror of the branch in launchpad.

When I want to fix a bug, I do the following:
1) Create a new branch locally from my local trunk
2) Fix the bug (small number of commits)
3) Push the changes to a new launchpad branch
4) Create a merge proposal against trunk branch in launchpad

The problem is that when pushing the changes to launchpad (3), despite the branch is stacked against trunk (which is correct, since they both have a common history), it looks like the whole history has to be uploaded to launchpad (which may take quite a long time) even when the difference against trunk is just a few commits.

Is there a smarter way to to submit a patch and create a merge proposal in launchpad?

It would really nice, for example, to be able to create a new branch in launchpad based on trunk (not an empty branch) so when I submit my changes, only the new changes have to be uploaded. This would be speed up the process since local branch operations are fast.

Best regards,

Question information

English Edit question
Bazaar Edit question
No assignee Edit question
Solved by:
Andrew Bennetts
Last query:
Last reply:
Gordon Tyler (doxxx) said : #1

When you push your new branch to Launchpad, what lp URL do you use?

I use a branch with this pattern:

With regard to my previous explanation, what I would like to work is the following:
$ bzr branch lp:<project> lp:~<username>/<project>/<bug_id>

and what I mean by work is that the previous command creates a new branch in launchpad without having to download the whole history and push it again (as it seems it happens right now). It requires integration from launchpad; but, if that could be done, a lot of time could be saved.

Andrew Bennetts (spiv) said : #4

Hmm. This ought to work already, because the branch is supposed to be automatically stacked.

Ah, I see the bug. BzrDir.sprout wrongly assumes that a new repository is never stacked. I'll turn this into a bug report about that.

Vincent Ladeuil (vila) said : #5

This should be fixed now, please provide more info if it's not.

Yes, the question is alreaday answered in the bug that opened Andrew (which can also be used to follow up). Thanks.

Thanks Andrew Bennetts, that solved my question.