Patch / branch equivalence: patches should be branches and vice versa.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
Triaged
|
Low
|
Unassigned |
Bug Description
[This bug was originally filed about auto-converting patches to bzr branches. The description has since been expanded to be about converting both ways, patch-to-branch and branch-to-patch.]
When a patch is attached to a bug, it should be possible to get access to it in the form of a Bazaar branch. Likewise, when a branch is linked to a bug, it should be possible to get access to that branch in patch form (and possibly in some-other-
The advantages of having a patch available in branch form are that it's easier to merge (If upstream uses Bazaar too, then the advantage is really big, but even if upstream doesn't, the Ubuntu packager probably does, and might need to merge the patch independently of upstream); and crediting information would automatically be in-band, instead of in some comment on the side.
The advantages of having a branch available in patch form are that patches are the lowest-
For converting patches to branches, there are few issues:
1) determining which branch the patch should be applied against. Answer: probably the default branch for the project. If it doesn't apply successfully, have an icon to signal the failure, and by expanding the icon you could specify another branch.
2) for Ubuntu, it's important that packages in Launchpad be related to the appropriate packaging branch so that things like debdiffs can be applied.
3) Where to put the branch? OP's proposal: go to a user "launchpad-bugger" and made into a branch with the bug number and an incrementing number with the attachment. This takes care of the issue of multiple patches while keeping the URL short. So for most patches on project "bob" bug number 35 would result in the URL being lp:~launchpad-bugger/bob/bug35 if it had two patches you'd also have lp:~launchpad-bugger/bob/bug35-1. This would make it so that when you go to "http://
Naturally, one could make a merge proposal based on a branch-from-patch; they would behave like real branches in every respect.
tags: | added: patch-tracking |
Changed in malone: | |
status: | New → Triaged |
importance: | Undecided → Low |
summary: |
- Patches should be made into Bazaar branches + Patch / branch equivalence: patches should be branches and vice versa. |
description: | updated |
description: | updated |
If the user attaches the output of "bzr send" rather than a plain patch, then a lot of this becomes much easier to implement. Perhaps it should be possible to "bzr send" direct to a Launchpad bug report?
Personally, I think that the automatically generated branches should be owned by the user that uploaded the patch, rather than by a robot account like "launchpad-bugger". I'm sure the Launchpad Code guys can think of a better way to give short URLs to patches on bugs, either way the branch/merge request would be be visible at code.lp.n/proj.
(Also, "bugger" is a somewhat unfortunate choice of word, at least in Australia)