changeset 26688:7394536338bb

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.
author Gregory Szorc <gregory.szorc@gmail.com>
date Tue, 13 Oct 2015 12:41:32 -0700
parents 6a854f558926
children 2c9f15366982
files mercurial/exchange.py tests/test-clonebundles.t
diffstat 2 files changed, 7 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/exchange.py	Wed Oct 14 10:03:26 2015 -0700
+++ b/mercurial/exchange.py	Tue Oct 13 12:41:32 2015 -0700
@@ -1637,8 +1637,10 @@
         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.
--- a/tests/test-clonebundles.t	Wed Oct 14 10:03:26 2015 -0700
+++ b/tests/test-clonebundles.t	Tue Oct 13 12:41:32 2015 -0700
@@ -71,7 +71,7 @@
   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 @@
   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 @@
   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