[PATCH] strip: respect the backup option in stripcallback

Jun Wu quark at fb.com
Tue Jun 27 04:12:54 UTC 2017


# HG changeset patch
# User Jun Wu <quark at fb.com>
# Date 1498536662 25200
#      Mon Jun 26 21:11:02 2017 -0700
# Node ID a6586c6c3982d8b43ed6c53bee1b89c567a79feb
# Parent  fce4ed2912bb103f59efb4b9cf5af7d93689b2b5
# Available At https://bitbucket.org/quark-zju/hg-draft
#              hg pull https://bitbucket.org/quark-zju/hg-draft -r a6586c6c3982
strip: respect the backup option in stripcallback

The backup option was mistakenly ignored. It should be respected.

Thanks Martin von Zweigbergk for finding this out!

diff --git a/mercurial/repair.py b/mercurial/repair.py
--- a/mercurial/repair.py
+++ b/mercurial/repair.py
@@ -286,5 +286,5 @@ class stripcallback(object):
         roots = safestriproots(self.ui, self.repo, self.nodelist)
         if roots:
-            strip(self.ui, self.repo, roots, True, self.topic)
+            strip(self.ui, self.repo, roots, self.backup, self.topic)
 
 def delayedstrip(ui, repo, nodelist, topic=None):


More information about the Mercurial-devel mailing list