Show More
@@ -2363,11 +2363,6 b' def incoming(ui, repo, source="default",' | |||||
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): | |
@@ -2630,11 +2625,6 b' def outgoing(ui, repo, dest=None, **opts' | |||||
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): |
@@ -409,6 +409,15 b' def merge(repo, node, force=None, remind' | |||||
409 | return stats[3] > 0 |
|
409 | return stats[3] > 0 | |
410 |
|
410 | |||
411 | def incoming(ui, repo, source, opts): |
|
411 | def incoming(ui, repo, source, opts): | |
|
412 | def recurse(): | |||
|
413 | ret = 1 | |||
|
414 | if opts.get('subrepos'): | |||
|
415 | ctx = repo[None] | |||
|
416 | for subpath in sorted(ctx.substate): | |||
|
417 | sub = ctx.sub(subpath) | |||
|
418 | ret = min(ret, sub.incoming(ui, source, opts)) | |||
|
419 | return ret | |||
|
420 | ||||
412 | limit = cmdutil.loglimit(opts) |
|
421 | limit = cmdutil.loglimit(opts) | |
413 | source, branches = parseurl(ui.expandpath(source), opts.get('branch')) |
|
422 | source, branches = parseurl(ui.expandpath(source), opts.get('branch')) | |
414 | other = repository(remoteui(repo, opts), source) |
|
423 | other = repository(remoteui(repo, opts), source) | |
@@ -426,7 +435,7 b' def incoming(ui, repo, source, opts):' | |||||
426 | except: |
|
435 | except: | |
427 | pass |
|
436 | pass | |
428 | ui.status(_("no changes found\n")) |
|
437 | ui.status(_("no changes found\n")) | |
429 |
return |
|
438 | return recurse() | |
430 |
|
439 | |||
431 | cleanup = None |
|
440 | cleanup = None | |
432 | try: |
|
441 | try: | |
@@ -469,8 +478,19 b' def incoming(ui, repo, source, opts):' | |||||
469 | other.close() |
|
478 | other.close() | |
470 | if cleanup: |
|
479 | if cleanup: | |
471 | os.unlink(cleanup) |
|
480 | os.unlink(cleanup) | |
|
481 | recurse() | |||
|
482 | return 0 # exit code is zero since we found incoming changes | |||
472 |
|
483 | |||
473 | def outgoing(ui, repo, dest, opts): |
|
484 | def outgoing(ui, repo, dest, opts): | |
|
485 | def recurse(): | |||
|
486 | ret = 1 | |||
|
487 | if opts.get('subrepos'): | |||
|
488 | ctx = repo[None] | |||
|
489 | for subpath in sorted(ctx.substate): | |||
|
490 | sub = ctx.sub(subpath) | |||
|
491 | ret = min(ret, sub.outgoing(ui, dest, opts)) | |||
|
492 | return ret | |||
|
493 | ||||
474 | limit = cmdutil.loglimit(opts) |
|
494 | limit = cmdutil.loglimit(opts) | |
475 | dest = ui.expandpath(dest or 'default-push', dest or 'default') |
|
495 | dest = ui.expandpath(dest or 'default-push', dest or 'default') | |
476 | dest, branches = parseurl(dest, opts.get('branch')) |
|
496 | dest, branches = parseurl(dest, opts.get('branch')) | |
@@ -483,7 +503,8 b' def outgoing(ui, repo, dest, opts):' | |||||
483 | o = discovery.findoutgoing(repo, other, force=opts.get('force')) |
|
503 | o = discovery.findoutgoing(repo, other, force=opts.get('force')) | |
484 | if not o: |
|
504 | if not o: | |
485 | ui.status(_("no changes found\n")) |
|
505 | ui.status(_("no changes found\n")) | |
486 |
return |
|
506 | return recurse() | |
|
507 | ||||
487 | o = repo.changelog.nodesbetween(o, revs)[0] |
|
508 | o = repo.changelog.nodesbetween(o, revs)[0] | |
488 | if opts.get('newest_first'): |
|
509 | if opts.get('newest_first'): | |
489 | o.reverse() |
|
510 | o.reverse() | |
@@ -498,6 +519,8 b' def outgoing(ui, repo, dest, opts):' | |||||
498 | count += 1 |
|
519 | count += 1 | |
499 | displayer.show(repo[n]) |
|
520 | displayer.show(repo[n]) | |
500 | displayer.close() |
|
521 | displayer.close() | |
|
522 | recurse() | |||
|
523 | return 0 # exit code is zero since we found outgoing changes | |||
501 |
|
524 | |||
502 | def revert(repo, node, choose): |
|
525 | def revert(repo, node, choose): | |
503 | """revert changes to revision in node without updating dirstate""" |
|
526 | """revert changes to revision in node without updating dirstate""" |
@@ -273,6 +273,9 b' Clone and test outgoing:' | |||||
273 | comparing with */test-subrepo-recursion.t/repo/foo (glob) |
|
273 | comparing with */test-subrepo-recursion.t/repo/foo (glob) | |
274 | searching for changes |
|
274 | searching for changes | |
275 | no changes found |
|
275 | no changes found | |
|
276 | comparing with */test-subrepo-recursion.t/repo/foo/bar (glob) | |||
|
277 | searching for changes | |||
|
278 | no changes found | |||
276 | [1] |
|
279 | [1] | |
277 |
|
280 | |||
278 | Make nested change: |
|
281 | Make nested change: | |
@@ -306,6 +309,9 b' Make nested change:' | |||||
306 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
309 | date: Thu Jan 01 00:00:00 1970 +0000 | |
307 | summary: 3-4-2 |
|
310 | summary: 3-4-2 | |
308 |
|
311 | |||
|
312 | comparing with */test-subrepo-recursion.t/repo/foo/bar (glob) | |||
|
313 | searching for changes | |||
|
314 | no changes found | |||
309 |
|
315 | |||
310 | Switch to original repo and setup default path: |
|
316 | Switch to original repo and setup default path: | |
311 |
|
317 | |||
@@ -332,6 +338,10 b' Test incoming:' | |||||
332 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
338 | date: Thu Jan 01 00:00:00 1970 +0000 | |
333 | summary: 3-4-2 |
|
339 | summary: 3-4-2 | |
334 |
|
340 | |||
|
341 | comparing with */test-subrepo-recursion.t/repo2/foo/bar (glob) | |||
|
342 | searching for changes | |||
|
343 | no changes found | |||
|
344 | ||||
335 | $ hg incoming -S --bundle incoming.hg |
|
345 | $ hg incoming -S --bundle incoming.hg | |
336 | abort: cannot combine --bundle and --subrepos |
|
346 | abort: cannot combine --bundle and --subrepos | |
337 | [255] |
|
347 | [255] |
General Comments 0
You need to be logged in to leave comments.
Login now