/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: Andrew Bennetts
  • Date: 2009-06-03 04:42:02 UTC
  • mfrom: (4399 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4401.
  • Revision ID: andrew.bennetts@canonical.com-20090603044202-bq5pwfme4fve3xbt
Merge, resolving NEWS conflict.

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)
932
928
            location = None
933
929
        return location
934
930
 
 
931
    def get_child_submit_format(self):
 
932
        """Return the preferred format of submissions to this branch."""
 
933
        return self.get_config().get_user_option("child_submit_format")
 
934
 
935
935
    def get_submit_branch(self):
936
936
        """Return the submit location of the branch.
937
937
 
2366
2366
                    raise AssertionError(
2367
2367
                        "'transform_fallback_location' hook %s returned "
2368
2368
                        "None, not a URL." % hook_name)
2369
 
            self._activate_fallback_location(url, None)
 
2369
            self._activate_fallback_location(url)
2370
2370
 
2371
2371
    def __init__(self, *args, **kwargs):
2372
2372
        self._ignore_fallbacks = kwargs.get('ignore_fallbacks', False)