softstrip: move _bookmarkmovements() call to where it's needed
authorMartin von Zweigbergk <martinvonz@google.com>
Wed, 10 Feb 2021 09:45:48 -0800
changeset 46514 beaa233e81f7
parent 46513 c3c7a86e9c24
child 46515 cd9154343160
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
mercurial/repair.py
--- 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]