Mercurial > public > mercurial-scm > hg
comparison mercurial/revlog.py @ 51062:14574a41a7a7
revlog: remove legacy usage of `canonical_parent_order`
All core code is now getting the setting from the FeatureConfig object.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Tue, 10 Oct 2023 11:36:34 +0200 |
parents | 81f3877372c3 |
children | b79c73a7afce |
comparison
equal
deleted
inserted
replaced
51061:81f3877372c3 | 51062:14574a41a7a7 |
---|---|
1221 except IndexError: | 1221 except IndexError: |
1222 if rev == wdirrev: | 1222 if rev == wdirrev: |
1223 raise error.WdirUnsupported | 1223 raise error.WdirUnsupported |
1224 raise | 1224 raise |
1225 | 1225 |
1226 if self.canonical_parent_order and entry[5] == nullrev: | 1226 if self.feature_config.canonical_parent_order and entry[5] == nullrev: |
1227 return entry[6], entry[5] | 1227 return entry[6], entry[5] |
1228 else: | 1228 else: |
1229 return entry[5], entry[6] | 1229 return entry[5], entry[6] |
1230 | 1230 |
1231 # fast parentrevs(rev) where rev isn't filtered | 1231 # fast parentrevs(rev) where rev isn't filtered |
1246 | 1246 |
1247 def parents(self, node): | 1247 def parents(self, node): |
1248 i = self.index | 1248 i = self.index |
1249 d = i[self.rev(node)] | 1249 d = i[self.rev(node)] |
1250 # inline node() to avoid function call overhead | 1250 # inline node() to avoid function call overhead |
1251 if self.canonical_parent_order and d[5] == self.nullid: | 1251 if self.feature_config.canonical_parent_order and d[5] == self.nullid: |
1252 return i[d[6]][7], i[d[5]][7] | 1252 return i[d[6]][7], i[d[5]][7] |
1253 else: | 1253 else: |
1254 return i[d[5]][7], i[d[6]][7] | 1254 return i[d[5]][7], i[d[6]][7] |
1255 | 1255 |
1256 def chainlen(self, rev): | 1256 def chainlen(self, rev): |