def _incoming(displaychlist, subreporecurse, ui, repo, source, opts, buffered=False): """ Helper for incoming / gincoming. displaychlist gets called with (remoterepo, incomingchangesetlist, displayer) parameters, and is supposed to contain only code that can't be unified. """ source, branches = parseurl(ui.expandpath(source), opts.get('branch')) other = peer(repo, opts, source) ui.status(_('comparing with %s\n') % util.hidepassword(source)) revs, checkout = addbranchrevs(repo, other, branches, opts.get('rev')) if revs: revs = [other.lookup(rev) for rev in revs] other, chlist, cleanupfn = bundlerepo.getremotechanges(ui, repo, other, revs, opts["bundle"], opts["force"]) try: if not chlist: ui.status(_("no changes found\n")) return subreporecurse() displayer = cmdutil.show_changeset(ui, other, opts, buffered) # XXX once graphlog extension makes it into core, # should be replaced by a if graph/else displaychlist(other, chlist, displayer) displayer.close() finally: cleanupfn() subreporecurse() return 0 # exit code is zero since we found incoming changes
def _incoming(displaychlist, subreporecurse, ui, repo, source, opts, buffered=False): """ Helper for incoming / gincoming. displaychlist gets called with (remoterepo, incomingchangesetlist, displayer) parameters, and is supposed to contain only code that can't be unified. """ source, branches = parseurl(ui.expandpath(source), opts.get('branch')) other = peer(repo, opts, source) ui.status(_('comparing with %s\n') % util.hidepassword(source)) revs, checkout = addbranchrevs(repo, other, branches, opts.get('rev')) if revs: revs = [other.lookup(rev) for rev in revs] other, chlist, cleanupfn = bundlerepo.getremotechanges( ui, repo, other, revs, opts["bundle"], opts["force"]) try: if not chlist: ui.status(_("no changes found\n")) return subreporecurse() displayer = cmdutil.show_changeset(ui, other, opts, buffered) displaychlist(other, chlist, displayer) displayer.close() finally: cleanupfn() subreporecurse() return 0 # exit code is zero since we found incoming changes
def _incoming(displaychlist, subreporecurse, ui, repo, source, opts, buffered=False): """ Helper for incoming / gincoming. displaychlist gets called with (remoterepo, incomingchangesetlist, displayer) parameters, and is supposed to contain only code that can't be unified. """ source, branches = parseurl(ui.expandpath(source), opts.get('branch')) other = repository(remoteui(repo, opts), source) ui.status(_('comparing with %s\n') % url.hidepassword(source)) revs, checkout = addbranchrevs(repo, other, branches, opts.get('rev')) if revs: revs = [other.lookup(rev) for rev in revs] other, incoming, bundle = bundlerepo.getremotechanges( ui, repo, other, revs, opts["bundle"], opts["force"]) if incoming is None: ui.status(_("no changes found\n")) return subreporecurse() try: chlist = other.changelog.nodesbetween(incoming, revs)[0] displayer = cmdutil.show_changeset(ui, other, opts, buffered) # XXX once graphlog extension makes it into core, # should be replaced by a if graph/else displaychlist(other, chlist, displayer) displayer.close() finally: if hasattr(other, 'close'): other.close() if bundle: os.unlink(bundle) subreporecurse() return 0 # exit code is zero since we found incoming changes