~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/branch.py

Merge bzr.dev 4157, this breaks a couple per-repository tests.

Looks like removing some of the InterRepo optimizers is revealing places
that we haven't fully finished the RemoteRepo api.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005, 2006, 2007, 2008 Canonical Ltd
 
1
# Copyright (C) 2005, 2006, 2007, 2008, 2009 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
30
30
        lockable_files,
31
31
        repository,
32
32
        revision as _mod_revision,
 
33
        symbol_versioning,
33
34
        transport,
34
35
        tsort,
35
36
        ui,
478
479
        """
479
480
        if self.base == from_branch.base:
480
481
            return (0, [])
481
 
        if pb is None:
482
 
            nested_pb = ui.ui_factory.nested_progress_bar()
483
 
            pb = nested_pb
484
 
        else:
485
 
            nested_pb = None
486
 
 
 
482
        if pb is not None:
 
483
            symbol_versioning.warn(
 
484
                symbol_versioning.deprecated_in((1, 14, 0))
 
485
                % "pb parameter to fetch()")
487
486
        from_branch.lock_read()
488
487
        try:
489
488
            if last_revision is None:
490
 
                pb.update('get source history')
491
489
                last_revision = from_branch.last_revision()
492
490
                last_revision = _mod_revision.ensure_null(last_revision)
493
491
            return self.repository.fetch(from_branch.repository,
494
492
                                         revision_id=last_revision,
495
 
                                         pb=nested_pb)
 
493
                                         pb=pb)
496
494
        finally:
497
 
            if nested_pb is not None:
498
 
                nested_pb.finished()
499
495
            from_branch.unlock()
500
496
 
501
497
    def get_bound_location(self):