diff --git a/mercurial/bundlerepo.py b/mercurial/bundlerepo.py --- a/mercurial/bundlerepo.py +++ b/mercurial/bundlerepo.py @@ -636,6 +636,11 @@ # The discovery process probably need cleanup to avoid that localrepo = localrepo.unfiltered() + hasnode = localrepo.changelog.hasnode + if rheads and any(not hasnode(x) for x in rheads): + ui.warn(_("warning: the server did not send all changes; " + "the follow list is incomplete\n")) + rheads = [x for x in rheads if hasnode(x)] csets = localrepo.changelog.findmissing(common, rheads) if bundlerepo: diff --git a/tests/test-pull-bundle.t b/tests/test-pull-bundle.t --- a/tests/test-pull-bundle.t +++ b/tests/test-pull-bundle.t @@ -136,20 +136,21 @@ updating to branch default 1 files updated, 0 files merged, 0 files removed, 0 files unresolved $ cd repo.pullbundle2a - $ hg incoming -r ed1b79f46b9a + $ hg incoming comparing with http://localhost:$HGPORT2/ searching for changes - changeset: 1:ed1b79f46b9a + warning: the server did not send all changes; the follow list is incomplete + changeset: 1:effea6de0384 tag: tip user: test date: Thu Jan 01 00:00:00 1970 +0000 - summary: change foo + summary: add bar $ cd .. $ killdaemons.py $ grep 'sending pullbundle ' repo/.hg/blackbox.log * sending pullbundle "0.hg" (glob) - * sending pullbundle "1.hg" (glob) + * sending pullbundle "2.hg" (glob) $ rm repo/.hg/blackbox.log Test recovery from misconfigured server sending no new data