comparison mercurial/commands.py @ 270:5a80ed2158c8

Reverse order of hg log and hg history lists -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Reverse order of hg log and hg history lists Suggested by Arun Sharma manifest hash: 5f663a03e7ace601383c7291a17f83c9aeeccdda -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) iD8DBQFCpVXDywK+sNU5EO8RApeOAJsFXG0qeO+yidIwyPrBHSmDMaKfdwCeMAWl uClUZxGNburRXmNLLAPHk9k= =1ytE -----END PGP SIGNATURE-----
author mpm@selenic.com
date Tue, 07 Jun 2005 00:07:31 -0800
parents 1634a7ea6748
children 61d45b0ba8fb
comparison
equal deleted inserted replaced
269:24e9e140485f 270:5a80ed2158c8
254 print "description:" 254 print "description:"
255 print changes[4] 255 print changes[4]
256 256
257 def history(ui, repo): 257 def history(ui, repo):
258 """show the changelog history""" 258 """show the changelog history"""
259 for i in range(repo.changelog.count()): 259 for i in range(repo.changelog.count() - 1, -1, -1):
260 n = repo.changelog.node(i) 260 n = repo.changelog.node(i)
261 changes = repo.changelog.read(n) 261 changes = repo.changelog.read(n)
262 (p1, p2) = repo.changelog.parents(n) 262 (p1, p2) = repo.changelog.parents(n)
263 (h, h1, h2) = map(hg.hex, (n, p1, p2)) 263 (h, h1, h2) = map(hg.hex, (n, p1, p2))
264 (i1, i2) = map(repo.changelog.rev, (p1, p2)) 264 (i1, i2) = map(repo.changelog.rev, (p1, p2))
281 def log(ui, repo, f): 281 def log(ui, repo, f):
282 """show the revision history of a single file""" 282 """show the revision history of a single file"""
283 f = relpath(repo, [f])[0] 283 f = relpath(repo, [f])[0]
284 284
285 r = repo.file(f) 285 r = repo.file(f)
286 for i in range(r.count()): 286 for i in range(r.count() - 1, -1, -1):
287 n = r.node(i) 287 n = r.node(i)
288 (p1, p2) = r.parents(n) 288 (p1, p2) = r.parents(n)
289 (h, h1, h2) = map(hg.hex, (n, p1, p2)) 289 (h, h1, h2) = map(hg.hex, (n, p1, p2))
290 (i1, i2) = map(r.rev, (p1, p2)) 290 (i1, i2) = map(r.rev, (p1, p2))
291 cr = r.linkrev(n) 291 cr = r.linkrev(n)