~amanica/bzr/320119-log_exclusive_lower_bound

« back to all changes in this revision

Viewing changes to bzrlib/tests/branch_implementations/test_sprout.py

  • Committer: Johan Walles
  • Date: 2009-05-06 05:36:28 UTC
  • mfrom: (4332 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4343.
  • Revision ID: johan.walles@gmail.com-20090506053628-tbf1wz4a0m9t684g
MergeĀ fromĀ upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
from bzrlib import (
21
21
    branch as _mod_branch,
22
22
    errors,
 
23
    osutils,
23
24
    remote,
24
25
    revision as _mod_revision,
25
26
    tests,
139
140
        # The link points to a file whose name is an omega
140
141
        # U+03A9 GREEK CAPITAL LETTER OMEGA
141
142
        # UTF-8: ce a9  UTF-16BE: 03a9  Decimal: Ω
142
 
        os.symlink(u'\u03a9','tree1/link_name')
143
 
        tree.add(['link_name'],['link-id'])
 
143
        target = u'\u03a9'
 
144
        link_name = u'\N{Euro Sign}link'
 
145
        os.symlink(target, 'tree1/' + link_name)
 
146
        tree.add([link_name],['link-id'])
144
147
 
145
148
        revision = tree.commit('added a link to a Unicode target')
146
 
        tree.bzrdir.sprout('target')
 
149
        tree.bzrdir.sprout('dest')
 
150
        self.assertEqual(target, osutils.readlink('dest/' + link_name))
 
151
        tree.lock_read()
 
152
        self.addCleanup(tree.unlock)
 
153
        # Check that the symlink target is safely round-tripped in the trees.
 
154
        self.assertEqual(target, tree.get_symlink_target('link-id'))
 
155
        self.assertEqual(target,
 
156
                         tree.basis_tree().get_symlink_target('link-id'))
147
157
 
148
158
    def assertBranchHookBranchIsStacked(self, pre_change_params):
149
159
        # Just calling will either succeed or fail.