/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/git/__init__.py

  • Committer: Jelmer Vernooij
  • Date: 2020-07-05 12:50:01 UTC
  • mfrom: (7490.40.46 work)
  • mto: (7490.40.48 work)
  • mto: This revision was merged to the branch mainline in revision 7519.
  • Revision ID: jelmer@jelmer.uk-20200705125001-7s3vo0p55szbbws7
Merge lp:brz/3.1.

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
 
23
23
"""A GIT branch and repository format implementation for bzr."""
24
24
 
 
25
from __future__ import absolute_import
 
26
 
25
27
import os
26
28
import sys
27
29
 
184
186
        resp = transport.request('GET', url, headers=headers)
185
187
        if resp.status in (404, 405):
186
188
            raise brz_errors.NotBranchError(transport.base)
187
 
        elif resp.status == 400 and resp.reason == 'no such method: info':
188
 
            # hgweb :(
189
 
            raise brz_errors.NotBranchError(transport.base)
190
189
        elif resp.status != 200:
191
 
            raise brz_errors.UnexpectedHttpStatus(url, resp.status)
 
190
            raise brz_errors.InvalidHttpResponse(
 
191
                url, 'Unable to handle http code %d' % resp.status)
192
192
 
193
193
        ct = resp.getheader("Content-Type")
194
194
        if ct and ct.startswith("application/x-git"):