def initialize(self, controldir, shared=False, _internal=False): from breezy.plugins.hg.dir import HgDir if shared: raise errors.IncompatibleFormat(self, controldir._format) if isinstance(controldir, HgDir): return controldir.open_repository() raise errors.UninitializableFormat(self)
def create_repository(self, shared=None, format=None): """See ControlDir.create_repository.""" if shared: from .repository import SvnRepositoryFormat raise errors.IncompatibleFormat(SvnRepositoryFormat(), self._format) return self.open_repository()
def initialize(self, a_controldir, name=None, repository=None, append_revisions_only=None): from breezy.plugins.hg.dir import HgDir if name is None: name = 'default' if not isinstance(a_controldir, HgDir): raise errors.IncompatibleFormat(self, a_controldir._format) bm = a_controldir._hgrepo.branchmap() if name in bm: raise errors.AlreadyBranchError(a_controldir.user_url) return a_controldir.create_branch(name=name, append_revisions_only=append_revisions_only)
def set_branch_reference(self, target_branch, name=None): # Sorry, no branch references. raise errors.IncompatibleFormat(target_branch._format, self._format)
def create_repository(self, shared=False): """'create' a repository for this dir.""" if shared: raise errors.IncompatibleFormat(self._format, self._format) return self.open_repository()