repair: allow giving strip backup a different name
authorIdan Kamara <idankk86@gmail.com>
Fri, 06 Apr 2012 16:18:33 +0300
changeset 16388 e03d8a40521f
parent 16387 c481761033bd
child 16389 79fecd735d26
repair: allow giving strip backup a different name So the user can differentiate amend backups from the rest.
mercurial/repair.py
--- a/mercurial/repair.py	Tue Apr 10 12:07:18 2012 -0500
+++ b/mercurial/repair.py	Fri Apr 06 16:18:33 2012 +0300
@@ -54,7 +54,7 @@
 
     return s
 
-def strip(ui, repo, nodelist, backup="all"):
+def strip(ui, repo, nodelist, backup="all", topic='backup'):
     cl = repo.changelog
     # TODO handle undo of merge sets
     if isinstance(nodelist, str):
@@ -105,7 +105,7 @@
     # create a changegroup for all the branches we need to keep
     backupfile = None
     if backup == "all":
-        backupfile = _bundle(repo, stripbases, cl.heads(), node, 'backup')
+        backupfile = _bundle(repo, stripbases, cl.heads(), node, topic)
         repo.ui.status(_("saved backup bundle to %s\n") % backupfile)
     if saveheads or savebases:
         # do not compress partial bundle if we remove it from disk later