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

Alexander Belchenko bialix at ukr.net
Thu Feb 26 14:33:33 GMT 2009


John Arbash Meinel пишет:
> Alexander Belchenko wrote:
>> It's not quite rfc, just as the question I'd like to make bzr.devs aware
>> of.
>>
>> Currently bzr commit --fixes=xxx store full URL to the bug page.
>>
>> In QBzr we're using special regex to extract bug id back to original
>> form and then represent them in qlog view as "bug #12345".
>> (For example see http://qbzr.googlegroups.com/web/qlog.png)
>>
>> To support every new bug tracker we have to add specialized regex
>> to parse full URL.
>>
>> Maybe it makes more sense to store not only full URL to bug page (as
>> today) but in addition and original bug id? So it will be much
>> easier to extract this info?
>>
>>
>>
> 
> 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.




More information about the bazaar mailing list