# HG changeset patch # User Gregory Szorc # Date 2015-10-13 19:41:32 # Node ID 7394536338bb1d3ee7c5c89c121a0336d0518b1e # Parent 6a854f5589264f0f36697a0213a7639395354cbd exchange: provide hint on how to disable clone bundles If a clone bundle persistently fails to apply, users need a way to disable it so they have a hope of the clone working. Change the hint for the abort scenario to advertise the config option to disable clone bundles. diff --git a/mercurial/exchange.py b/mercurial/exchange.py --- a/mercurial/exchange.py +++ b/mercurial/exchange.py @@ -1637,8 +1637,10 @@ def _maybeapplyclonebundle(pullop): repo.ui.warn(_('falling back to normal clone\n')) else: raise error.Abort(_('error applying bundle'), - hint=_('consider contacting the server ' - 'operator if this error persists')) + hint=_('if this error persists, consider contacting ' + 'the server operator or disable clone ' + 'bundles via ' + '"--config experimental.clonebundles=false"')) def parseclonebundlesmanifest(repo, s): """Parses the raw text of a clone bundles manifest. diff --git a/tests/test-clonebundles.t b/tests/test-clonebundles.t --- a/tests/test-clonebundles.t +++ b/tests/test-clonebundles.t @@ -71,7 +71,7 @@ Manifest file with invalid URL aborts applying clone bundle from http://does.not.exist/bundle.hg error fetching bundle: [Errno -2] Name or service not known abort: error applying bundle - (consider contacting the server operator if this error persists) + (if this error persists, consider contacting the server operator or disable clone bundles via "--config experimental.clonebundles=false") [255] Server is not running aborts @@ -81,7 +81,7 @@ Server is not running aborts applying clone bundle from http://localhost:$HGPORT1/bundle.hg error fetching bundle: [Errno 111] Connection refused abort: error applying bundle - (consider contacting the server operator if this error persists) + (if this error persists, consider contacting the server operator or disable clone bundles via "--config experimental.clonebundles=false") [255] Server returns 404 @@ -92,7 +92,7 @@ Server returns 404 applying clone bundle from http://localhost:$HGPORT1/bundle.hg HTTP error fetching bundle: HTTP Error 404: File not found abort: error applying bundle - (consider contacting the server operator if this error persists) + (if this error persists, consider contacting the server operator or disable clone bundles via "--config experimental.clonebundles=false") [255] We can override failure to fall back to regular clone