/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/tests/blackbox/test_remove.py

  • Committer: Gustav Hartvigsson
  • Date: 2021-01-09 21:36:27 UTC
  • Revision ID: gustav.hartvigsson@gmail.com-20210109213627-h1xwcutzy9m7a99b
Added 'Case Preserving Working Tree Use Cases' from Canonical Wiki

* Addod a page from the Canonical Bazaar wiki
  with information on the scmeatics of case
  perserving filesystems an a case insensitive
  filesystem works.
  
  * Needs re-work, but this will do as it is the
    same inforamoton as what was on the linked
    page in the currint documentation.

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
    features,
24
24
    TestCaseWithTransport,
25
25
    TestSkipped,
 
26
    TestNotApplicable,
26
27
    )
27
28
from breezy.workingtree import WorkingTree
28
29
from breezy import osutils
39
40
 
40
41
    def _make_tree_and_add(self, paths):
41
42
        tree = self.make_branch_and_tree('.')
42
 
        tree.lock_write()
43
 
        try:
 
43
        with tree.lock_write():
44
44
            self.build_tree(paths)
45
45
            for path in paths:
46
46
                file_id = path.replace('/', '_').encode('utf-8') + _id
47
47
                tree.add(path, file_id)
48
 
        finally:
49
 
            tree.unlock()
50
48
        return tree
51
49
 
52
50
    def assertFilesDeleted(self, files):
278
276
    def test_remove_backslash(self):
279
277
        # pad.lv/176263
280
278
        if os.path.sep == '\\':
281
 
            raise tests.TestNotApplicable(
 
279
            raise TestNotApplicable(
282
280
                'unable to add filenames with backslashes where '
283
281
                ' it is the path separator')
284
282
        tree = self.make_branch_and_tree('.')