~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_commit_merge.py

first cut at merge from integration.

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, PointlessCommit
24
24
from bzrlib.tests.test_revision import make_branches
 
25
from bzrlib.fetch import fetch
25
26
from bzrlib.check import check
26
27
 
27
28
 
42
43
        wtx.commit('commit one', rev_id='x@u-0-1', allow_pointless=True)
43
44
        wty.commit('commit two', rev_id='y@u-0-1', allow_pointless=True)
44
45
 
45
 
        self.assertEqual((1, []), by.fetch(bx))
 
46
        fetcher = fetch(from_branch=bx, to_branch=by)
 
47
        self.assertEqual(1, fetcher.count_copied)
 
48
        self.assertEqual([], fetcher.failed_revisions)
46
49
        # just having the history there does nothing
47
50
        self.assertRaises(PointlessCommit,
48
51
                          wty.commit,
73
76
        wtx.commit('commit one', rev_id='x@u-0-1', allow_pointless=True)
74
77
        wty.commit('commit two', rev_id='y@u-0-1', allow_pointless=True)
75
78
 
76
 
        by.fetch(bx)
 
79
        fetch(from_branch=bx, to_branch=by)
77
80
        # we haven't merged the texts, but let's fake it
78
81
        shutil.copyfile('x/ecks', 'y/ecks')
79
82
        wty.add(['ecks'], ['ecks-id'])