# HG changeset patch # User Alexis S. L. Carvalho # Date 1200772876 7200 # Node ID 52cfe86ebe55ea9ab6d48159a814ab6d74ee0461 # Parent 158fa833d243de2540d67d9925396b0baff56c41 repair.py: don't import commands.py diff -r 158fa833d243 -r 52cfe86ebe55 mercurial/repair.py --- 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) diff -r 158fa833d243 -r 52cfe86ebe55 tests/test-mq.out --- 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