D9985: softstrip: fix a reference to an undefined variable
martinvonz (Martin von Zweigbergk)
phabricator at mercurial-scm.org
Thu Feb 11 22:37:22 UTC 2021
martinvonz created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.
REVISION SUMMARY
`backupfile` wasn't defined if no backup was requested. Let's set it
to `None` by default, which matches what regular `repair.strip()`
does.
REPOSITORY
rHG Mercurial
BRANCH
default
REVISION DETAIL
https://phab.mercurial-scm.org/D9985
AFFECTED FILES
mercurial/repair.py
CHANGE DETAILS
diff --git a/mercurial/repair.py b/mercurial/repair.py
--- a/mercurial/repair.py
+++ b/mercurial/repair.py
@@ -308,6 +308,7 @@
if not tostrip:
return None
+ backupfile = None
if backup:
node = tostrip[0]
backupfile = _createstripbackup(repo, tostrip, node, topic)
To: martinvonz, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
More information about the Mercurial-devel
mailing list