Submitter | Pierre-Yves David |
---|---|
Date | April 5, 2020, 11:33 p.m. |
Message ID | <2d761788a0f24e85d6d7.1586129608@nodosa.octobus.net> |
Download | mbox | patch |
Permalink | /patch/46025/ |
State | Accepted |
Headers | show |
Comments
On Mon, 06 Apr 2020 01:33:28 +0200, Pierre-Yves David wrote: > # HG changeset patch > # User Pierre-Yves David <pierre-yves.david@octobus.net> > # Date 1586125497 -7200 > # Mon Apr 06 00:24:57 2020 +0200 > # Branch stable > # Node ID 2d761788a0f24e85d6d7e2784a72fa13ccf5217b > # Parent 3f29c5edac8e4a663f062960f65bba7bc8a26536 > # EXP-Topic pull-shadow > # Available At https://foss.heptapod.net/octobus/mercurial-devel/ > # hg pull https://foss.heptapod.net/octobus/mercurial-devel/ -r 2d761788a0f2 > discovery: avoid wrongly saying there are nothing to pull Sounds good, queued, thanks.
Patch
diff --git a/mercurial/discovery.py b/mercurial/discovery.py --- a/mercurial/discovery.py +++ b/mercurial/discovery.py @@ -67,6 +67,10 @@ def findcommonincoming(repo, remote, hea ancestorsof=ancestorsof, ) common, anyinc, srvheads = res + if heads and not anyinc: + # server could be lying on the advertised heads + has_node = repo.changelog.hasnode + anyinc = any(not has_node(n) for n in heads) return (list(common), anyinc, heads or list(srvheads)) diff --git a/tests/test-infinitepush-ci.t b/tests/test-infinitepush-ci.t --- a/tests/test-infinitepush-ci.t +++ b/tests/test-infinitepush-ci.t @@ -249,12 +249,12 @@ XXX: we should show better message when $ hg pull -r b4e4bce660512ad3e71189e14588a70ac8e31fef pulling from ssh://user@dummy/repo searching for changes - no changes found adding changesets adding manifests adding file changes added 4 changesets with 4 changes to 4 files new changesets eaba929e866c:b4e4bce66051 + (run 'hg update' to get a working copy) $ hg glog o 5:b4e4bce66051 added e | public