Mercurial > hg
diff mercurial/repair.py @ 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 | 18e91c9def0c |
children | d7388ad85511 |
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)