~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/branch.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-06-23 09:05:52 UTC
  • mfrom: (4462.3.3 stacking-policy)
  • Revision ID: pqm@pqm.ubuntu.com-20090623090552-hzfy5mv9hfcral7j
(robertc) Do not permit stacking a branch on itself. (Robert Collins,
        \#376243)

Show diffs side-by-side

added added

removed removed

Lines of Context:
105
105
    def _activate_fallback_location(self, url):
106
106
        """Activate the branch/repository from url as a fallback repository."""
107
107
        repo = self._get_fallback_repository(url)
 
108
        if repo.has_same_location(self.repository):
 
109
            raise errors.UnstackableLocationError(self.base, url)
108
110
        self.repository.add_fallback_repository(repo)
109
111
 
110
112
    def break_lock(self):