Mercurial > public > mercurial-scm > hg
comparison mercurial/httprepo.py @ 4369:bf8319ee3428
Merge with crew-stable
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Thu, 19 Apr 2007 17:54:43 +0200 |
parents | 0d51eb296fb9 aed9e6dceb85 |
children | 96d8a56d4ef9 |
comparison
equal
deleted
inserted
replaced
4368:97962a3e73cf | 4369:bf8319ee3428 |
---|---|
277 raise hg.RepoError(_("'%s' does not appear to be an hg repository") % | 277 raise hg.RepoError(_("'%s' does not appear to be an hg repository") % |
278 self._url) | 278 self._url) |
279 | 279 |
280 if proto.startswith('application/mercurial-'): | 280 if proto.startswith('application/mercurial-'): |
281 try: | 281 try: |
282 version = float(proto[22:]) | 282 version = proto.split('-', 1)[1] |
283 version_info = tuple([int(n) for n in version.split('.')]) | |
283 except ValueError: | 284 except ValueError: |
284 raise hg.RepoError(_("'%s' sent a broken Content-type " | 285 raise hg.RepoError(_("'%s' sent a broken Content-type " |
285 "header (%s)") % (self._url, proto)) | 286 "header (%s)") % (self._url, proto)) |
286 if version > 0.1: | 287 if version_info > (0, 1): |
287 raise hg.RepoError(_("'%s' uses newer protocol %s") % | 288 raise hg.RepoError(_("'%s' uses newer protocol %s") % |
288 (self._url, version)) | 289 (self._url, version)) |
289 | 290 |
290 return resp | 291 return resp |
291 | 292 |