~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/branch.py

merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
867
867
        return InterBranch.get(self, target).push(overwrite, stop_revision,
868
868
            *args, **kwargs)
869
869
 
 
870
    def lossy_push(self, target, stop_revision=None):
 
871
        """Push deltas into another branch.
 
872
 
 
873
        :note: This does not, like push, retain the revision ids from 
 
874
            the source branch and will, rather than adding bzr-specific 
 
875
            metadata, push only those semantics of the revision that can be 
 
876
            natively represented by this branch' VCS.
 
877
 
 
878
        :param target: Target branch
 
879
        :param stop_revision: Revision to push, defaults to last revision.
 
880
        :return: Dictionary mapping revision ids from the target branch 
 
881
            to new revision ids in the target branch, for each 
 
882
            revision that was pushed.
 
883
        """
 
884
        inter = InterBranch.get(self, target)
 
885
        lossy_push = getattr(inter, "lossy_push", None)
 
886
        if lossy_push is None:
 
887
            raise errors.LossyPushToSameVCS(self, target)
 
888
        return lossy_push(stop_revision)
 
889
 
870
890
    def basis_tree(self):
871
891
        """Return `Tree` object for last revision."""
872
892
        return self.repository.revision_tree(self.last_revision())