Mercurial > public > mercurial-scm > hg
comparison mercurial/commands.py @ 21051:1004d3cd65fd
outgoing: introduce "outgoinghooks" to avoid redundant outgoing check
This patch introduces "outgoinghooks" to avoid redundant outgoing
check for "hg outgoing" in other than "commands.outgoing" (or utility
functions used by it).
author | FUJIWARA Katsunori <foozy@lares.dti.ne.jp> |
---|---|
date | Wed, 16 Apr 2014 00:37:24 +0900 |
parents | 025ec0f08cb6 |
children | 7ca4f2049d3b |
comparison
equal
deleted
inserted
replaced
21050:025ec0f08cb6 | 21051:1004d3cd65fd |
---|---|
4353 """ | 4353 """ |
4354 if opts.get('graph'): | 4354 if opts.get('graph'): |
4355 cmdutil.checkunsupportedgraphflags([], opts) | 4355 cmdutil.checkunsupportedgraphflags([], opts) |
4356 o, other = hg._outgoing(ui, repo, dest, opts) | 4356 o, other = hg._outgoing(ui, repo, dest, opts) |
4357 if not o: | 4357 if not o: |
4358 cmdutil.outgoinghooks(ui, repo, other, opts, o) | |
4358 return | 4359 return |
4359 | 4360 |
4360 revdag = cmdutil.graphrevs(repo, o, opts) | 4361 revdag = cmdutil.graphrevs(repo, o, opts) |
4361 displayer = cmdutil.show_changeset(ui, repo, opts, buffered=True) | 4362 displayer = cmdutil.show_changeset(ui, repo, opts, buffered=True) |
4362 showparents = [ctx.node() for ctx in repo[None].parents()] | 4363 showparents = [ctx.node() for ctx in repo[None].parents()] |
4363 cmdutil.displaygraph(ui, revdag, displayer, showparents, | 4364 cmdutil.displaygraph(ui, revdag, displayer, showparents, |
4364 graphmod.asciiedges) | 4365 graphmod.asciiedges) |
4366 cmdutil.outgoinghooks(ui, repo, other, opts, o) | |
4365 return 0 | 4367 return 0 |
4366 | 4368 |
4367 if opts.get('bookmarks'): | 4369 if opts.get('bookmarks'): |
4368 dest = ui.expandpath(dest or 'default-push', dest or 'default') | 4370 dest = ui.expandpath(dest or 'default-push', dest or 'default') |
4369 dest, branches = hg.parseurl(dest, opts.get('branch')) | 4371 dest, branches = hg.parseurl(dest, opts.get('branch')) |