def outgoing(ui, repo, dest, opts): def recurse(): ret = 1 if opts.get('subrepos'): ctx = repo[None] for subpath in sorted(ctx.substate): sub = ctx.sub(subpath) ret = min(ret, sub.outgoing(ui, dest, opts)) return ret limit = cmdutil.loglimit(opts) o, other = _outgoing(ui, repo, dest, opts) if not o: cmdutil.outgoinghooks(ui, repo, other, opts, o) return recurse() if opts.get('newest_first'): o.reverse() displayer = cmdutil.show_changeset(ui, repo, opts) count = 0 for n in o: if limit is not None and count >= limit: break parents = [p for p in repo.changelog.parents(n) if p != nullid] if opts.get('no_merges') and len(parents) == 2: continue count += 1 displayer.show(repo[n]) displayer.close() cmdutil.outgoinghooks(ui, repo, other, opts, o) recurse() return 0 # exit code is zero since we found outgoing changes
def outgoing(ui, repo, dest, opts): def recurse(): ret = 1 if opts.get('subrepos'): ctx = repo[None] for subpath in sorted(ctx.substate): sub = ctx.sub(subpath) ret = min(ret, sub.outgoing(ui, dest, opts)) return ret limit = cmdutil.loglimit(opts) o = _outgoing(ui, repo, dest, opts) if o is None: return recurse() if opts.get('newest_first'): o.reverse() displayer = cmdutil.show_changeset(ui, repo, opts) count = 0 for n in o: if limit is not None and count >= limit: break parents = [p for p in repo.changelog.parents(n) if p != nullid] if opts.get('no_merges') and len(parents) == 2: continue count += 1 displayer.show(repo[n]) displayer.close() recurse() return 0 # exit code is zero since we found outgoing changes
def display(other, chlist, displayer): limit = cmdutil.loglimit(opts) if opts.get('newest_first'): chlist.reverse() count = 0 for n in chlist: if limit is not None and count >= limit: break parents = [p for p in other.changelog.parents(n) if p != nullid] if opts.get('no_merges') and len(parents) == 2: continue count += 1 displayer.show(other[n])