Merge with crew-stable
authorThomas Arendsen Hein <thomas@intevation.de>
Thu, 19 Apr 2007 17:54:43 +0200
changeset 4369 bf8319ee3428
parent 4368 97962a3e73cf (current diff)
parent 4356 aed9e6dceb85 (diff)
child 4370 6af107c742bf
Merge with crew-stable
mercurial/httprepo.py
--- a/mercurial/httprepo.py	Thu Apr 19 13:04:26 2007 +0200
+++ b/mercurial/httprepo.py	Thu Apr 19 17:54:43 2007 +0200
@@ -279,11 +279,12 @@
 
         if proto.startswith('application/mercurial-'):
             try:
-                version = float(proto[22:])
+                version = proto.split('-', 1)[1]
+                version_info = tuple([int(n) for n in version.split('.')])
             except ValueError:
                 raise hg.RepoError(_("'%s' sent a broken Content-type "
                                      "header (%s)") % (self._url, proto))
-            if version > 0.1:
+            if version_info > (0, 1):
                 raise hg.RepoError(_("'%s' uses newer protocol %s") %
                                    (self._url, version))