##// END OF EJS Templates
repair.py: don't import commands.py
Alexis S. L. Carvalho -
r5898:52cfe86e default
parent child Browse files
Show More
@@ -6,7 +6,7 b''
6 # This software may be used and distributed according to the terms
6 # This software may be used and distributed according to the terms
7 # of the GNU General Public License, incorporated herein by reference.
7 # of the GNU General Public License, incorporated herein by reference.
8
8
9 import changegroup, revlog, os, commands
9 import changegroup, revlog, os
10
10
11 def strip(ui, repo, rev, backup="all"):
11 def strip(ui, repo, rev, backup="all"):
12 def limitheads(chlog, stop):
12 def limitheads(chlog, stop):
@@ -121,7 +121,10 b' def strip(ui, repo, rev, backup="all"):'
121 repo.manifest.strip(repo.manifest.rev(change[0]), revnum)
121 repo.manifest.strip(repo.manifest.rev(change[0]), revnum)
122 if saveheads:
122 if saveheads:
123 ui.status("adding branch\n")
123 ui.status("adding branch\n")
124 commands.unbundle(ui, repo, "file:%s" % chgrpfile, update=False)
124 f = open(chgrpfile, "rb")
125 gen = changegroup.readbundle(f, chgrpfile)
126 repo.addchangegroup(gen, 'strip', 'bundle:' + chgrpfile)
127 f.close()
125 if backup != "strip":
128 if backup != "strip":
126 os.unlink(chgrpfile)
129 os.unlink(chgrpfile)
127
130
@@ -310,7 +310,6 b' adding changesets'
310 adding manifests
310 adding manifests
311 adding file changes
311 adding file changes
312 added 1 changesets with 1 changes to 1 files
312 added 1 changesets with 1 changes to 1 files
313 (run 'hg update' to get a working copy)
314 Patch queue now empty
313 Patch queue now empty
315 applying bar
314 applying bar
316 Now at: bar
315 Now at: bar
@@ -344,7 +343,6 b' adding changesets'
344 adding manifests
343 adding manifests
345 adding file changes
344 adding file changes
346 added 1 changesets with 1 changes to 1 files
345 added 1 changesets with 1 changes to 1 files
347 (run 'hg update' to get a working copy)
348 Patch queue now empty
346 Patch queue now empty
349 applying bar
347 applying bar
350 Now at: bar
348 Now at: bar
@@ -419,7 +417,6 b' adding changesets'
419 adding manifests
417 adding manifests
420 adding file changes
418 adding file changes
421 added 1 changesets with 1 changes to 1 files
419 added 1 changesets with 1 changes to 1 files
422 (run 'hg update' to get a working copy)
423 changeset: 1:20cbbe65cff7
420 changeset: 1:20cbbe65cff7
424 tag: tip
421 tag: tip
425 user: test
422 user: test
General Comments 0
You need to be logged in to leave comments. Login now