~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/branch.py

Merged John Meinel's integration

Show diffs side-by-side

added added

removed removed

Lines of Context:
334
334
        """Return a `Tree` for the working copy if this is a local branch."""
335
335
        raise NotImplementedError('working_tree is abstract')
336
336
 
337
 
    def pull(self, source, overwrite=False):
 
337
    def pull(self, source, overwrite=False, stop_revision=None):
338
338
        raise NotImplementedError('pull is abstract')
339
339
 
340
340
    def basis_tree(self):
933
933
    def update_revisions(self, other, stop_revision=None):
934
934
        """See Branch.update_revisions."""
935
935
        from bzrlib.fetch import greedy_fetch
 
936
 
936
937
        if stop_revision is None:
937
938
            stop_revision = other.last_revision()
938
939
        ### Should this be checking is_ancestor instead of revision_history?
987
988
        return WorkingTree(self.base, branch=self)
988
989
 
989
990
    @needs_write_lock
990
 
    def pull(self, source, overwrite=False):
 
991
    def pull(self, source, overwrite=False, stop_revision=None):
991
992
        """See Branch.pull."""
992
993
        source.lock_read()
993
994
        try:
994
995
            old_count = len(self.revision_history())
995
996
            try:
996
 
                self.update_revisions(source)
 
997
                self.update_revisions(source,stop_revision)
997
998
            except DivergedBranches:
998
999
                if not overwrite:
999
1000
                    raise