~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_workingtree_4.py

  • Committer: Jelmer Vernooij
  • Date: 2012-02-20 12:19:29 UTC
  • mfrom: (6437.23.11 2.5)
  • mto: (6581.1.1 trunk)
  • mto: This revision was merged to the branch mainline in revision 6582.
  • Revision ID: jelmer@samba.org-20120220121929-7ni2psvjoatm1yp4
Merge bzr/2.5.

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
    workingtree_4,
30
30
    )
31
31
from bzrlib.lockdir import LockDir
32
 
from bzrlib.tests import TestCaseWithTransport, TestSkipped
 
32
from bzrlib.tests import TestCaseWithTransport, TestSkipped, features
33
33
from bzrlib.tree import InterTree
34
34
 
35
35
 
673
673
                              tree_iter_changes, ['bar', 'foo'])
674
674
        self.assertEqual(e.paths, ['foo'])
675
675
 
 
676
    def test_iter_changes_unversioned_non_ascii(self):
 
677
        """Unversioned non-ascii paths should be reported as unicode"""
 
678
        self.requireFeature(features.UnicodeFilenameFeature)
 
679
        tree = self.make_branch_and_tree('.')
 
680
        self.build_tree_contents([('f', '')])
 
681
        tree.add(['f'], ['f-id'])
 
682
        def tree_iter_changes(tree, files):
 
683
            return list(tree.iter_changes(tree.basis_tree(),
 
684
                specific_files=files, require_versioned=True))
 
685
        tree.lock_read()
 
686
        self.addCleanup(tree.unlock)
 
687
        e = self.assertRaises(errors.PathsNotVersionedError,
 
688
            tree_iter_changes, tree, [u'\xa7', u'\u03c0'])
 
689
        self.assertEqual(e.paths, [u'\xa7', u'\u03c0'])
 
690
 
676
691
    def get_tree_with_cachable_file_foo(self):
677
692
        tree = self.make_branch_and_tree('.')
678
693
        tree.lock_write()