/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 bzrlib/tests/branch_implementations/test_sprout.py

Fix #339055 and #277444 by handling non ascii symlink targets.

* bzrlib/tests/tree_implementations/test_path_content_summary.py:
(TestPathContentSummary.test_unicode_symlink_target_summary): Test
adding a non ascii symlink target.

* bzrlib/tests/workingtree_implementations/test_parents.py:
(TestSetParents.test_unicode_symlink): Should not fail anymore

* bzrlib/tests/branch_implementations/test_sprout.py:
(TestSprout.test_sprout_with_unicode_symlink): Should not fail anymore.

* bzrlib/workingtree.py:
(WorkingTree.path_content_summary): Get the symlink target as
unicode.

* bzrlib/transform.py:
(_PreviewTree.path_content_summary): Get the symlink target as
unicode.

* bzrlib/dirstate.py:
(DirState._read_link): abspath should stay in Unicode.
(DirState._inv_entry_to_details): Encode path in utf8 for the
fingerprint.

Show diffs side-by-side

added added

removed removed

Lines of Context:
143
143
        os.symlink(u'\u03a9','tree1/link_name')
144
144
        tree.add(['link_name'],['link-id'])
145
145
 
146
 
        try:
147
 
            # python 2.7a0 failed on commit:
148
 
            revision = tree.commit('added a link to a Unicode target')
149
 
            # python 2.5 failed on sprout:
150
 
            tree.bzrdir.sprout('target')
151
 
        except UnicodeEncodeError, e:
152
 
            raise KnownFailure('there is no support for'
153
 
                               ' symlinks to non-ASCII targets (bug #272444)')
 
146
        # python 2.7a0 failed on commit:
 
147
        revision = tree.commit('added a link to a Unicode target')
 
148
        # python 2.5 failed on sprout:
 
149
        tree.bzrdir.sprout('target')
154
150
 
155
151
    def assertBranchHookBranchIsStacked(self, pre_change_params):
156
152
        # Just calling will either succeed or fail.