Sorting tags

Brendan Simon (eTRIX) brendan.simon at etrix.com.au
Wed Feb 1 11:15:51 UTC 2012



On 1/02/12 10:03 PM, John Arbash Meinel wrote:
> On 2/1/2012 11:46 AM, Brendan Simon (eTRIX) wrote:
>> My 'bzr tags' command produces the following:
>>
>> v5.6.14 251 v5.6.14-rc1 246 v5.6.14-rc2
>> 250 v5.7.0 301 v5.7.0-dev1 257 v5.7.0-dev2
>> 259 v5.7.0-dev3 264 v5.7.0-dev4 280 v5.7.0-rc1
>> 281 v5.7.0-rc2 300
>>
>>
>> Note that the release candidates (-rc*) and dev builds (-dev*) are
>> displayed earlier than the final releases.
>>
>> I want to display in revision order. Is there a way to get bzr
>> tags to display in chronological revision order ??
>>
>> v5.6.14-rc1 246 v5.6.14-rc2 250 v5.6.14
>> 251 v5.7.0-dev1 257 v5.7.0-dev2 259 v5.7.0-dev3
>> 264 v5.7.0-dev4 280 v5.7.0-rc1 281 v5.7.0-rc2
>> 300 v5.7.0 301
>>
>>
>> The help (bzr tags --help) wasn't that helpful for the sort
>> arguments :( Note: using bzr 2.4.2.
>>
>> Thanks, Brendan.
>>
>
> bzr tags --sort=time
>
> tag_sort_methods = Registry()
> tag_sort_methods.register("natural", sort_natural,
> 'Sort numeric substrings as numbers. (default)')
> tag_sort_methods.register("alpha", sort_alpha, 'Sort tags
> lexicographically.')
> tag_sort_methods.register("time", sort_time, 'Sort tags chronologically.')
> tag_sort_methods.default_key = "natural"

Thanks.  So ideally the help for bzr tags should show the available sort
args (natural, alpha, time), and/or pointers on how to discover any
custom sort methods (or be able to display info on the custom sort
methods) ;-)


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/bazaar/attachments/20120201/3820b2dd/attachment.html>


More information about the bazaar mailing list