Make manifest lookup use changeset ids
authormpm@selenic.com
Wed, 13 Jul 2005 01:42:48 -0800
changeset 689 4315db147f00
parent 688 b50cd98bb7e4
child 690 f762860f82c6
Make manifest lookup use changeset ids manifest hash: 83cf1ac9c68ad9e8de29d2c629c8a06eaeeeae15
mercurial/commands.py
--- a/mercurial/commands.py	Wed Jul 13 01:41:49 2005 -0800
+++ b/mercurial/commands.py	Wed Jul 13 01:42:48 2005 -0800
@@ -719,7 +719,14 @@
     """output the latest or given revision of the project manifest"""
     n = repo.manifest.tip()
     if rev:
-        n = repo.manifest.lookup(rev)
+        try:
+            # assume all revision numbers are for changesets
+            n = repo.lookup(rev)
+            change = repo.changelog.read(n)
+            n = change[0]
+        except:
+            n = repo.manifest.lookup(rev)
+
     m = repo.manifest.read(n)
     mf = repo.manifest.readflags(n)
     files = m.keys()