/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

  • Committer: Jelmer Vernooij
  • Date: 2009-06-03 21:31:43 UTC
  • mfrom: (4403 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4405.
  • Revision ID: jelmer@samba.org-20090603213143-0196mgzgefgvd5no
Merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
101
101
    def _open_hook(self):
102
102
        """Called by init to allow simpler extension of the base class."""
103
103
 
104
 
    def _activate_fallback_location(self, url, lock_style):
 
104
    def _activate_fallback_location(self, url):
105
105
        """Activate the branch/repository from url as a fallback repository."""
106
106
        repo = self._get_fallback_repository(url)
107
 
        if lock_style == 'write':
108
 
            repo.lock_write()
109
 
        elif lock_style == 'read':
110
 
            repo.lock_read()
111
107
        self.repository.add_fallback_repository(repo)
112
108
 
113
109
    def break_lock(self):
656
652
                self.repository.fetch(source_repository, revision_id,
657
653
                    find_ghosts=True)
658
654
        else:
659
 
            self._activate_fallback_location(url, 'write')
 
655
            self._activate_fallback_location(url)
660
656
        # write this out after the repository is stacked to avoid setting a
661
657
        # stacked config that doesn't work.
662
658
        self._set_config_location('stacked_on_location', url)
2374
2370
                    raise AssertionError(
2375
2371
                        "'transform_fallback_location' hook %s returned "
2376
2372
                        "None, not a URL." % hook_name)
2377
 
            self._activate_fallback_location(url, None)
 
2373
            self._activate_fallback_location(url)
2378
2374
 
2379
2375
    def __init__(self, *args, **kwargs):
2380
2376
        self._ignore_fallbacks = kwargs.get('ignore_fallbacks', False)