diff mercurial/repair.py @ 46514:beaa233e81f7

softstrip: move _bookmarkmovements() call to where it's needed The call to `_bookmarkmovements()` is unrelated to the backup, so let's move it after. Differential Revision: https://phab.mercurial-scm.org/D9984
author Martin von Zweigbergk <martinvonz@google.com>
date Wed, 10 Feb 2021 09:45:48 -0800
parents ec73a6a75985
children cd9154343160
line wrap: on
line diff
--- a/mercurial/repair.py	Fri Feb 12 12:51:28 2021 +0100
+++ b/mercurial/repair.py	Wed Feb 10 09:45:48 2021 -0800
@@ -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]