At file:///home/vila/src/bzr/bugs/322767-dont-add-conflict-related-files/
------------------------------------------------------------
revno: 5019
revision-id: [email protected]
parent: [email protected]
committer: Vincent Ladeuil <[email protected]>
branch nick: 322767-dont-add-conflict-related-files
timestamp: Thu 2010-02-11 11:52:17 +0100
message:
WorkingTreeFormat2 don't support not normalized filenames.
* bzrlib/tests/per_workingtree/test_smart_add.py:
(TestSmartAddTreeUnicode.test_accessible_explicit,
TestSmartAddTreeUnicode.test_accessible_implicit): Expected
failures for WorkingTreeFormat2.
=== modified file 'bzrlib/tests/per_workingtree/test_smart_add.py'
--- a/bzrlib/tests/per_workingtree/test_smart_add.py 2010-02-08 16:36:13
+0000
+++ b/bzrlib/tests/per_workingtree/test_smart_add.py 2010-02-11 10:52:17
+0000
@@ -269,7 +269,14 @@
def test_accessible_explicit(self):
osutils.normalized_filename = osutils._accessible_normalized_filename
- self.wt.smart_add([u'a\u030a'])
+ if isinstance(self.workingtree_format, workingtree.WorkingTreeFormat2):
+ self.expectFailure(
+ 'With WorkingTreeFormat2, smart_add requires'
+ ' normalized unicode filenames',
+ self.assertRaises, errors.NoSuchFile,
+ self.wt.smart_add, [u'a\u030a'])
+ else:
+ self.wt.smart_add([u'a\u030a'])
self.wt.lock_read()
self.addCleanup(self.wt.unlock)
self.assertEqual([('', 'directory'), (u'\xe5', 'file')],
@@ -278,12 +285,19 @@
def test_accessible_implicit(self):
osutils.normalized_filename = osutils._accessible_normalized_filename
- self.wt.smart_add([])
+ if isinstance(self.workingtree_format, workingtree.WorkingTreeFormat2):
+ self.expectFailure(
+ 'With WorkingTreeFormat2, smart_add requires'
+ ' normalized unicode filenames',
+ self.assertRaises, errors.NoSuchFile,
+ self.wt.smart_add, [])
+ else:
+ self.wt.smart_add([])
self.wt.lock_read()
self.addCleanup(self.wt.unlock)
self.assertEqual([('', 'directory'), (u'\xe5', 'file')],
- [(path, ie.kind) for path,ie in
- self.wt.inventory.iter_entries()])
+ [(path, ie.kind) for path,ie
+ in self.wt.inventory.iter_entries()])
def test_inaccessible_explicit(self):
osutils.normalized_filename = osutils._inaccessible_normalized_filename
--
bazaar-commits mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/bazaar-commits