mercurial/repair.py
changeset 5898 52cfe86ebe55
parent 4702 18e91c9def0c
child 5899 d7388ad85511
--- a/mercurial/repair.py	Fri Jan 18 23:59:40 2008 +0100
+++ b/mercurial/repair.py	Sat Jan 19 18:01:16 2008 -0200
@@ -6,7 +6,7 @@
 # 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, commands
+import changegroup, revlog, os
 
 def strip(ui, repo, rev, backup="all"):
     def limitheads(chlog, stop):
@@ -121,7 +121,10 @@
     repo.manifest.strip(repo.manifest.rev(change[0]), revnum)
     if saveheads:
         ui.status("adding branch\n")
-        commands.unbundle(ui, repo, "file:%s" % chgrpfile, update=False)
+        f = open(chgrpfile, "rb")
+        gen = changegroup.readbundle(f, chgrpfile)
+        repo.addchangegroup(gen, 'strip', 'bundle:' + chgrpfile)
+        f.close()
         if backup != "strip":
             os.unlink(chgrpfile)