Sorting tags
John Arbash Meinel
john at arbash-meinel.com
Wed Feb 1 11:03:53 UTC 2012
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
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"
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk8pHBkACgkQJdeBCYSNAAOcMACeLkpjSVhHVT39udvhXZfMUZ53
o8YAnRTTLpLgCku+NA6Uo6iqqWPgNq4h
=iQV6
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list