comparison mercurial/commands.py @ 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 20a44c82795f
children 45c293b71341
comparison
equal deleted inserted replaced
256:649ed23e4661 257:65dccc4555c2
419 419
420 def tags(ui, repo): 420 def tags(ui, repo):
421 """list repository tags""" 421 """list repository tags"""
422 repo.lookup(0) # prime the cache 422 repo.lookup(0) # prime the cache
423 i = repo.tags.items() 423 i = repo.tags.items()
424 i.sort() 424 n = []
425 for e in i:
426 try:
427 l = repo.changelog.rev(e[1])
428 except KeyError:
429 l = -2
430 n.append((l, e))
431
432 n.sort()
433 n.reverse()
434 i = [ e[1] for e in n ]
425 for k, n in i: 435 for k, n in i:
426 try: 436 try:
427 r = repo.changelog.rev(n) 437 r = repo.changelog.rev(n)
428 except KeyError: 438 except KeyError:
429 r = "?" 439 r = "?"