changeset 3703:e674cae8efee

fix push over HTTP to older servers
author Alexis S. L. Carvalho <alexis@cecm.usp.br>
date Tue, 21 Nov 2006 23:08:29 -0200
parents 70c3ee224c08
children 9c1737a3e254
files mercurial/httprepo.py
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/httprepo.py	Mon Nov 20 19:32:46 2006 -0200
+++ b/mercurial/httprepo.py	Tue Nov 21 23:08:29 2006 -0200
@@ -328,8 +328,14 @@
 
         type = ""
         types = self.capable('unbundle')
+        # servers older than d1b16a746db6 will send 'unbundle' as a
+        # boolean capability
+        try:
+            types = types.split(',')
+        except AttributeError:
+            types = [""]
         if types:
-            for x in types.split(','):
+            for x in types:
                 if x in changegroup.bundletypes:
                     type = x
                     break