Mercurial > public > mercurial-scm > hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
12273:e392d00ab5b0 | 12274:c02e1ed3d407 |
---|---|
2355 | 2355 |
2356 See pull for valid source format details. | 2356 See pull for valid source format details. |
2357 | 2357 |
2358 Returns 0 if there are incoming changes, 1 otherwise. | 2358 Returns 0 if there are incoming changes, 1 otherwise. |
2359 """ | 2359 """ |
2360 return hg.incoming(ui, repo, source, opts) | 2360 if opts.get('bundle') and opts.get('subrepos'): |
2361 raise util.Abort(_('cannot combine --bundle and --subrepos')) | |
2362 | |
2363 ret = hg.incoming(ui, repo, source, opts) | |
2364 if opts.get('subrepos'): | |
2365 ctx = repo[None] | |
2366 for subpath in sorted(ctx.substate): | |
2367 sub = ctx.sub(subpath) | |
2368 ret = min(ret, sub.incoming(ui, source, opts)) | |
2369 return ret | |
2361 | 2370 |
2362 def init(ui, dest=".", **opts): | 2371 def init(ui, dest=".", **opts): |
2363 """create a new repository in the given directory | 2372 """create a new repository in the given directory |
2364 | 2373 |
2365 Initialize a new repository in the given directory. If the given | 2374 Initialize a new repository in the given directory. If the given |
4189 _('file to store the bundles into'), _('FILE')), | 4198 _('file to store the bundles into'), _('FILE')), |
4190 ('r', 'rev', [], | 4199 ('r', 'rev', [], |
4191 _('a remote changeset intended to be added'), _('REV')), | 4200 _('a remote changeset intended to be added'), _('REV')), |
4192 ('b', 'branch', [], | 4201 ('b', 'branch', [], |
4193 _('a specific branch you would like to pull'), _('BRANCH')), | 4202 _('a specific branch you would like to pull'), _('BRANCH')), |
4194 ] + logopts + remoteopts, | 4203 ] + logopts + remoteopts + subrepoopts, |
4195 _('[-p] [-n] [-M] [-f] [-r REV]...' | 4204 _('[-p] [-n] [-M] [-f] [-r REV]...' |
4196 ' [--bundle FILENAME] [SOURCE]')), | 4205 ' [--bundle FILENAME] [SOURCE]')), |
4197 "^init": | 4206 "^init": |
4198 (init, | 4207 (init, |
4199 remoteopts, | 4208 remoteopts, |