changeset 5898:52cfe86ebe55

repair.py: don't import commands.py
author Alexis S. L. Carvalho <alexis@cecm.usp.br>
date Sat, 19 Jan 2008 18:01:16 -0200
parents 158fa833d243
children d7388ad85511
files mercurial/repair.py tests/test-mq.out
diffstat 2 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- 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)
 
--- a/tests/test-mq.out	Fri Jan 18 23:59:40 2008 +0100
+++ b/tests/test-mq.out	Sat Jan 19 18:01:16 2008 -0200
@@ -310,7 +310,6 @@
 adding manifests
 adding file changes
 added 1 changesets with 1 changes to 1 files
-(run 'hg update' to get a working copy)
 Patch queue now empty
 applying bar
 Now at: bar
@@ -344,7 +343,6 @@
 adding manifests
 adding file changes
 added 1 changesets with 1 changes to 1 files
-(run 'hg update' to get a working copy)
 Patch queue now empty
 applying bar
 Now at: bar
@@ -419,7 +417,6 @@
 adding manifests
 adding file changes
 added 1 changesets with 1 changes to 1 files
-(run 'hg update' to get a working copy)
 changeset:   1:20cbbe65cff7
 tag:         tip
 user:        test