Mercurial > hg
changeset 257:65dccc4555c2
Sort tags in revision order
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Sort tags in revision order
manifest hash: 23f33a4ece3d36e4387d9c096a87e3d758db0cbc
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
iD8DBQFConLsywK+sNU5EO8RAkBTAJ0c71AIsyi3YFyNIZTAMgEIMgEHNACggAKC
YrPLqJ3nzAX/tLSprvR/SUY=
=WTsq
-----END PGP SIGNATURE-----
author | mpm@selenic.com |
---|---|
date | Sat, 04 Jun 2005 19:35:08 -0800 |
parents | 649ed23e4661 |
children | 268bcb5a072a |
files | mercurial/commands.py |
diffstat | 1 files changed, 11 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/commands.py Sat Jun 04 19:21:13 2005 -0800 +++ b/mercurial/commands.py Sat Jun 04 19:35:08 2005 -0800 @@ -421,7 +421,17 @@ """list repository tags""" repo.lookup(0) # prime the cache i = repo.tags.items() - i.sort() + n = [] + for e in i: + try: + l = repo.changelog.rev(e[1]) + except KeyError: + l = -2 + n.append((l, e)) + + n.sort() + n.reverse() + i = [ e[1] for e in n ] for k, n in i: try: r = repo.changelog.rev(n)