Mercurial > hg
comparison mercurial/revlog.py @ 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 | 3c9208702db3 |
children | d7515d29761d |
comparison
equal
deleted
inserted
replaced
47503:bd0a2a919bf8 | 47504:411dc27fd9fd |
---|---|
882 entry = self.index[rev] | 882 entry = self.index[rev] |
883 except IndexError: | 883 except IndexError: |
884 if rev == wdirrev: | 884 if rev == wdirrev: |
885 raise error.WdirUnsupported | 885 raise error.WdirUnsupported |
886 raise | 886 raise |
887 if entry[5] == nullrev: | 887 |
888 return entry[6], entry[5] | 888 return entry[5], entry[6] |
889 else: | |
890 return entry[5], entry[6] | |
891 | 889 |
892 # fast parentrevs(rev) where rev isn't filtered | 890 # fast parentrevs(rev) where rev isn't filtered |
893 _uncheckedparentrevs = parentrevs | 891 _uncheckedparentrevs = parentrevs |
894 | 892 |
895 def node(self, rev): | 893 def node(self, rev): |
906 return self.start(rev) + self.length(rev) | 904 return self.start(rev) + self.length(rev) |
907 | 905 |
908 def parents(self, node): | 906 def parents(self, node): |
909 i = self.index | 907 i = self.index |
910 d = i[self.rev(node)] | 908 d = i[self.rev(node)] |
911 # inline node() to avoid function call overhead | 909 return i[d[5]][7], i[d[6]][7] # map revisions to nodes inline |
912 if d[5] == nullid: | |
913 return i[d[6]][7], i[d[5]][7] | |
914 else: | |
915 return i[d[5]][7], i[d[6]][7] | |
916 | 910 |
917 def chainlen(self, rev): | 911 def chainlen(self, rev): |
918 return self._chaininfo(rev)[0] | 912 return self._chaininfo(rev)[0] |
919 | 913 |
920 def _chaininfo(self, rev): | 914 def _chaininfo(self, rev): |