~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/workingtree.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-07-31 12:22:44 UTC
  • mfrom: (1551.15.77 Aaron's mergeable stuff)
  • Revision ID: pqm@pqm.ubuntu.com-20070731122244-f1jemfecukeevugw
Clean up merge command, support arbitrary revisions

Show diffs side-by-side

added added

removed removed

Lines of Context:
800
800
        self._control_files.put(filename, my_file)
801
801
 
802
802
    @needs_write_lock # because merge pulls data into the branch.
803
 
    def merge_from_branch(self, branch, to_revision=None):
 
803
    def merge_from_branch(self, branch, to_revision=None, from_revision=None,
 
804
        merge_type=None):
804
805
        """Merge from a branch into this working tree.
805
806
 
806
807
        :param branch: The branch to merge from.
831
832
                merger.other_rev_id)
832
833
            merger.other_branch = branch
833
834
            merger.pp.next_phase()
834
 
            merger.find_base()
 
835
            if from_revision is None:
 
836
                merger.find_base()
 
837
            else:
 
838
                merger.set_base_revision(from_revision, branch)
835
839
            if merger.base_rev_id == merger.other_rev_id:
836
840
                raise errors.PointlessMerge
837
841
            merger.backup_files = False
838
 
            merger.merge_type = Merge3Merger
 
842
            if merge_type is None:
 
843
                merger.merge_type = Merge3Merger
 
844
            else:
 
845
                merger.merge_type = merge_type
839
846
            merger.set_interesting_files(None)
840
847
            merger.show_base = False
841
848
            merger.reprocess = False