Mercurial > public > mercurial-scm > hg-stable
diff mercurial/subrepo.py @ 15410:9e99d2bbb1b1
add: support adding explicit files in subrepos
Change the behavior of the add command such that explicit paths in
subrepos are always added. This eliminates the previous behavior
where if you called "hg add" for an explicit path in a subrepo
without specifying the -S option, it would be silently ignored.
If you specify patterns, or no arguments at all, the -S option
will still be needed to activate recursion into subrepos.
author | David M. Carr <david@carrclan.us> |
---|---|
date | Wed, 02 Nov 2011 01:17:11 -0400 |
parents | b3e19c355ca7 |
children | 95174c381525 |
line wrap: on
line diff
--- a/mercurial/subrepo.py Tue Nov 01 23:53:29 2011 -0400 +++ b/mercurial/subrepo.py Wed Nov 02 01:17:11 2011 -0400 @@ -353,6 +353,12 @@ unit=_('files'), total=total) ui.progress(_('archiving (%s)') % relpath, None) + def walk(self, match): + ''' + walk recursively through the directory tree, finding all files + matched by the match function + ''' + pass class hgsubrepo(abstractsubrepo): def __init__(self, ctx, path, state): @@ -543,6 +549,9 @@ ctx = self._repo[rev] return ctx.flags(name) + def walk(self, match): + ctx = self._repo[None] + return ctx.walk(match) class svnsubrepo(abstractsubrepo): def __init__(self, ctx, path, state):