Mercurial > hg
changeset 41372:390ef056081b
localrepo: slightly simplify check for removed parents in _rollback()
Differential Revision: https://phab.mercurial-scm.org/D5692
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Thu, 24 Jan 2019 16:25:19 -0800 |
parents | 608c15f76f50 |
children | b5f5dc0fa908 |
files | mercurial/localrepo.py |
diffstat | 1 files changed, 1 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/localrepo.py Thu Jan 24 16:16:10 2019 -0800 +++ b/mercurial/localrepo.py Thu Jan 24 16:25:19 2019 -0800 @@ -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()