--- a/mercurial/context.py Tue Jun 16 22:13:19 2015 +0900
+++ b/mercurial/context.py Tue Jun 16 23:03:36 2015 -0400
@@ -249,11 +249,18 @@
return ''
def sub(self, path):
+ '''return a subrepo for the stored revision of path, never wdir()'''
return subrepo.subrepo(self, path)
def nullsub(self, path, pctx):
return subrepo.nullsubrepo(self, path, pctx)
+ def workingsub(self, path):
+ '''return a subrepo for the stored revision, or wdir if this is a wdir
+ context.
+ '''
+ return subrepo.subrepo(self, path, allowwdir=True)
+
def match(self, pats=[], include=None, exclude=None, default='glob',
listsubrepos=False, badfn=None):
r = self._repo