34
from bzrlib.errors import (NotBranchError, NotVersionedError,
35
UnsupportedOperation, PathsNotVersionedError)
32
from bzrlib.errors import (
34
PathsNotVersionedError,
36
36
from bzrlib.inventory import Inventory
37
37
from bzrlib.osutils import pathjoin, getcwd, has_symlinks
38
38
from bzrlib.tests import TestSkipped, TestNotApplicable
39
39
from bzrlib.tests.per_workingtree import TestCaseWithWorkingTree
40
from bzrlib.trace import mutter
41
from bzrlib.workingtree import (TreeEntry, TreeDirectory, TreeFile, TreeLink,
42
WorkingTree, WorkingTree2)
40
from bzrlib.workingtree import (
43
46
from bzrlib.conflicts import ConflictList, TextConflict, ContentsConflict
46
49
class TestWorkingTree(TestCaseWithWorkingTree):
51
def test_branch_builder(self):
52
# Just a smoke test that we get a branch at the specified relpath
53
builder = self.make_branch_builder('foobar')
54
br = branch.Branch.open('foobar')
48
56
def test_list_files(self):
49
57
tree = self.make_branch_and_tree('.')
50
58
self.build_tree(['dir/', 'file'])
916
924
case_sensitive = True
917
925
tree = self.make_branch_and_tree('test')
918
if tree.__class__ == WorkingTree2:
919
raise TestSkipped('WorkingTree2 is not supported')
920
926
self.assertEqual(case_sensitive, tree.case_sensitive)
927
# now we cheat, and make a file that matches the case-sensitive name
928
t = tree.bzrdir.get_workingtree_transport(None)
930
content = tree._format.get_format_string()
931
except NotImplementedError:
932
# All-in-one formats didn't have a separate format string.
933
content = tree.bzrdir._format.get_format_string()
934
t.put_bytes(tree._format.case_sensitive_filename, content)
935
tree = tree.bzrdir.open_workingtree()
936
self.assertFalse(tree.case_sensitive)
922
938
def test_all_file_ids_with_missing(self):
923
939
tree = self.make_branch_and_tree('tree')