mercurial/hg.py
changeset 35928 c8e2d6ed1f9e
parent 35766 72fdd99eb526
child 36041 fcde8946c553
equal deleted inserted replaced
35927:572f36e9a780 35928:c8e2d6ed1f9e
    29     exchange,
    29     exchange,
    30     extensions,
    30     extensions,
    31     httppeer,
    31     httppeer,
    32     localrepo,
    32     localrepo,
    33     lock,
    33     lock,
       
    34     logcmdutil,
    34     logexchange,
    35     logexchange,
    35     merge as mergemod,
    36     merge as mergemod,
    36     node,
    37     node,
    37     phases,
    38     phases,
    38     scmutil,
    39     scmutil,
   883     try:
   884     try:
   884         if not chlist:
   885         if not chlist:
   885             ui.status(_("no changes found\n"))
   886             ui.status(_("no changes found\n"))
   886             return subreporecurse()
   887             return subreporecurse()
   887         ui.pager('incoming')
   888         ui.pager('incoming')
   888         displayer = cmdutil.show_changeset(ui, other, opts, buffered)
   889         displayer = logcmdutil.changesetdisplayer(ui, other, opts, buffered)
   889         displaychlist(other, chlist, displayer)
   890         displaychlist(other, chlist, displayer)
   890         displayer.close()
   891         displayer.close()
   891     finally:
   892     finally:
   892         cleanupfn()
   893         cleanupfn()
   893     subreporecurse()
   894     subreporecurse()
   902                 sub = ctx.sub(subpath)
   903                 sub = ctx.sub(subpath)
   903                 ret = min(ret, sub.incoming(ui, source, opts))
   904                 ret = min(ret, sub.incoming(ui, source, opts))
   904         return ret
   905         return ret
   905 
   906 
   906     def display(other, chlist, displayer):
   907     def display(other, chlist, displayer):
   907         limit = cmdutil.loglimit(opts)
   908         limit = logcmdutil.getlimit(opts)
   908         if opts.get('newest_first'):
   909         if opts.get('newest_first'):
   909             chlist.reverse()
   910             chlist.reverse()
   910         count = 0
   911         count = 0
   911         for n in chlist:
   912         for n in chlist:
   912             if limit is not None and count >= limit:
   913             if limit is not None and count >= limit:
   947             for subpath in sorted(ctx.substate):
   948             for subpath in sorted(ctx.substate):
   948                 sub = ctx.sub(subpath)
   949                 sub = ctx.sub(subpath)
   949                 ret = min(ret, sub.outgoing(ui, dest, opts))
   950                 ret = min(ret, sub.outgoing(ui, dest, opts))
   950         return ret
   951         return ret
   951 
   952 
   952     limit = cmdutil.loglimit(opts)
   953     limit = logcmdutil.getlimit(opts)
   953     o, other = _outgoing(ui, repo, dest, opts)
   954     o, other = _outgoing(ui, repo, dest, opts)
   954     if not o:
   955     if not o:
   955         cmdutil.outgoinghooks(ui, repo, other, opts, o)
   956         cmdutil.outgoinghooks(ui, repo, other, opts, o)
   956         return recurse()
   957         return recurse()
   957 
   958 
   958     if opts.get('newest_first'):
   959     if opts.get('newest_first'):
   959         o.reverse()
   960         o.reverse()
   960     ui.pager('outgoing')
   961     ui.pager('outgoing')
   961     displayer = cmdutil.show_changeset(ui, repo, opts)
   962     displayer = logcmdutil.changesetdisplayer(ui, repo, opts)
   962     count = 0
   963     count = 0
   963     for n in o:
   964     for n in o:
   964         if limit is not None and count >= limit:
   965         if limit is not None and count >= limit:
   965             break
   966             break
   966         parents = [p for p in repo.changelog.parents(n) if p != nullid]
   967         parents = [p for p in repo.changelog.parents(n) if p != nullid]