~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_merge.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-09-05 05:11:39 UTC
  • mfrom: (2796.1.4 bzr.ab.integration)
  • Revision ID: pqm@pqm.ubuntu.com-20070905051139-bogf0ne9pzsbsrs3
Use None to indicate 'no specific files' in revert, iter_changes

Show diffs side-by-side

added added

removed removed

Lines of Context:
67
67
        self.run_bzr('merge ../b -r last:1..last:1 --merge-type blooof',
68
68
                    retcode=3)
69
69
        self.run_bzr('merge ../b -r last:1..last:1 --merge-type merge3')
70
 
        a_tree.revert([], backups=False)
 
70
        a_tree.revert(backups=False)
71
71
        self.run_bzr('merge ../b -r last:1..last:1 --merge-type weave')
72
 
        a_tree.revert([], backups=False)
 
72
        a_tree.revert(backups=False)
73
73
        self.run_bzr_error(['Show-base is not supported for this merge type'],
74
74
                           'merge ../b -r last:1..last:1 --merge-type weave'
75
75
                           ' --show-base')
76
 
        a_tree.revert([], backups=False)
 
76
        a_tree.revert(backups=False)
77
77
        self.run_bzr('merge ../b -r last:1..last:1 --reprocess')
78
 
        a_tree.revert([], backups=False)
 
78
        a_tree.revert(backups=False)
79
79
        self.run_bzr('merge ../b -r last:1')
80
80
        self.check_file_contents('goodbye', 'quux')
81
81
        # Merging a branch pulls its revision into the tree
83
83
        b_tip = b.last_revision()
84
84
        self.failUnless(a.branch.repository.has_revision(b_tip))
85
85
        self.assertEqual([a_tip, b_tip], a.get_parent_ids())
86
 
        a_tree.revert([], backups=False)
 
86
        a_tree.revert(backups=False)
87
87
        out, err = self.run_bzr('merge -r revno:1:./hello', retcode=3)
88
88
        self.assertTrue("Not a branch" in err)
89
89
        self.run_bzr('merge -r revno:%d:./..revno:%d:../b'
91
91
        self.assertEquals(a.get_parent_ids(), 
92
92
                          [a.branch.last_revision(), b.last_revision()])
93
93
        self.check_file_contents('goodbye', 'quux')
94
 
        a_tree.revert([], backups=False)
 
94
        a_tree.revert(backups=False)
95
95
        self.run_bzr('merge -r revno:%d:../b'%b.revno())
96
96
        self.assertEquals(a.get_parent_ids(),
97
97
                          [a.branch.last_revision(), b.last_revision()])
235
235
        self.run_bzr('merge a --uncommitted -d b')
236
236
        self.failUnlessExists('b/file_1')
237
237
        self.failUnlessExists('b/file_ii')
238
 
        tree_b.revert([])
 
238
        tree_b.revert()
239
239
        self.run_bzr_error(('Cannot use --uncommitted and --revision',),
240
240
                           'merge /a --uncommitted -r1 -d b')
241
241
 
270
270
        os.chdir('tree_b')
271
271
        self.run_bzr('merge ../tree_a')
272
272
        self.assertEqual('directory', file_kind('file'))
273
 
        tree_b.revert([])
 
273
        tree_b.revert()
274
274
        self.assertEqual('file', file_kind('file'))
275
275
        self.build_tree_contents([('file', 'content_2')])
276
276
        tree_b.commit('content change')
313
313
        self.write_directive('directive', source.branch, 'target', 'rev1')
314
314
        err = self.run_bzr('merge -d target directive')[1]
315
315
        self.assertNotContainsRe(err, 'Preview patch does not match changes')
316
 
        target.revert([])
 
316
        target.revert()
317
317
        self.write_directive('directive', source.branch, 'target', 'rev1',
318
318
                             mangle_patch=True)
319
319
        err = self.run_bzr('merge -d target directive')[1]
339
339
        self.run_bzr('merge -d target -r revid:rev2a branch_a')
340
340
        self.failUnlessExists('target/file1')
341
341
        self.failIfExists('target/file2')
342
 
        target.revert([])
 
342
        target.revert()
343
343
 
344
344
        # It should work if the revid has no integer revno
345
345
        self.run_bzr('merge -d target -r revid:rev2a branch_b')