# HG changeset patch # User Thomas Arendsen Hein # Date 1176998083 -7200 # Node ID bf8319ee3428048a9ef96cc855492860f88ecceb # Parent 97962a3e73cfe0474fe0ba466d457f9addda18de# Parent aed9e6dceb85f5d00b53c2c5e22ce5ede37af38b Merge with crew-stable diff --git a/mercurial/httprepo.py b/mercurial/httprepo.py --- a/mercurial/httprepo.py +++ b/mercurial/httprepo.py @@ -279,11 +279,12 @@ class httprepository(remoterepository): 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))