/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/test_commit_merge.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-03-13 05:55:15 UTC
  • mfrom: (2348.1.2 mz.symlinks)
  • Revision ID: pqm@pqm.ubuntu.com-20070313055515-823e15af73d49270
(marienz,r=john,r=mbp) fix error committing merge with symlinks in dirstate

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
from bzrlib.branch import Branch
23
23
from bzrlib.errors import PointlessCommit, BzrError
24
24
from bzrlib.tests.test_revision import make_branches
 
25
from bzrlib import osutils
25
26
 
26
27
 
27
28
class TestCommitMerge(TestCaseWithTransport):
96
97
        by.check()
97
98
        bx.repository.check([bx.last_revision()])
98
99
        by.repository.check([by.last_revision()])
 
100
 
 
101
    def test_merge_with_symlink(self):
 
102
        if not osutils.has_symlinks():
 
103
            raise TestSkipped('Symlinks are not supported on this platform')
 
104
        tree_a = self.make_branch_and_tree('tree_a')
 
105
        os.symlink('target', osutils.pathjoin('tree_a', 'link'))
 
106
        tree_a.add('link')
 
107
        tree_a.commit('added link')
 
108
        tree_b = tree_a.bzrdir.sprout('tree_b').open_workingtree()
 
109
        self.build_tree(['tree_a/file'])
 
110
        tree_a.add('file')
 
111
        tree_a.commit('added file')
 
112
        self.build_tree(['tree_b/another_file'])
 
113
        tree_b.add('another_file')
 
114
        tree_b.commit('add another file')
 
115
        tree_b.merge_from_branch(tree_a.branch)
 
116
        tree_b.commit('merge')