D5692: localrepo: slightly simplify check for removed parents in _rollback()
martinvonz (Martin von Zweigbergk)
phabricator at mercurial-scm.org
Fri Jan 25 15:04:58 EST 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGf1086a154d15: localrepo: slightly simplify check for removed parents in _rollback() (authored by martinvonz, committed by ).
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D5692?vs=13438&id=13460
REVISION DETAIL
https://phab.mercurial-scm.org/D5692
AFFECTED FILES
mercurial/localrepo.py
CHANGE DETAILS
diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -2011,8 +2011,7 @@
self.svfs.rename('undo.phaseroots', 'phaseroots', checkambig=True)
self.invalidate()
- parentgone = (parents[0] not in self.changelog.nodemap or
- parents[1] not in self.changelog.nodemap)
+ parentgone = any(p not in self.changelog.nodemap for p in parents)
if parentgone:
# prevent dirstateguard from overwriting already restored one
dsguard.close()
To: martinvonz, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list