~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_testament.py

[merge] bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
import sys
24
24
 
25
25
from bzrlib.tests import TestCaseInTempDir
26
 
from bzrlib.tests.treeshape import build_tree_contents
27
26
from bzrlib.branch import Branch
28
27
from bzrlib.testament import Testament
29
28
from bzrlib.trace import mutter
34
33
 
35
34
    def setUp(self):
36
35
        super(TestamentTests, self).setUp()
37
 
        b = self.b = Branch.initialize('.')
 
36
        b = self.b = Branch.initialize(u'.')
38
37
        b.nick = "test branch"
39
38
        b.working_tree().commit(message='initial null commit',
40
39
                 committer='test@user',
41
40
                 timestamp=1129025423, # 'Tue Oct 11 20:10:23 2005'
42
41
                 timezone=0,
43
42
                 rev_id='test@user-1')
44
 
        build_tree_contents([('hello', 'contents of hello file'),
 
43
        self.build_tree_contents([('hello', 'contents of hello file'),
45
44
                             ('src/', ),
46
45
                             ('src/foo.c', 'int main()\n{\n}\n')])
47
 
        b.add(['hello', 'src', 'src/foo.c'],
48
 
              ['hello-id', 'src-id', 'foo.c-id'])
 
46
        b.working_tree().add(['hello', 'src', 'src/foo.c'],
 
47
                             ['hello-id', 'src-id', 'foo.c-id'])
49
48
        b.working_tree().commit(message='add files and directories',
50
49
                 timestamp=1129025483,
51
50
                 timezone=36000,
96
95
        if not has_symlinks():
97
96
            return
98
97
        os.symlink('wibble/linktarget', 'link')
99
 
        self.b.add(['link'], ['link-id'])
 
98
        self.b.working_tree().add(['link'], ['link-id'])
100
99
        self.b.working_tree().commit(message='add symlink',
101
100
                 timestamp=1129025493,
102
101
                 timezone=36000,