Show More
@@ -18,7 +18,7 b' from mercurial.commands import templateo' | |||
|
18 | 18 | from mercurial.i18n import _ |
|
19 | 19 | from mercurial.node import nullrev |
|
20 | 20 | from mercurial import cmdutil, commands, extensions |
|
21 |
from mercurial import hg, |
|
|
21 | from mercurial import hg, util, graphmod | |
|
22 | 22 | |
|
23 | 23 | ASCIIDATA = 'ASC' |
|
24 | 24 | |
@@ -280,19 +280,10 b' def goutgoing(ui, repo, dest=None, **opt' | |||
|
280 | 280 | """ |
|
281 | 281 | |
|
282 | 282 | check_unsupported_flags(opts) |
|
283 | dest = ui.expandpath(dest or 'default-push', dest or 'default') | |
|
284 | dest, branches = hg.parseurl(dest, opts.get('branch')) | |
|
285 | revs, checkout = hg.addbranchrevs(repo, repo, branches, opts.get('rev')) | |
|
286 | other = hg.repository(hg.remoteui(ui, opts), dest) | |
|
287 | if revs: | |
|
288 | revs = [repo.lookup(rev) for rev in revs] | |
|
289 | ui.status(_('comparing with %s\n') % url.hidepassword(dest)) | |
|
290 | o = discovery.findoutgoing(repo, other, force=opts.get('force')) | |
|
291 | if not o: | |
|
292 | ui.status(_("no changes found\n")) | |
|
283 | o = hg._outgoing(ui, repo, dest, opts) | |
|
284 | if o is None: | |
|
293 | 285 | return |
|
294 | 286 | |
|
295 | o = repo.changelog.nodesbetween(o, revs)[0] | |
|
296 | 287 | revdag = graphrevs(repo, o, opts) |
|
297 | 288 | displayer = show_changeset(ui, repo, opts, buffered=True) |
|
298 | 289 | showparents = [ctx.node() for ctx in repo[None].parents()] |
@@ -471,6 +471,22 b' def incoming(ui, repo, source, opts):' | |||
|
471 | 471 | displayer.show(other[n]) |
|
472 | 472 | return _incoming(display, subreporecurse, ui, repo, source, opts) |
|
473 | 473 | |
|
474 | def _outgoing(ui, repo, dest, opts): | |
|
475 | dest = ui.expandpath(dest or 'default-push', dest or 'default') | |
|
476 | dest, branches = parseurl(dest, opts.get('branch')) | |
|
477 | revs, checkout = addbranchrevs(repo, repo, branches, opts.get('rev')) | |
|
478 | if revs: | |
|
479 | revs = [repo.lookup(rev) for rev in revs] | |
|
480 | ||
|
481 | other = repository(remoteui(repo, opts), dest) | |
|
482 | ui.status(_('comparing with %s\n') % url.hidepassword(dest)) | |
|
483 | o = discovery.findoutgoing(repo, other, force=opts.get('force')) | |
|
484 | if not o: | |
|
485 | ui.status(_("no changes found\n")) | |
|
486 | return None | |
|
487 | ||
|
488 | return repo.changelog.nodesbetween(o, revs)[0] | |
|
489 | ||
|
474 | 490 | def outgoing(ui, repo, dest, opts): |
|
475 | 491 | def recurse(): |
|
476 | 492 | ret = 1 |
@@ -482,20 +498,10 b' def outgoing(ui, repo, dest, opts):' | |||
|
482 | 498 | return ret |
|
483 | 499 | |
|
484 | 500 | limit = cmdutil.loglimit(opts) |
|
485 | dest = ui.expandpath(dest or 'default-push', dest or 'default') | |
|
486 | dest, branches = parseurl(dest, opts.get('branch')) | |
|
487 | revs, checkout = addbranchrevs(repo, repo, branches, opts.get('rev')) | |
|
488 | if revs: | |
|
489 | revs = [repo.lookup(rev) for rev in revs] | |
|
490 | ||
|
491 | other = repository(remoteui(repo, opts), dest) | |
|
492 | ui.status(_('comparing with %s\n') % url.hidepassword(dest)) | |
|
493 | o = discovery.findoutgoing(repo, other, force=opts.get('force')) | |
|
494 | if not o: | |
|
495 | ui.status(_("no changes found\n")) | |
|
501 | o = _outgoing(ui, repo, dest, opts) | |
|
502 | if o is None: | |
|
496 | 503 | return recurse() |
|
497 | 504 | |
|
498 | o = repo.changelog.nodesbetween(o, revs)[0] | |
|
499 | 505 | if opts.get('newest_first'): |
|
500 | 506 | o.reverse() |
|
501 | 507 | displayer = cmdutil.show_changeset(ui, repo, opts) |
General Comments 0
You need to be logged in to leave comments.
Login now