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