changeset 11:7f16aaeed62f

Allow checkout by number or hash Print files touched in changeset Fix reporting of incorrect changelog rev links in verify
author oxymoron@cinder.waste.org
date Tue, 03 May 2005 23:39:04 -0800
parents e76ed1e480ef
children 8b64243ee17b
files hg
diffstat 1 files changed, 9 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/hg	Tue May 03 23:37:43 2005 -0800
+++ b/hg	Tue May 03 23:39:04 2005 -0800
@@ -44,7 +44,12 @@
 
 if cmd == "checkout" or cmd == "co":
     node = repo.changelog.tip()
-    if len(args): rev = int(args[0])
+    if len(args):
+        if len(args[0]) < 40:
+            rev = int(args[0])
+            node = repo.changelog.node(rev)
+        else:
+            node = args[0]
     repo.checkout(node)
 
 elif cmd == "add":
@@ -123,7 +128,7 @@
         print "manifest: %4d:%s" % (repo.manifest.rev(changes[0]),
                                     hg.hex(changes[0]))
         print "user:", changes[1]
-        print "files:", len(changes[3])
+        print "files:", " ".join(changes[3])
         print "description:"
         print changes[4]
 
@@ -218,8 +223,8 @@
             if n not in filenodes[f]:
                 print "%s:%s not in manifests" % (f, hg.hex(n))
             if fl.linkrev(n) not in filelinkrevs[f]:
-                print "%s:%s points to unknown changeset %s" \
-                      % (f, hg.hex(n), hg.hex(fl.changeset(n)))
+                print "%s:%s points to unexpected changeset rev %d" \
+                      % (f, hg.hex(n), fl.linkrev(n))
             t = fl.read(n)
             (p1, p2) = fl.parents(n)
             if p1 not in nodes: