Patchwork strip: respect the backup option in stripcallback

login
register
mail settings
Submitter Jun Wu
Date June 27, 2017, 4:12 a.m.
Message ID <a6586c6c3982d8b43ed6.1498536774@x1c>
Download mbox | patch
Permalink /patch/21757/
State Accepted
Headers show

Comments

Jun Wu - June 27, 2017, 4:12 a.m.
# HG changeset patch
# User Jun Wu <quark@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!
Augie Fackler - June 27, 2017, 9:07 p.m.
On Mon, Jun 26, 2017 at 09:12:54PM -0700, Jun Wu wrote:
> # HG changeset patch
> # User Jun Wu <quark@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

queued, thanks

Patch

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):