/breezy/trunk

To get this branch, use:
bzr branch https://code.breezy-vcs.org/breezy/trunk

« back to all changes in this revision

Viewing changes to breezy/tests/test_merge_core.py

  • Committer: Jelmer Vernooij
  • Date: 2017-07-23 22:06:41 UTC
  • mfrom: (6738 trunk)
  • mto: This revision was merged to the branch mainline in revision 6739.
  • Revision ID: jelmer@jelmer.uk-20170723220641-69eczax9bmv8d6kk
Merge trunk, address review comments.

Show diffs side-by-side

added added

removed removed

Lines of Context:
773
773
    def test_from_revision_ids(self):
774
774
        this, other = self.set_up_trees()
775
775
        self.assertRaises(errors.NoSuchRevision, Merger.from_revision_ids,
776
 
                          None, this, 'rev2b')
 
776
                          this, 'rev2b')
777
777
        this.lock_write()
778
778
        self.addCleanup(this.unlock)
779
 
        merger = Merger.from_revision_ids(None, this,
 
779
        merger = Merger.from_revision_ids(this,
780
780
            'rev2b', other_branch=other.branch)
781
781
        self.assertEqual('rev2b', merger.other_rev_id)
782
782
        self.assertEqual('rev1', merger.base_rev_id)
783
 
        merger = Merger.from_revision_ids(None, this,
 
783
        merger = Merger.from_revision_ids(this,
784
784
            'rev2b', 'rev2a', other_branch=other.branch)
785
785
        self.assertEqual('rev2a', merger.base_rev_id)
786
786
 
804
804
            other.branch.repository, 'rev3', 0, 0, 'this')
805
805
        other.lock_read()
806
806
        self.addCleanup(other.unlock)
807
 
        merger, verified = Merger.from_mergeable(this, md,
808
 
            None)
 
807
        merger, verified = Merger.from_mergeable(this, md)
809
808
        md.patch = None
810
 
        merger, verified = Merger.from_mergeable(this, md,
811
 
            None)
 
809
        merger, verified = Merger.from_mergeable(this, md)
812
810
        self.assertEqual('inapplicable', verified)
813
811
        self.assertEqual('rev3', merger.other_rev_id)
814
812
        self.assertEqual('rev1', merger.base_rev_id)
815
813
        md.base_revision_id = 'rev2b'
816
 
        merger, verified = Merger.from_mergeable(this, md,
817
 
            None)
 
814
        merger, verified = Merger.from_mergeable(this, md)
818
815
        self.assertEqual('rev2b', merger.base_rev_id)
819
816
 
820
817
    def test_from_mergeable_old_merge_directive(self):
823
820
        self.addCleanup(other.unlock)
824
821
        md = merge_directive.MergeDirective.from_objects(
825
822
            other.branch.repository, 'rev3', 0, 0, 'this')
826
 
        merger, verified = Merger.from_mergeable(this, md,
827
 
            None)
 
823
        merger, verified = Merger.from_mergeable(this, md)
828
824
        self.assertEqual('rev3', merger.other_rev_id)
829
825
        self.assertEqual('rev1', merger.base_rev_id)