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

  • Committer: Jelmer Vernooij
  • Date: 2018-04-02 13:11:02 UTC
  • mto: (0.200.1913 work)
  • mto: This revision was merged to the branch mainline in revision 6960.
  • Revision ID: jelmer@jelmer.uk-20180402131102-mdksabbd3epw2fw0
Convert Git URLs in stored config to Breezy URLs.

Show diffs side-by-side

added added

removed removed

Lines of Context:
71
71
from .unpeel_map import (
72
72
    UnpeelMap,
73
73
    )
 
74
from .urls import git_url_to_bzr_url
74
75
 
75
76
from ...foreign import ForeignBranch
76
77
 
443
444
        # FIXME: Set "origin" url from .git/config ?
444
445
        cs = self.repository._git.get_config_stack()
445
446
        try:
446
 
            return cs.get((b"remote", b'origin'), b"url").decode("utf-8")
 
447
            location = cs.get((b"remote", b'origin'), b"url")
447
448
        except KeyError:
448
449
            return None
 
450
        else:
 
451
            return git_url_to_bzr_url(location)
449
452
 
450
453
    def set_parent(self, location):
451
454
        # FIXME: Set "origin" url in .git/config ?