Mercurial > public > mercurial-scm > hg-stable
diff mercurial/revlog.py @ 47052:411dc27fd9fd stable 5.8.1
corruption: backout changeset 49fd21f32695 (issue6528)
inverting the parent is masking copy information leading to bad content being
fetched and bad status result.
Since 49fd21f32695, exchange can actively swap these parent corrupting existing
changesets and triggering the corruption.
Data corruption are considered critical so backing this out and doing and
unscheduled release seems in order.
Differential Revision: https://phab.mercurial-scm.org/D10995
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Tue, 06 Jul 2021 16:12:09 +0200 |
parents | 3c9208702db3 |
children | d7515d29761d |
line wrap: on
line diff
--- a/mercurial/revlog.py Tue Jul 06 19:22:50 2021 +0200 +++ b/mercurial/revlog.py Tue Jul 06 16:12:09 2021 +0200 @@ -884,10 +884,8 @@ if rev == wdirrev: raise error.WdirUnsupported raise - if entry[5] == nullrev: - return entry[6], entry[5] - else: - return entry[5], entry[6] + + return entry[5], entry[6] # fast parentrevs(rev) where rev isn't filtered _uncheckedparentrevs = parentrevs @@ -908,11 +906,7 @@ def parents(self, node): i = self.index d = i[self.rev(node)] - # inline node() to avoid function call overhead - if d[5] == nullid: - return i[d[6]][7], i[d[5]][7] - else: - return i[d[5]][7], i[d[6]][7] + return i[d[5]][7], i[d[6]][7] # map revisions to nodes inline def chainlen(self, rev): return self._chaininfo(rev)[0]