We already use that fastpath for "null" and nullrev, using it for nullid
is similar.
Details
Details
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Lint Skipped - Unit
Unit Tests Skipped
We already use that fastpath for "null" and nullrev, using it for nullid
is similar.
Lint Skipped |
Unit Tests Skipped |
Path | Packages | |||
---|---|---|---|---|
M | mercurial/localrepo.py (2 lines) |
Commit | Parents | Author | Summary | Date |
---|---|---|---|---|
f9dd42567a31 | 0616944771f6 | Pierre-Yves David | Nov 17 2019, 2:51 AM |
Status | Author | Revision | |
---|---|---|---|
Abandoned | marmoute | ||
Abandoned | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Abandoned | marmoute | ||
Abandoned | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Abandoned | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Abandoned | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Abandoned | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute |
# wdirrev isn't contiguous so the slice shouldn't include it | # wdirrev isn't contiguous so the slice shouldn't include it | ||||
return [ | return [ | ||||
self[i] | self[i] | ||||
for i in pycompat.xrange(*changeid.indices(len(self))) | for i in pycompat.xrange(*changeid.indices(len(self))) | ||||
if i not in self.changelog.filteredrevs | if i not in self.changelog.filteredrevs | ||||
] | ] | ||||
# dealing with some special values | # dealing with some special values | ||||
if changeid == b'null' or changeid == nullrev: | if changeid == b'null' or changeid == nullrev or changeid == nullid: | ||||
return context.changectx(self, nullrev, nullid, False) | return context.changectx(self, nullrev, nullid, False) | ||||
if changeid == b'tip': | if changeid == b'tip': | ||||
node = self.changelog.tip() | node = self.changelog.tip() | ||||
rev = self.changelog.rev(node) | rev = self.changelog.rev(node) | ||||
return context.changectx(self, rev, node) | return context.changectx(self, rev, node) | ||||
# dealing with arbitrary values | # dealing with arbitrary values | ||||
try: | try: |