basectx: add subrev method to return the rev of a subrepo given a subpath

This will be used in an upcoming patch to simplify the status method by
eliminating an if block.
This commit is contained in:
Sean Farley 2013-09-20 21:55:42 -05:00
parent 95a0ecfb91
commit ede9f80137

View File

@ -132,6 +132,9 @@ class basectx(object):
def substate(self):
return subrepo.state(self, self._repo.ui)
def subrev(self, subpath):
return self.substate[subpath][1]
def rev(self):
return self._rev
def node(self):