Mercurial > public > mercurial-scm > hg
diff mercurial/commands.py @ 12274:c02e1ed3d407
incoming: recurse into subrepositories with --subrepos/-S flag
As with push and outgoing, the optional source path is ignored for the
subrepositories. Fixing this is Issue1852.
author | Martin Geisler <mg@lazybytes.net> |
---|---|
date | Mon, 13 Sep 2010 13:09:31 +0200 |
parents | e392d00ab5b0 |
children | f00953d9533c |
line wrap: on
line diff
--- a/mercurial/commands.py Mon Sep 13 13:09:30 2010 +0200 +++ b/mercurial/commands.py Mon Sep 13 13:09:31 2010 +0200 @@ -2357,7 +2357,16 @@ Returns 0 if there are incoming changes, 1 otherwise. """ - return hg.incoming(ui, repo, source, opts) + if opts.get('bundle') and opts.get('subrepos'): + raise util.Abort(_('cannot combine --bundle and --subrepos')) + + ret = hg.incoming(ui, repo, source, opts) + if opts.get('subrepos'): + ctx = repo[None] + for subpath in sorted(ctx.substate): + sub = ctx.sub(subpath) + ret = min(ret, sub.incoming(ui, source, opts)) + return ret def init(ui, dest=".", **opts): """create a new repository in the given directory @@ -4191,7 +4200,7 @@ _('a remote changeset intended to be added'), _('REV')), ('b', 'branch', [], _('a specific branch you would like to pull'), _('BRANCH')), - ] + logopts + remoteopts, + ] + logopts + remoteopts + subrepoopts, _('[-p] [-n] [-M] [-f] [-r REV]...' ' [--bundle FILENAME] [SOURCE]')), "^init":