Mercurial > hg
changeset 47504: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 | bd0a2a919bf8 |
children | ce12b3a54028 |
files | mercurial/revlog.py tests/test-issue6528.t tests/test-narrow-shallow-merges.t |
diffstat | 3 files changed, 5 insertions(+), 14 deletions(-) [+] |
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]
--- a/tests/test-issue6528.t Tue Jul 06 19:22:50 2021 +0200 +++ b/tests/test-issue6528.t Tue Jul 06 16:12:09 2021 +0200 @@ -126,10 +126,8 @@ 5 bar $ hg status - M b.txt (known-bad-output !) $ hg debugrebuilddirstate $ hg status - M b.txt (known-bad-output !) the history was altered @@ -139,8 +137,7 @@ $ hg debugrevlogindex b.txt rev linkrev nodeid p1 p2 0 2 05b806ebe5ea 000000000000 000000000000 - 1 3 a58b36ad6b65 05b806ebe5ea 000000000000 (known-bad-output !) - 1 3 a58b36ad6b65 000000000000 05b806ebe5ea (missing-correct-output !) + 1 3 a58b36ad6b65 000000000000 05b806ebe5ea Check commit Graph
--- a/tests/test-narrow-shallow-merges.t Tue Jul 06 19:22:50 2021 +0200 +++ b/tests/test-narrow-shallow-merges.t Tue Jul 06 16:12:09 2021 +0200 @@ -179,7 +179,7 @@ $ hg log -T '{if(ellipsis,"...")}{node|short} {p1node|short} {p2node|short} {desc}\n' | sort - ...2a20009de83e 3ac1f5779de3 000000000000 outside 10 + ...2a20009de83e 000000000000 3ac1f5779de3 outside 10 ...3ac1f5779de3 bb96a08b062a 465567bdfb2d merge a/b/c/d 9 ...8d874d57adea 7ef88b4dd4fa 000000000000 outside 12 ...b844052e7b3b 000000000000 000000000000 outside 2c