From ede9f80137afb9efa12146830b0c2209491b3e57 Mon Sep 17 00:00:00 2001 From: Sean Farley Date: Fri, 20 Sep 2013 21:55:42 -0500 Subject: [PATCH] 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. --- mercurial/context.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mercurial/context.py b/mercurial/context.py index edc20c70fd..4cfffa708a 100644 --- a/mercurial/context.py +++ b/mercurial/context.py @@ -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):