diff --git a/mercurial/repair.py b/mercurial/repair.py --- a/mercurial/repair.py +++ b/mercurial/repair.py @@ -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 @@ def strip(ui, repo, rev, backup="all"): 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 --git a/tests/test-mq.out b/tests/test-mq.out --- a/tests/test-mq.out +++ b/tests/test-mq.out @@ -310,7 +310,6 @@ adding changesets 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 changesets 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 changesets 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