Mercurial > hg
comparison mercurial/hg.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 | 1ab30e9ba0fc |
comparison
equal
deleted
inserted
replaced
21050:025ec0f08cb6 | 21051:1004d3cd65fd |
---|---|
598 return ret | 598 return ret |
599 | 599 |
600 limit = cmdutil.loglimit(opts) | 600 limit = cmdutil.loglimit(opts) |
601 o, other = _outgoing(ui, repo, dest, opts) | 601 o, other = _outgoing(ui, repo, dest, opts) |
602 if not o: | 602 if not o: |
603 cmdutil.outgoinghooks(ui, repo, other, opts, o) | |
603 return recurse() | 604 return recurse() |
604 | 605 |
605 if opts.get('newest_first'): | 606 if opts.get('newest_first'): |
606 o.reverse() | 607 o.reverse() |
607 displayer = cmdutil.show_changeset(ui, repo, opts) | 608 displayer = cmdutil.show_changeset(ui, repo, opts) |
613 if opts.get('no_merges') and len(parents) == 2: | 614 if opts.get('no_merges') and len(parents) == 2: |
614 continue | 615 continue |
615 count += 1 | 616 count += 1 |
616 displayer.show(repo[n]) | 617 displayer.show(repo[n]) |
617 displayer.close() | 618 displayer.close() |
619 cmdutil.outgoinghooks(ui, repo, other, opts, o) | |
618 recurse() | 620 recurse() |
619 return 0 # exit code is zero since we found outgoing changes | 621 return 0 # exit code is zero since we found outgoing changes |
620 | 622 |
621 def revert(repo, node, choose): | 623 def revert(repo, node, choose): |
622 """revert changes to revision in node without updating dirstate""" | 624 """revert changes to revision in node without updating dirstate""" |