Patchwork [2,of,7] strip: clarify comment around bundle create

login
register
mail settings
Submitter Boris Feld
Date Jan. 2, 2019, 10:35 p.m.
Message ID <80e87a6f0480ef7e1abc.1546468550@Laptop-Boris.lan>
Download mbox | patch
Permalink /patch/37425/
State Accepted
Headers show

Comments

Boris Feld - Jan. 2, 2019, 10:35 p.m.
# HG changeset patch
# User Boris Feld <boris.feld@octobus.net>
# Date 1546401467 -3600
#      Wed Jan 02 04:57:47 2019 +0100
# Node ID 80e87a6f0480ef7e1abc954333c54c90095f23ef
# Parent  7aeb9adbfd1b1fdb4a9c5ba597840a4f05f7e59f
# EXP-Topic archived-phase-UX
# Available At https://bitbucket.org/octobus/mercurial-devel/
#              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r 80e87a6f0480
strip: clarify comment around bundle create

We may create two bundles, one for the changeset actually stripped, and one
for the changeset affected by the strip we want to keep. (Changesets with a
higher rev number than the striped ones).

For soft stripping, we still need to the first one (used for "restoring" the
changesets), but not the second one.

We start with clarifying which bits of the code is used for what.

Patch

diff --git a/mercurial/repair.py b/mercurial/repair.py
--- a/mercurial/repair.py
+++ b/mercurial/repair.py
@@ -168,7 +168,7 @@  def strip(ui, repo, nodelist, backup=Tru
         if rev in tostrip:
             updatebm.append(m)
 
-    # create a changegroup for all the branches we need to keep
+    # backup the changeset we are about to strip
     backupfile = None
     node = nodelist[-1]
     if backup:
@@ -177,6 +177,7 @@  def strip(ui, repo, nodelist, backup=Tru
                        vfs.join(backupfile))
         repo.ui.log("backupbundle", "saved backup bundle to %s\n",
                     vfs.join(backupfile))
+    # create a changegroup for all the branches we need to keep
     tmpbundlefile = None
     if saveheads:
         # do not compress temporary bundle if we remove it from disk later