diff --git a/tests/test-treemanifest-prefetch.t b/tests/test-treemanifest-prefetch.t --- a/tests/test-treemanifest-prefetch.t +++ b/tests/test-treemanifest-prefetch.t @@ -493,3 +493,10 @@ $ hg prefetch 0 trees fetched over * (glob) #endif + +Running prefetch in the master repository should fail gracefully + + $ cd ../master + $ hg prefetch + abort: no remote server configured to fetch trees from + [255] diff --git a/treemanifest/__init__.py b/treemanifest/__init__.py --- a/treemanifest/__init__.py +++ b/treemanifest/__init__.py @@ -1274,7 +1274,11 @@ if util.safehasattr(repo, 'fallbackpath'): return repo.fallbackpath else: - return repo.ui.config('paths', 'default') + path = repo.ui.config('paths', 'default') + if not path: + raise error.Abort( + "no remote server configured to fetch trees from") + return path def pull(orig, ui, repo, *pats, **opts): # If we're not in treeonly mode, and we're missing public commits from the