/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/plugins/git/__init__.py

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2018-06-30 22:12:58 UTC
  • mfrom: (6973.11.15 python3-j)
  • Revision ID: breezy.the.bot@gmail.com-20180630221258-x0y3tvn1060ntndc
Fix another 1.5k tests on python3.

Merged from https://code.launchpad.net/~jelmer/brz/python3-j/+merge/348346

Show diffs side-by-side

added added

removed removed

Lines of Context:
151
151
        headers = {"Content-Type": "application/x-git-upload-pack-request"}
152
152
        req = Request('GET', url, accepted_errors=[200, 403, 404, 405],
153
153
                      headers=headers)
154
 
        if req.get_host() == "github.com":
 
154
        (scheme, user, password, host, port, path) = urlutils.parse_url(req.get_full_url())
 
155
        if host == "github.com":
155
156
            # GitHub requires we lie. https://github.com/dulwich/dulwich/issues/562
156
157
            req.add_header("User-Agent", user_agent_for_github())
157
 
        elif req.get_host() == "bazaar.launchpad.net":
 
158
        elif host == "bazaar.launchpad.net":
158
159
            # Don't attempt Git probes against bazaar.launchpad.net; pad.lv/1744830
159
160
            raise bzr_errors.NotBranchError(transport.base)
160
161
        req.follow_redirections = True