Show More
@@ -2382,6 +2382,16 b' def command(table):' | |||
|
2382 | 2382 | # a list of (ui, repo) functions called by commands.summary |
|
2383 | 2383 | summaryhooks = util.hooks() |
|
2384 | 2384 | |
|
2385 | # a list of (ui, repo, opts, changes) functions called by commands.summary. | |
|
2386 | # | |
|
2387 | # functions should return tuple of booleans below, if 'changes' is None: | |
|
2388 | # (whether-incomings-are-needed, whether-outgoings-are-needed) | |
|
2389 | # | |
|
2390 | # otherwise, 'changes' is a tuple of tuples below: | |
|
2391 | # - (sourceurl, sourcebranch, sourcepeer, incoming) | |
|
2392 | # - (desturl, destbranch, destpeer, outgoing) | |
|
2393 | summaryremotehooks = util.hooks() | |
|
2394 | ||
|
2385 | 2395 | # A list of state files kept by multistep operations like graft. |
|
2386 | 2396 | # Since graft cannot be aborted, it is considered 'clearable' by update. |
|
2387 | 2397 | # note: bisect is intentionally excluded |
@@ -5525,11 +5525,23 b' def summary(ui, repo, **opts):' | |||
|
5525 | 5525 | needsincoming, needsoutgoing = True, True |
|
5526 | 5526 | else: |
|
5527 | 5527 | needsincoming, needsoutgoing = False, False |
|
5528 | for i, o in cmdutil.summaryremotehooks(ui, repo, opts, None): | |
|
5529 | if i: | |
|
5530 | needsincoming = True | |
|
5531 | if o: | |
|
5532 | needsoutgoing = True | |
|
5533 | if not needsincoming and not needsoutgoing: | |
|
5534 | return | |
|
5528 | 5535 | |
|
5529 | 5536 | def getincoming(): |
|
5530 | 5537 | source, branches = hg.parseurl(ui.expandpath('default')) |
|
5531 | 5538 | sbranch = branches[0] |
|
5539 | try: | |
|
5532 | 5540 | other = hg.peer(repo, {}, source) |
|
5541 | except error.RepoError: | |
|
5542 | if opts.get('remote'): | |
|
5543 | raise | |
|
5544 | return source, sbranch, None, None, None | |
|
5533 | 5545 | revs, checkout = hg.addbranchrevs(repo, other, branches, None) |
|
5534 | 5546 | if revs: |
|
5535 | 5547 | revs = [other.lookup(rev) for rev in revs] |
@@ -5549,8 +5561,16 b' def summary(ui, repo, **opts):' | |||
|
5549 | 5561 | dbranch = branches[0] |
|
5550 | 5562 | revs, checkout = hg.addbranchrevs(repo, repo, branches, None) |
|
5551 | 5563 | if source != dest: |
|
5564 | try: | |
|
5552 | 5565 | dother = hg.peer(repo, {}, dest) |
|
5566 | except error.RepoError: | |
|
5567 | if opts.get('remote'): | |
|
5568 | raise | |
|
5569 | return dest, dbranch, None, None | |
|
5553 | 5570 | ui.debug('comparing with %s\n' % util.hidepassword(dest)) |
|
5571 | elif sother is None: | |
|
5572 | # there is no explicit destination peer, but source one is invalid | |
|
5573 | return dest, dbranch, None, None | |
|
5554 | 5574 | else: |
|
5555 | 5575 | dother = sother |
|
5556 | 5576 | if (source != dest or (sbranch is not None and sbranch != dbranch)): |
@@ -5595,6 +5615,10 b' def summary(ui, repo, **opts):' | |||
|
5595 | 5615 | # i18n: column positioning for "hg summary" |
|
5596 | 5616 | ui.status(_('remote: (synced)\n')) |
|
5597 | 5617 | |
|
5618 | cmdutil.summaryremotehooks(ui, repo, opts, | |
|
5619 | ((source, sbranch, sother, commoninc), | |
|
5620 | (dest, dbranch, dother, outgoing))) | |
|
5621 | ||
|
5598 | 5622 | @command('tag', |
|
5599 | 5623 | [('f', 'force', None, _('force tag')), |
|
5600 | 5624 | ('l', 'local', None, _('make the tag local')), |
General Comments 0
You need to be logged in to leave comments.
Login now