/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 github.py

Fix URLs from gitlab.

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
    )
26
26
 
27
27
from ... import (
 
28
    branch as _mod_branch,
28
29
    controldir,
29
30
    errors,
30
31
    hooks,
129
130
            project = base_repo.name
130
131
        try:
131
132
            remote_repo = self.gh.get_repo('%s/%s' % (owner, project))
132
 
            remote_dir = controldir.ControlDir.open(git_url_to_bzr_url(remote_repo.ssh_url))
133
 
            return remote_dir.open_branch(name=name)
 
133
            full_url = urlutils.join_segment_parameters(
 
134
                git_url_to_bzr_url(remote_repo.ssh_url), {"branch": name.encode('utf-8')})
 
135
            return _mod_branch.Branch.open(full_url)
134
136
        except github.UnknownObjectException:
135
137
            raise errors.NotBranchError('https://github.com/%s/%s' % (owner, project))
136
138