Mercurial > public > mercurial-scm > hg-stable
diff mercurial/hg.py @ 14161:8a0fca925992
bundlerepo: fix and improve getremotechanges
Fixes the regression where incoming could show local changes
introduced by rev 72c84f24b420.
author | Peter Arrenbrecht <peter.arrenbrecht@gmail.com> |
---|---|
date | Mon, 02 May 2011 12:36:23 +0200 |
parents | 839086b25c36 |
children | 135e244776f0 |
line wrap: on
line diff
--- a/mercurial/hg.py Mon May 02 00:04:49 2011 +0200 +++ b/mercurial/hg.py Mon May 02 12:36:23 2011 +0200 @@ -427,14 +427,13 @@ if revs: revs = [other.lookup(rev) for rev in revs] - other, common, anyinc, bundle = bundlerepo.getremotechanges(ui, repo, other, - revs, opts["bundle"], opts["force"]) - if not anyinc: - ui.status(_("no changes found\n")) - return subreporecurse() + 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() - try: - chlist = other.changelog.findmissing(common, revs) displayer = cmdutil.show_changeset(ui, other, opts, buffered) # XXX once graphlog extension makes it into core, @@ -443,10 +442,7 @@ displayer.close() finally: - if hasattr(other, 'close'): - other.close() - if bundle: - os.unlink(bundle) + cleanupfn() subreporecurse() return 0 # exit code is zero since we found incoming changes