~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: 2009-11-17 03:20:35 UTC
  • mfrom: (4792.4.3 456036)
  • Revision ID: pqm@pqm.ubuntu.com-20091117032035-s3sgtlixj1lrminn
(Gordon Tyler) Fix IndexError during 'bzr ignore /' (#456036)

Show diffs side-by-side

added added

removed removed

Lines of Context:
211
211
        self.failUnlessExists('sub/a.txt.OTHER')
212
212
        self.failUnlessExists('sub/a.txt.BASE')
213
213
 
214
 
    def test_conflict_leaves_base_this_other_files(self):
215
 
        tree, other = self.create_conflicting_branches()
216
 
        self.run_bzr('merge ../other', working_dir='tree',
217
 
                     retcode=1)
218
 
        self.assertFileEqual('a\nb\nc\n', 'tree/fname.BASE')
219
 
        self.assertFileEqual('a\nB\nD\n', 'tree/fname.OTHER')
220
 
        self.assertFileEqual('a\nB\nC\n', 'tree/fname.THIS')
221
 
 
222
 
    def test_weave_conflict_leaves_base_this_other_files(self):
223
 
        tree, other = self.create_conflicting_branches()
224
 
        self.run_bzr('merge ../other --weave', working_dir='tree',
225
 
                     retcode=1)
226
 
        self.assertFileEqual('a\nb\nc\n', 'tree/fname.BASE')
227
 
        self.assertFileEqual('a\nB\nD\n', 'tree/fname.OTHER')
228
 
        self.assertFileEqual('a\nB\nC\n', 'tree/fname.THIS')
229
 
 
230
214
    def test_merge_remember(self):
231
215
        """Merge changes from one branch to another, test submit location."""
232
216
        tree_a = self.make_branch_and_tree('branch_a')
605
589
        self.run_bzr('merge -d this other -r0..')
606
590
        self.failUnlessExists('this/other_file')
607
591
 
608
 
    def test_merge_interactive_unlocks_branch(self):
609
 
        this = self.make_branch_and_tree('this')
610
 
        other = self.make_branch_and_tree('other')
611
 
        other.commit('empty commit')
612
 
        self.run_bzr('merge -i -d this other')
613
 
        this.lock_write()
614
 
        this.unlock()
615
 
 
616
 
    def test_merge_reversed_revision_range(self):
617
 
        tree = self.make_branch_and_tree(".")
618
 
        for f in ("a", "b"):
619
 
            self.build_tree([f])
620
 
            tree.add(f)
621
 
            tree.commit("added "+f)
622
 
        for context in (".", "", "a"):
623
 
            self.run_bzr("merge -r 1..0 " + context)
624
 
            self.failIfExists("a")
625
 
            tree.revert()
626
 
            self.failUnlessExists("a")
627
 
 
628
592
 
629
593
class TestMergeForce(tests.TestCaseWithTransport):
630
594