~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/workingtree.py

  • Committer: John Arbash Meinel
  • Date: 2009-10-20 19:46:46 UTC
  • mfrom: (4759 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4771.
  • Revision ID: john@arbash-meinel.com-20091020194646-wnqpd15qs19y28z7
Merge bzr.dev 4759, bringing in static_tuple and streaming improvements.

Show diffs side-by-side

added added

removed removed

Lines of Context:
896
896
 
897
897
    @needs_write_lock # because merge pulls data into the branch.
898
898
    def merge_from_branch(self, branch, to_revision=None, from_revision=None,
899
 
        merge_type=None):
 
899
                          merge_type=None, force=False):
900
900
        """Merge from a branch into this working tree.
901
901
 
902
902
        :param branch: The branch to merge from.
911
911
            merger = Merger(self.branch, this_tree=self, pb=pb)
912
912
            merger.pp = ProgressPhase("Merge phase", 5, pb)
913
913
            merger.pp.next_phase()
914
 
            # check that there are no
915
 
            # local alterations
916
 
            merger.check_basis(check_clean=True, require_commits=False)
 
914
            # check that there are no local alterations
 
915
            if not force and self.has_changes():
 
916
                raise errors.UncommittedChanges(self)
917
917
            if to_revision is None:
918
918
                to_revision = _mod_revision.ensure_null(branch.last_revision())
919
919
            merger.other_rev_id = to_revision