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

More work on colocated branch support.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 
19
19
from cStringIO import StringIO
20
20
 
 
21
from dulwich.repo import Repo as GitRepo
 
22
 
21
23
from bzrlib.plugins.git import tests
22
24
 
23
25
 
110
112
        builder = tests.GitBranchBuilder(stream)
111
113
 
112
114
        builder.set_file(u'f\xb5/bar', 'contents\nbar\n', False)
113
 
        self.assertEqual(2, builder.commit('Joe Foo <joe@foo.com>',
 
115
        self.assertEqual('2', builder.commit('Joe Foo <joe@foo.com>',
114
116
                                           u'committing f\xb5/bar',
115
117
                                           timestamp=1194586400,
116
118
                                           timezone='+0100'))
244
246
class TestGitBranchBuilderReal(tests.TestCaseInTempDir):
245
247
 
246
248
    def test_create_real_branch(self):
247
 
        tests.run_git('init')
 
249
        GitRepo.init(".")
248
250
 
249
251
        builder = tests.GitBranchBuilder()
250
252
        builder.set_file(u'foo', 'contents\nfoo\n', False)
251
253
        r1 = builder.commit('Joe Foo <joe@foo.com>', u'first',
252
254
                            timestamp=1194586400)
253
255
        mapping = builder.finish()
254
 
        self.assertEqual({1:'44411e8e9202177dd19b6599d7a7991059fa3cb4',
255
 
                          2: 'b0b62e674f67306fddcf72fa888c3b56df100d64',
 
256
        self.assertEqual({'1':'44411e8e9202177dd19b6599d7a7991059fa3cb4',
 
257
                          '2': 'b0b62e674f67306fddcf72fa888c3b56df100d64',
256
258
                         }, mapping)