[PATCH 5 of 6] repair: allow giving strip backup a different name
Idan Kamara
idankk86 at gmail.com
Tue Mar 6 10:44:28 CST 2012
# HG changeset patch
# User Idan Kamara <idankk86 at gmail.com>
# Date 1331052186 -7200
# Node ID 8de1458190589ce199ec8a5e6f6397fa17ef58ba
# Parent 2d6eb93415d09c26c3bdf94bf74b584acc6ebab6
repair: allow giving strip backup a different name
So the user can differentiate amend backups from the rest.
diff --git a/mercurial/repair.py b/mercurial/repair.py
--- a/mercurial/repair.py
+++ b/mercurial/repair.py
@@ -54,7 +54,7 @@
return s
-def strip(ui, repo, node, backup="all"):
+def strip(ui, repo, node, backup="all", backupfilename='backup'):
cl = repo.changelog
# TODO handle undo of merge sets
striprev = cl.rev(node)
@@ -99,7 +99,7 @@
# create a changegroup for all the branches we need to keep
backupfile = None
if backup == "all":
- backupfile = _bundle(repo, [node], cl.heads(), node, 'backup')
+ backupfile = _bundle(repo, [node], cl.heads(), node, backupfilename)
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
More information about the Mercurial-devel
mailing list