equal
deleted
inserted
replaced
2361 """ |
2361 """ |
2362 if opts.get('bundle') and opts.get('subrepos'): |
2362 if opts.get('bundle') and opts.get('subrepos'): |
2363 raise util.Abort(_('cannot combine --bundle and --subrepos')) |
2363 raise util.Abort(_('cannot combine --bundle and --subrepos')) |
2364 |
2364 |
2365 ret = hg.incoming(ui, repo, source, opts) |
2365 ret = hg.incoming(ui, repo, source, opts) |
2366 if opts.get('subrepos'): |
|
2367 ctx = repo[None] |
|
2368 for subpath in sorted(ctx.substate): |
|
2369 sub = ctx.sub(subpath) |
|
2370 ret = min(ret, sub.incoming(ui, source, opts)) |
|
2371 return ret |
2366 return ret |
2372 |
2367 |
2373 def init(ui, dest=".", **opts): |
2368 def init(ui, dest=".", **opts): |
2374 """create a new repository in the given directory |
2369 """create a new repository in the given directory |
2375 |
2370 |
2628 See pull for details of valid destination formats. |
2623 See pull for details of valid destination formats. |
2629 |
2624 |
2630 Returns 0 if there are outgoing changes, 1 otherwise. |
2625 Returns 0 if there are outgoing changes, 1 otherwise. |
2631 """ |
2626 """ |
2632 ret = hg.outgoing(ui, repo, dest, opts) |
2627 ret = hg.outgoing(ui, repo, dest, opts) |
2633 if opts.get('subrepos'): |
|
2634 ctx = repo[None] |
|
2635 for subpath in sorted(ctx.substate): |
|
2636 sub = ctx.sub(subpath) |
|
2637 ret = min(ret, sub.outgoing(ui, dest, opts)) |
|
2638 return ret |
2628 return ret |
2639 |
2629 |
2640 def parents(ui, repo, file_=None, **opts): |
2630 def parents(ui, repo, file_=None, **opts): |
2641 """show the parents of the working directory or revision |
2631 """show the parents of the working directory or revision |
2642 |
2632 |