# HG changeset patch # User Sean Farley # Date 1379732142 18000 # Node ID 8a2637cf1130313c3113673057f81b0687f3601b # Parent 652e07debf10193f4973a48ead96a95e81d0a55b 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. diff -r 652e07debf10 -r 8a2637cf1130 mercurial/context.py --- a/mercurial/context.py Tue May 27 17:41:20 2014 -0700 +++ b/mercurial/context.py Fri Sep 20 21:55:42 2013 -0500 @@ -132,6 +132,9 @@ 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):