comparison 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
comparison
equal deleted inserted replaced
12271:01dc8ba3e032 12272:42ecd56399d7
2670 2670
2671 See pull for details of valid destination formats. 2671 See pull for details of valid destination formats.
2672 2672
2673 Returns 0 if there are outgoing changes, 1 otherwise. 2673 Returns 0 if there are outgoing changes, 1 otherwise.
2674 """ 2674 """
2675 return hg.outgoing(ui, repo, dest, opts) 2675 ret = hg.outgoing(ui, repo, dest, opts)
2676 if opts.get('subrepos'):
2677 ctx = repo[None]
2678 for subpath in sorted(ctx.substate):
2679 sub = ctx.sub(subpath)
2680 ret = min(ret, sub.outgoing(ui, dest, opts))
2681 return ret
2676 2682
2677 def parents(ui, repo, file_=None, **opts): 2683 def parents(ui, repo, file_=None, **opts):
2678 """show the parents of the working directory or revision 2684 """show the parents of the working directory or revision
2679 2685
2680 Print the working directory's parent revisions. If a revision is 2686 Print the working directory's parent revisions. If a revision is
4309 _('a changeset intended to be included in the destination'), 4315 _('a changeset intended to be included in the destination'),
4310 _('REV')), 4316 _('REV')),
4311 ('n', 'newest-first', None, _('show newest record first')), 4317 ('n', 'newest-first', None, _('show newest record first')),
4312 ('b', 'branch', [], 4318 ('b', 'branch', [],
4313 _('a specific branch you would like to push'), _('BRANCH')), 4319 _('a specific branch you would like to push'), _('BRANCH')),
4314 ] + logopts + remoteopts, 4320 ] + logopts + remoteopts + subrepoopts,
4315 _('[-M] [-p] [-n] [-f] [-r REV]... [DEST]')), 4321 _('[-M] [-p] [-n] [-f] [-r REV]... [DEST]')),
4316 "parents": 4322 "parents":
4317 (parents, 4323 (parents,
4318 [('r', 'rev', '', 4324 [('r', 'rev', '',
4319 _('show parents of the specified revision'), _('REV')), 4325 _('show parents of the specified revision'), _('REV')),