/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 bzrlib/branch.py

Merge from integration.

Show diffs side-by-side

added added

removed removed

Lines of Context:
300
300
            raise bzrlib.errors.NoSuchRevision(self, revno)
301
301
        return history[revno - 1]
302
302
 
303
 
    def pull(self, source, overwrite=False):
 
303
    def pull(self, source, overwrite=False, stop_revision=None):
304
304
        raise NotImplementedError('pull is abstract')
305
305
 
306
306
    def basis_tree(self):
964
964
    def update_revisions(self, other, stop_revision=None):
965
965
        """See Branch.update_revisions."""
966
966
        from bzrlib.fetch import greedy_fetch
 
967
 
967
968
        if stop_revision is None:
968
969
            stop_revision = other.last_revision()
969
970
        ### Should this be checking is_ancestor instead of revision_history?
1009
1010
        return WorkingTree(self.base, branch=self)
1010
1011
 
1011
1012
    @needs_write_lock
1012
 
    def pull(self, source, overwrite=False):
 
1013
    def pull(self, source, overwrite=False, stop_revision=None):
1013
1014
        """See Branch.pull."""
1014
1015
        source.lock_read()
1015
1016
        try:
1016
1017
            old_count = len(self.revision_history())
1017
1018
            try:
1018
 
                self.update_revisions(source)
 
1019
                self.update_revisions(source,stop_revision)
1019
1020
            except DivergedBranches:
1020
1021
                if not overwrite:
1021
1022
                    raise