Mercurial > public > mercurial-scm > hg
diff mercurial/commands.py @ 12272:42ecd56399d7
outgoing: recurse into subrepositories with --subrepos/-S flag
As with push, the optional destination path is ignored for the
subrepositories, i.e., they are always compared with their default
push path. Fixing this is Issue1852.
author | Martin Geisler <mg@lazybytes.net> |
---|---|
date | Mon, 13 Sep 2010 13:09:26 +0200 |
parents | 01dc8ba3e032 |
children | e392d00ab5b0 |
line wrap: on
line diff
--- a/mercurial/commands.py Mon Sep 13 13:09:24 2010 +0200 +++ b/mercurial/commands.py Mon Sep 13 13:09:26 2010 +0200 @@ -2672,7 +2672,13 @@ Returns 0 if there are outgoing changes, 1 otherwise. """ - return hg.outgoing(ui, repo, dest, opts) + ret = hg.outgoing(ui, repo, dest, opts) + if opts.get('subrepos'): + ctx = repo[None] + for subpath in sorted(ctx.substate): + sub = ctx.sub(subpath) + ret = min(ret, sub.outgoing(ui, dest, opts)) + return ret def parents(ui, repo, file_=None, **opts): """show the parents of the working directory or revision @@ -4311,7 +4317,7 @@ ('n', 'newest-first', None, _('show newest record first')), ('b', 'branch', [], _('a specific branch you would like to push'), _('BRANCH')), - ] + logopts + remoteopts, + ] + logopts + remoteopts + subrepoopts, _('[-M] [-p] [-n] [-f] [-r REV]... [DEST]')), "parents": (parents,