Mercurial > hg
diff mercurial/repoview.py @ 45523:5ed6efedc457 stable
repoview: don't crash if mergestate points to non-existent node
Differential Revision: https://phab.mercurial-scm.org/D9078
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Wed, 23 Sep 2020 15:36:15 -0700 |
parents | aaeccdb6e654 |
children | 341e014fe0fb |
line wrap: on
line diff
--- a/mercurial/repoview.py Wed Sep 23 16:07:14 2020 -0700 +++ b/mercurial/repoview.py Wed Sep 23 15:36:15 2020 -0700 @@ -70,8 +70,10 @@ ms = mergestate.mergestate.read(repo) if ms.active(): - pinned.add(ms.localctx.rev()) - pinned.add(ms.otherctx.rev()) + for node in (ms.local, ms.other): + rev = cl.index.get_rev(node) + if rev is not None: + pinned.add(rev) return pinned