##// END OF EJS Templates
localrepo: extract handling of some special value in __getitem__...
marmoute -
r44190:6237cb11 default
parent child Browse files
Show More
@@ -1530,14 +1530,14 b' class localrepository(object):'
1530 if i not in self.changelog.filteredrevs
1530 if i not in self.changelog.filteredrevs
1531 ]
1531 ]
1532
1532
1533 # dealing with some special values
1534 if changeid == b'null':
1535 return context.changectx(self, nullrev, nullid)
1533 # dealing with arbitrary values
1536 # dealing with arbitrary values
1534 try:
1537 try:
1535 if isinstance(changeid, int):
1538 if isinstance(changeid, int):
1536 node = self.changelog.node(changeid)
1539 node = self.changelog.node(changeid)
1537 rev = changeid
1540 rev = changeid
1538 elif changeid == b'null':
1539 node = nullid
1540 rev = nullrev
1541 elif changeid == b'tip':
1541 elif changeid == b'tip':
1542 node = self.changelog.tip()
1542 node = self.changelog.tip()
1543 rev = self.changelog.rev(node)
1543 rev = self.changelog.rev(node)
General Comments 0
You need to be logged in to leave comments. Login now