comparison mercurial/commands.py @ 31061:77a252f2544d

outgoing: enable pager The structure here is similar to incoming, and requires similar treatment.
author Augie Fackler <augie@google.com>
date Mon, 06 Feb 2017 23:04:44 -0500
parents bcc9d4ebf81b
children 5b85ba3d7d77
comparison
equal deleted inserted replaced
31060:bcc9d4ebf81b 31061:77a252f2544d
3641 3641
3642 Returns 0 if there are outgoing changes, 1 otherwise. 3642 Returns 0 if there are outgoing changes, 1 otherwise.
3643 """ 3643 """
3644 if opts.get('graph'): 3644 if opts.get('graph'):
3645 cmdutil.checkunsupportedgraphflags([], opts) 3645 cmdutil.checkunsupportedgraphflags([], opts)
3646 ui.pager('outgoing')
3646 o, other = hg._outgoing(ui, repo, dest, opts) 3647 o, other = hg._outgoing(ui, repo, dest, opts)
3647 if not o: 3648 if not o:
3648 cmdutil.outgoinghooks(ui, repo, other, opts, o) 3649 cmdutil.outgoinghooks(ui, repo, other, opts, o)
3649 return 3650 return
3650 3651
3659 dest, branches = hg.parseurl(dest, opts.get('branch')) 3660 dest, branches = hg.parseurl(dest, opts.get('branch'))
3660 other = hg.peer(repo, opts, dest) 3661 other = hg.peer(repo, opts, dest)
3661 if 'bookmarks' not in other.listkeys('namespaces'): 3662 if 'bookmarks' not in other.listkeys('namespaces'):
3662 ui.warn(_("remote doesn't support bookmarks\n")) 3663 ui.warn(_("remote doesn't support bookmarks\n"))
3663 return 0 3664 return 0
3665 ui.pager('outgoing')
3664 ui.status(_('comparing with %s\n') % util.hidepassword(dest)) 3666 ui.status(_('comparing with %s\n') % util.hidepassword(dest))
3665 return bookmarks.outgoing(ui, repo, other) 3667 return bookmarks.outgoing(ui, repo, other)
3666 3668
3667 repo._subtoppath = ui.expandpath(dest or 'default-push', dest or 'default') 3669 repo._subtoppath = ui.expandpath(dest or 'default-push', dest or 'default')
3668 try: 3670 try:
3671 ui.pager('outgoing')
3669 return hg.outgoing(ui, repo, dest, opts) 3672 return hg.outgoing(ui, repo, dest, opts)
3670 finally: 3673 finally:
3671 del repo._subtoppath 3674 del repo._subtoppath
3672 3675
3673 @command('parents', 3676 @command('parents',