/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 breezy/merge.py

  • Committer: Jelmer Vernooij
  • Date: 2017-06-24 13:32:35 UTC
  • mto: This revision was merged to the branch mainline in revision 6724.
  • Revision ID: jelmer@jelmer.uk-20170624133235-63mhlqloksjgie83
Fix some tests.

Show diffs side-by-side

added added

removed removed

Lines of Context:
352
352
                                      _set_base_is_other_ancestor)
353
353
 
354
354
    @staticmethod
355
 
    def from_uncommitted(tree, other_tree, pb=None, base_tree=None):
 
355
    def from_uncommitted(tree, other_tree, base_tree=None):
356
356
        """Return a Merger for uncommitted changes in other_tree.
357
357
 
358
358
        :param tree: The tree to merge into
359
359
        :param other_tree: The tree to get uncommitted changes from
360
 
        :param pb: A progress indicator
361
360
        :param base_tree: The basis to use for the merge.  If unspecified,
362
361
            other_tree.basis_tree() will be used.
363
362
        """
364
363
        if base_tree is None:
365
364
            base_tree = other_tree.basis_tree()
366
 
        merger = Merger(tree.branch, other_tree, base_tree, tree, pb)
 
365
        merger = Merger(tree.branch, other_tree, base_tree, tree)
367
366
        merger.base_rev_id = merger.base_tree.get_revision_id()
368
367
        merger.other_rev_id = None
369
368
        merger.other_basis = merger.base_rev_id
370
369
        return merger
371
370
 
372
371
    @classmethod
373
 
    def from_mergeable(klass, tree, mergeable, pb):
 
372
    def from_mergeable(klass, tree, mergeable):
374
373
        """Return a Merger for a bundle or merge directive.
375
374
 
376
375
        :param tree: The tree to merge changes into
377
376
        :param mergeable: A merge directive or bundle
378
 
        :param pb: A progress indicator
379
377
        """
380
378
        mergeable.install_revisions(tree.branch.repository)
381
379
        base_revision_id, other_revision_id, verified =\
388
386
                base_revision_id = None
389
387
            else:
390
388
                trace.warning('Performing cherrypick')
391
 
        merger = klass.from_revision_ids(pb, tree, other_revision_id,
 
389
        merger = klass.from_revision_ids(tree, other_revision_id,
392
390
                                         base_revision_id, revision_graph=
393
391
                                         revision_graph)
394
392
        return merger, verified
395
393
 
396
394
    @staticmethod
397
 
    def from_revision_ids(pb, tree, other, base=None, other_branch=None,
 
395
    def from_revision_ids(tree, other, base=None, other_branch=None,
398
396
                          base_branch=None, revision_graph=None,
399
397
                          tree_branch=None):
400
398
        """Return a Merger for revision-ids.
401
399
 
402
 
        :param pb: A progress indicator
403
400
        :param tree: The tree to merge changes into
404
401
        :param other: The revision-id to use as OTHER
405
402
        :param base: The revision-id to use as BASE.  If not specified, will
415
412
        """
416
413
        if tree_branch is None:
417
414
            tree_branch = tree.branch
418
 
        merger = Merger(tree_branch, this_tree=tree, pb=pb,
 
415
        merger = Merger(tree_branch, this_tree=tree,
419
416
                        revision_graph=revision_graph)
420
417
        if other_branch is None:
421
418
            other_branch = tree.branch
640
637
        if self._is_criss_cross and getattr(self.merge_type,
641
638
                                            'supports_lca_trees', False):
642
639
            kwargs['lca_trees'] = self._lca_trees
643
 
        return self.merge_type(pb=None,
644
 
                               change_reporter=self.change_reporter,
 
640
        return self.merge_type(change_reporter=self.change_reporter,
645
641
                               **kwargs)
646
642
 
647
643
    def _do_merge_to(self):
1913
1909
                other_rev_id=None,
1914
1910
                interesting_files=None,
1915
1911
                this_tree=None,
1916
 
                pb=None,
1917
1912
                change_reporter=None):
1918
1913
    """Primary interface for merging.
1919
1914
 
1926
1921
        raise errors.BzrError("breezy.merge.merge_inner requires a this_tree "
1927
1922
                              "parameter")
1928
1923
    merger = Merger(this_branch, other_tree, base_tree, this_tree=this_tree,
1929
 
                    pb=pb, change_reporter=change_reporter)
 
1924
                    change_reporter=change_reporter)
1930
1925
    merger.backup_files = backup_files
1931
1926
    merger.merge_type = merge_type
1932
1927
    merger.interesting_ids = interesting_ids