/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/tests/test_urls.py

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2019-03-04 06:21:20 UTC
  • mfrom: (7141.8.7 git-config-branches)
  • Revision ID: breezy.the.bot@gmail.com-20190304062120-pmcmhza3xro5euy7
Support reading related branches from git configs.

Merged from https://code.launchpad.net/~jelmer/brz/git-config-branches/+merge/358140

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
            ('git+ssh://user@foo/bar/path'))
43
43
 
44
44
    def test_path(self):
45
 
        self.assertEqual(
46
 
            git_url_to_bzr_url(
47
 
                '/bar/path'),
48
 
            ('/bar/path'))
 
45
        self.assertEqual(git_url_to_bzr_url('/bar/path'), ('/bar/path'))
 
46
 
 
47
    def test_with_ref(self):
 
48
        self.assertEqual(
 
49
            git_url_to_bzr_url('foo:bar/path', ref=b'HEAD'),
 
50
            'git+ssh://foo/bar/path')
 
51
        self.assertEqual(
 
52
            git_url_to_bzr_url('foo:bar/path', ref=b'refs/heads/blah'),
 
53
            'git+ssh://foo/bar/path,branch=blah')
 
54
        self.assertEqual(
 
55
            git_url_to_bzr_url('foo:bar/path', ref=b'refs/tags/blah'),
 
56
            'git+ssh://foo/bar/path,ref=refs%2Ftags%2Fblah')
 
57
 
 
58
    def test_with_branch(self):
 
59
        self.assertEqual(
 
60
            git_url_to_bzr_url('foo:bar/path', branch=''),
 
61
            'git+ssh://foo/bar/path')
 
62
        self.assertEqual(
 
63
            git_url_to_bzr_url('foo:bar/path', branch='foo/blah'),
 
64
            'git+ssh://foo/bar/path,branch=foo%2Fblah')
 
65
        self.assertEqual(
 
66
            git_url_to_bzr_url('foo:bar/path', branch='blah'),
 
67
            'git+ssh://foo/bar/path,branch=blah')