From patchwork Thu Feb 11 22:37:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D9984: softstrip: move _bookmarkmovements() call to where it's needed From: phabricator X-Patchwork-Id: 48299 Message-Id: To: Phabricator Cc: mercurial-devel@mercurial-scm.org Date: Thu, 11 Feb 2021 22:37:18 +0000 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 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]