diff --git a/tests/test-treemanifest-infinitepush.t b/tests/test-treemanifest-infinitepush.t --- a/tests/test-treemanifest-infinitepush.t +++ b/tests/test-treemanifest-infinitepush.t @@ -202,10 +202,8 @@ added 1 changesets with 1 changes to 1 files (+1 heads) new changesets 42ec76eb772a (run 'hg heads' to see heads, 'hg merge' to merge) - $ hg log -r 42ec76eb772a -T ' ' --stat - abort: unable to download the following trees from the server: - bf0601d5cb94247e00d0bdd1d8327f0dd36f54e9 - [255] + $ hg log -r 42ec76eb772a -T ' ' --stat 2>&1 > /dev/null | tail -1 + KeyError: 'tree node not found (, bf0601d5cb94247e00d0bdd1d8327f0dd36f54e9)' $ cd .. Verify its not on the server diff --git a/treemanifest/__init__.py b/treemanifest/__init__.py --- a/treemanifest/__init__.py +++ b/treemanifest/__init__.py @@ -1599,7 +1599,13 @@ # Find a recent tree that we already have basemfnodes = _findrecenttree(self._repo, linkrev) - prefetchtrees(self._repo, name, [node], basemfnodes, []) + try: + prefetchtrees(self._repo, name, [node], basemfnodes, []) + except MissingNodesError: + # Throw the right type of error so that the subsequent stores in a + # chain of stores get an opportunity to look for the node. + raise KeyError((name, node)) + self._shared.markforrefresh() return self._shared.get(name, node)