Show More
@@ -1515,10 +1515,13 b' class localrepository(object):' | |||||
1515 | self.invalidate(clearfilecache=True) |
|
1515 | self.invalidate(clearfilecache=True) | |
1516 |
|
1516 | |||
1517 | def __getitem__(self, changeid): |
|
1517 | def __getitem__(self, changeid): | |
|
1518 | # dealing with special cases | |||
1518 | if changeid is None: |
|
1519 | if changeid is None: | |
1519 | return context.workingctx(self) |
|
1520 | return context.workingctx(self) | |
1520 | if isinstance(changeid, context.basectx): |
|
1521 | if isinstance(changeid, context.basectx): | |
1521 | return changeid |
|
1522 | return changeid | |
|
1523 | ||||
|
1524 | # dealing with multiple revisions | |||
1522 | if isinstance(changeid, slice): |
|
1525 | if isinstance(changeid, slice): | |
1523 | # wdirrev isn't contiguous so the slice shouldn't include it |
|
1526 | # wdirrev isn't contiguous so the slice shouldn't include it | |
1524 | return [ |
|
1527 | return [ | |
@@ -1526,6 +1529,8 b' class localrepository(object):' | |||||
1526 | for i in pycompat.xrange(*changeid.indices(len(self))) |
|
1529 | for i in pycompat.xrange(*changeid.indices(len(self))) | |
1527 | if i not in self.changelog.filteredrevs |
|
1530 | if i not in self.changelog.filteredrevs | |
1528 | ] |
|
1531 | ] | |
|
1532 | ||||
|
1533 | # dealing with arbitrary values | |||
1529 | try: |
|
1534 | try: | |
1530 | if isinstance(changeid, int): |
|
1535 | if isinstance(changeid, int): | |
1531 | node = self.changelog.node(changeid) |
|
1536 | node = self.changelog.node(changeid) |
General Comments 0
You need to be logged in to leave comments.
Login now