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] |