Patchwork D9984: softstrip: move _bookmarkmovements() call to where it's needed

login
register
mail settings
Submitter phabricator
Date Feb. 11, 2021, 10:37 p.m.
Message ID <differential-rev-PHID-DREV-3x2tjoh7xjwdqazwbsws-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/48299/
State Superseded
Headers show

Comments

phabricator - Feb. 11, 2021, 10:37 p.m.
martinvonz created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  The call to `_bookmarkmovements()` is unrelated to the backup, so
  let's move it after.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D9984

AFFECTED FILES
  mercurial/repair.py

CHANGE DETAILS




To: martinvonz, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/mercurial/repair.py b/mercurial/repair.py
--- a/mercurial/repair.py
+++ b/mercurial/repair.py
@@ -308,11 +308,11 @@ 
     if not tostrip:
         return None
 
-    newbmtarget, updatebm = _bookmarkmovements(repo, tostrip)
     if backup:
         node = tostrip[0]
         backupfile = _createstripbackup(repo, tostrip, node, topic)
 
+    newbmtarget, updatebm = _bookmarkmovements(repo, tostrip)
     with repo.transaction(b'strip') as tr:
         phases.retractboundary(repo, tr, phases.archived, tostrip)
         bmchanges = [(m, repo[newbmtarget].node()) for m in updatebm]