##// END OF EJS Templates
localrepo: provide workingctx by integer revision...
Yuya Nishihara -
r25764:22049b56 default
parent child Browse files
Show More
@@ -4,7 +4,7 b''
4 #
4 #
5 # This software may be used and distributed according to the terms of the
5 # This software may be used and distributed according to the terms of the
6 # GNU General Public License version 2 or any later version.
6 # GNU General Public License version 2 or any later version.
7 from node import hex, nullid, short
7 from node import hex, nullid, wdirrev, short
8 from i18n import _
8 from i18n import _
9 import urllib
9 import urllib
10 import peer, changegroup, subrepo, pushkey, obsolete, repoview
10 import peer, changegroup, subrepo, pushkey, obsolete, repoview
@@ -479,7 +479,7 b' class localrepository(object):'
479 return dirstate.dirstate(self.vfs, self.ui, self.root, validate)
479 return dirstate.dirstate(self.vfs, self.ui, self.root, validate)
480
480
481 def __getitem__(self, changeid):
481 def __getitem__(self, changeid):
482 if changeid is None:
482 if changeid is None or changeid == wdirrev:
483 return context.workingctx(self)
483 return context.workingctx(self)
484 if isinstance(changeid, slice):
484 if isinstance(changeid, slice):
485 return [context.changectx(self, i)
485 return [context.changectx(self, i)
General Comments 0
You need to be logged in to leave comments. Login now