changeset 5899:d7388ad85511

repair.py: use node.* directly
author Alexis S. L. Carvalho <alexis@cecm.usp.br>
date Sat, 19 Jan 2008 18:01:16 -0200
parents 52cfe86ebe55
children 1206e3dfc906
files mercurial/repair.py
diffstat 1 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/repair.py	Sat Jan 19 18:01:16 2008 -0200
+++ b/mercurial/repair.py	Sat Jan 19 18:01:16 2008 -0200
@@ -6,7 +6,8 @@
 # This software may be used and distributed according to the terms
 # of the GNU General Public License, incorporated herein by reference.
 
-import changegroup, revlog, os
+import changegroup, os
+from node import *
 
 def strip(ui, repo, rev, backup="all"):
     def limitheads(chlog, stop):
@@ -34,7 +35,7 @@
         backupdir = repo.join("strip-backup")
         if not os.path.isdir(backupdir):
             os.mkdir(backupdir)
-        name = os.path.join(backupdir, "%s-%s" % (revlog.short(rev), suffix))
+        name = os.path.join(backupdir, "%s-%s" % (short(rev), suffix))
         ui.warn("saving bundle to %s\n" % name)
         return changegroup.writebundle(cg, name, "HG10BZ")
 
@@ -90,11 +91,11 @@
         while True:
             seen[n] = 1
             pp = chlog.parents(n)
-            if pp[1] != revlog.nullid:
+            if pp[1] != nullid:
                 for p in pp:
                     if chlog.rev(p) > revnum and p not in seen:
                         heads.append(p)
-            if pp[0] == revlog.nullid:
+            if pp[0] == nullid:
                 break
             if chlog.rev(pp[0]) < revnum:
                 break