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

Support reading .git files.

Merged from https://code.launchpad.net/~jelmer/brz-git/read-gitfile/+merge/342256

Show diffs side-by-side

added added

removed removed

Lines of Context:
67
67
        gd = controldir.ControlDir.open('.')
68
68
        self.assertRaises(errors.NoWorkingTree, gd.open_workingtree)
69
69
 
 
70
    def test_git_file(self):
 
71
        gitrepo = GitRepo.init("blah", mkdir=True)
 
72
        self.build_tree_contents([('foo/', ), ('foo/.git', 'gitdir: ../blah/.git\n')])
 
73
 
 
74
        gd = controldir.ControlDir.open('foo')
 
75
        self.assertEqual(gd.control_url.rstrip('/'),
 
76
                         urlutils.local_path_to_url(os.path.abspath(gitrepo.controldir())))
 
77
 
70
78
 
71
79
class TestGitDirFormat(tests.TestCase):
72
80