26
26
from bzrlib.branch import Branch
27
27
from bzrlib.trace import mutter
28
28
from bzrlib.osutils import pathjoin
29
from bzrlib.workingtree import WorkingTree
31
32
class TestVersioning(TestCaseInTempDir):
40
41
self.run_bzr('mkdir', 'foo', retcode=3)
42
43
from bzrlib.diff import compare_trees
43
from bzrlib.branch import Branch
44
wt = WorkingTree.open('.')
46
delta = compare_trees(b.basis_tree(), b.working_tree())
46
delta = compare_trees(wt.basis_tree(), wt)
48
48
self.log('delta.added = %r' % delta.added)
67
67
from bzrlib.diff import compare_trees
68
from bzrlib.branch import Branch
68
wt = WorkingTree.open('.')
71
delta = compare_trees(b.basis_tree(), b.working_tree())
70
delta = compare_trees(wt.basis_tree(), wt)
73
72
self.log('delta.added = %r' % delta.added)
95
94
self.failUnless(os.path.isdir('a/b/dir'))
97
96
from bzrlib.diff import compare_trees
99
b_a = Branch.open('a')
100
b_b = Branch.open('a/b')
97
wt = WorkingTree.open('.')
98
wt_a = WorkingTree.open('a')
99
wt_b = WorkingTree.open('a/b')
102
delta = compare_trees(b.basis_tree(), b.working_tree())
103
self.assertEquals(len(delta.added), 1)
104
self.assertEquals(delta.added[0][0], 'dir')
105
self.failIf(delta.modified)
107
delta = compare_trees(b_a.basis_tree(), b_a.working_tree())
108
self.assertEquals(len(delta.added), 1)
109
self.assertEquals(delta.added[0][0], 'dir')
110
self.failIf(delta.modified)
112
delta = compare_trees(b_b.basis_tree(), b_b.working_tree())
101
delta = compare_trees(wt.basis_tree(), wt)
102
self.assertEquals(len(delta.added), 1)
103
self.assertEquals(delta.added[0][0], 'dir')
104
self.failIf(delta.modified)
106
delta = compare_trees(wt_a.basis_tree(), wt_a)
107
self.assertEquals(len(delta.added), 1)
108
self.assertEquals(delta.added[0][0], 'dir')
109
self.failIf(delta.modified)
111
delta = compare_trees(wt_b.basis_tree(), wt_b)
113
112
self.assertEquals(len(delta.added), 1)
114
113
self.assertEquals(delta.added[0][0], 'dir')
115
114
self.failIf(delta.modified)