[RFC] commit --fixes xxx: please, store actual bug id in addition to full URL

Colin D Bennett colin at gibibit.com
Thu Feb 26 15:45:12 GMT 2009


On Thu, 26 Feb 2009 16:33:33 +0200
Alexander Belchenko <bialix at ukr.net> wrote:

> John Arbash Meinel пишет:
> > I think Robert touched on this, but to be clear. I think the correct
> > place to put this is as part of bugtracker.py code. Specifically, we
> > have a "get_bug_url()" function that maps a "bug_id" => "URL" we just
> > need to add the opposite function, to map "URL" => "bug_id".
> 
> John, I'm sorry but I disagree. Once you convert bug id to URL you lost
> original info.
> 
> Let's imagine this situation: I've set up non-standard bug tracker in my
> bazaar.conf and commit with --fixes ticket:123
> You pull my branch but your bazaar.conf have no settings for my bug 
> tracker. How can you extract bug id then?
> 
> I think the best what can be done is to store for each bug pair of 
> values: bug id and bug URL template. Then and only then you can easily
> obtain any of 2: either bug id alone or bug URL.

This suggestion sounds like the best option to me, except I think even
the bug URL template should be stored separate from the revision
itself, so that in the future the bug tracker URL can change and bugs
from old revisions will still be accessible.

There are many reasons that a bug tracker URL might change, such as
changing servers, moving from an intranet host to an Internet host with
a public DNS name, switching bug tracker software, etc.

By storing both (1) bug ID and (2) bug tracker ID in a revision with
'--fixes', and keeping a map of "bug tracker ID" -> URL in the
branch, multiple bug trackers can be supported (not common, but
possible if there's a public bug tracker and an internal bug tracker for
developers?  or multiple components in one branch, etc.).

Regards,
Colin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20090226/c3b75204/attachment.pgp 


More information about the bazaar mailing list