~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_versioning.py

Merge from integration.

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
 
23
23
import os
24
24
 
25
 
from bzrlib.selftest import BzrTestBase, TestCaseInTempDir
 
25
from bzrlib.tests import BzrTestBase, TestCaseInTempDir
26
26
from bzrlib.branch import Branch
27
27
from bzrlib.trace import mutter
 
28
from bzrlib.osutils import pathjoin
28
29
 
29
30
 
30
31
class TestVersioning(TestCaseInTempDir):
40
41
 
41
42
        from bzrlib.diff import compare_trees
42
43
        from bzrlib.branch import Branch
43
 
        b = Branch.open('.')
 
44
        b = Branch.open(u'.')
44
45
        
45
46
        delta = compare_trees(b.basis_tree(), b.working_tree())
46
47
 
65
66
 
66
67
        from bzrlib.diff import compare_trees
67
68
        from bzrlib.branch import Branch
68
 
        b = Branch.open('.')
 
69
        b = Branch.open(u'.')
69
70
        
70
71
        delta = compare_trees(b.basis_tree(), b.working_tree())
71
72
 
73
74
 
74
75
        self.assertEquals(len(delta.added), 2)
75
76
        self.assertEquals(delta.added[0][0], 'dir')
76
 
        self.assertEquals(delta.added[1][0], os.path.join('dir','subdir'))
 
77
        self.assertEquals(delta.added[1][0], pathjoin('dir','subdir'))
77
78
        self.failIf(delta.modified)
78
79
 
79
80
    def test_mkdir_w_nested_trees(self):
94
95
        self.failUnless(os.path.isdir('a/b/dir'))
95
96
 
96
97
        from bzrlib.diff import compare_trees
97
 
        b = Branch.open('.')
 
98
        b = Branch.open(u'.')
98
99
        b_a = Branch.open('a')
99
100
        b_b = Branch.open('a/b')
100
101
        
123
124
        from bzrlib.errors import NotVersionedError
124
125
        from bzrlib.workingtree import WorkingTree
125
126
 
126
 
        b = Branch.initialize('.')
 
127
        b = Branch.initialize(u'.')
127
128
 
128
129
        self.build_tree(['foo/',
129
130
                         'foo/hello'])
138
139
        """After all the above changes, run the check and upgrade commands.
139
140
 
140
141
        The upgrade should be a no-op."""
141
 
        b = Branch.open('.')
 
142
        b = Branch.open(u'.')
142
143
        mutter('branch has %d revisions', b.revno())
143
144
        
144
145
        mutter('check branch...')
156
157
        self.build_tree(['a/', 'b/'])
157
158
        
158
159
        run_bzr('init')
159
 
        b = Branch.open('.')
 
160
        b = Branch.open(u'.')
160
161
        
161
162
        for fn in ('a/one', 'b/two', 'top'):
162
163
            file(fn, 'w').write('old contents')