<span style="font-family:Prelude, Verdana, san-serif;">I'm fine with a fix inflight<br><br></span><span style="color:navy; font-family:Prelude, Verdana, san-serif; "><hr align="left" style="width:75%">On Jun 17, 2015 10:45 AM, Yuya Nishihara <yuya@tcha.org> wrote:<br></span>On Tue, 16 Jun 2015 23:39:22 -0400, Matt Harbison wrote: <br>> # HG changeset patch <br>> # User Matt Harbison <matt_harbison@yahoo.com> <br>> # Date 1434510216 14400 <br>> #      Tue Jun 16 23:03:36 2015 -0400 <br>> # Node ID ba8fc81a1f23ec0d763aa59f78745d06bb648be2 <br>> # Parent  f1d46075b13a90671c14b2737b1d4f07a3fa1a4a <br>> subrepo: allow a representation of the working directory subrepo <br>>  <br>> Some code cannot handle a subrepo based on the working directory (e.g. <br>> sub.dirty()), so the caller must opt in.  This will be useful for archive, and <br>> perhaps some other commands.  The git and svn methods where this is used may <br>> need to be fixed up on a case by case basis. <br>>  <br>> diff --git a/mercurial/context.py b/mercurial/context.py <br>> --- a/mercurial/context.py <br>> +++ b/mercurial/context.py <br>> @@ -249,11 +249,18 @@ <br>>              return '' <br>>   <br>>      def sub(self, path): <br>> +        '''return a subrepo for the stored revision of path, never wdir()''' <br>>          return subrepo.subrepo(self, path) <br>>   <br>>      def nullsub(self, path, pctx): <br>>          return subrepo.nullsubrepo(self, path, pctx) <br>>   <br>> +    def workingsub(self, path): <br>> +        '''return a subrepo for the stored revision, or wdir if this is a wdir <br>> +        context. <br>> +        ''' <br>> +        return subrepo.subrepo(self, path, True) <br> <br>Nitpick. 'allowwdir=True' would be readable here than just 'True'. <br>