Read about our upcoming Code of Conduct on this issue

Commit 36cb4b2f authored by Pierre-Yves David's avatar Pierre-Yves David 🐙
Browse files

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

--HG--
branch : stable
parent bd0a2a919bf8
Pipeline #24141 passed with stages
in 35 minutes and 28 seconds
......@@ -884,10 +884,8 @@ class revlog(object):
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 @@ class revlog(object):
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]
......
......@@ -126,10 +126,8 @@ Status is buggy, even with debugrebuilddirstate
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 @@ marker that some metadata are present and should be fetched.
$ 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
......
......@@ -179,7 +179,7 @@ has been emitted, just in a different order.
$ 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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment