[Updated] D10995: corruption: backout changeset 49fd21f32695 (issue6528)
marmoute (Pierre-Yves David)
phabricator at mercurial-scm.org
Thu Jul 8 14:37:51 UTC 2021
Closed by commit rHG0e4c5030d4d2: corruption: backout changeset 49fd21f32695 (issue6528) (authored by marmoute).
This revision was automatically updated to reflect the committed changes.
This revision was not accepted when it landed; it landed in state "Needs Review".
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D10995?vs=28886&id=29007
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D10995/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D10995
AFFECTED FILES
mercurial/revlog.py
tests/test-issue6528.t
tests/test-narrow-shallow-merges.t
CHANGE DETAILS
diff --git a/tests/test-narrow-shallow-merges.t b/tests/test-narrow-shallow-merges.t
--- a/tests/test-narrow-shallow-merges.t
+++ b/tests/test-narrow-shallow-merges.t
@@ -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
diff --git a/tests/test-issue6528.t b/tests/test-issue6528.t
--- a/tests/test-issue6528.t
+++ b/tests/test-issue6528.t
@@ -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
diff --git a/mercurial/revlog.py b/mercurial/revlog.py
--- a/mercurial/revlog.py
+++ b/mercurial/revlog.py
@@ -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]
To: marmoute, durin42, #hg-reviewers
Cc: joerg.sonnenberger, mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20210708/4d21179f/attachment-0002.html>
More information about the Mercurial-patches
mailing list