~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/per_workingtree/test_workingtree.py

  • Committer: John Arbash Meinel
  • Date: 2011-01-25 16:48:24 UTC
  • mto: This revision was merged to the branch mainline in revision 5633.
  • Revision ID: john@arbash-meinel.com-20110125164824-9n8zg1y5sg5vu6i0
Make case_sensitive_filename an attribute of the format.

This allows us to still detect case sensitivity in older formats,
it also allows us to poke at the details in the test suite.

Show diffs side-by-side

added added

removed removed

Lines of Context:
924
924
            case_sensitive = True
925
925
        tree = self.make_branch_and_tree('test')
926
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)
 
929
        try:
 
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)
927
937
 
928
938
    def test_all_file_ids_with_missing(self):
929
939
        tree = self.make_branch_and_tree('tree')