def _validateConfiguration(self): """ Mercurial expects all data to be in utf-8, so we disallow other encodings """ Repository._validateConfiguration(self) if self.encoding.upper() != 'UTF-8': self.log.warning("Forcing UTF-8 encoding instead of " + self.encoding) self.encoding = 'UTF-8'
def _validateConfiguration(self): from os.path import split from vcpx.config import ConfigurationError Repository._validateConfiguration(self) if not self.module and self.repository: self.module = split(self.repository)[1] if not self.module: self.log.critical('Missing module information in %r', self.name) raise ConfigurationError("Must specify a repository and maybe " "a module also") if self.module.endswith('/'): self.log.debug("Removing final slash from %r in %r", self.module, self.name) self.module = self.module.rstrip('/')
def _validateConfiguration(self): from vcpx.config import ConfigurationError Repository._validateConfiguration(self) if not self.repository: self.log.critical('Missing repository information in %r', self.name) raise ConfigurationError("Must specify the root of the " "Subversion repository used " "as %s with the option " "'repository'" % self.which) elif self.repository.endswith('/'): self.log.debug("Removing final slash from %r in %r", self.repository, self.name) self.repository = self.repository.rstrip('/') if not self.module: self.log.critical('Missing module information in %r', self.name) raise ConfigurationError("Must specify the path within the " "Subversion repository as 'module'") if self.module == '.': self.log.warning("Replacing '.' with '/' in module name in %r", self.name) self.module = '/' elif not self.module.startswith('/'): self.log.debug("Prepending '/' to module %r in %r", self.module, self.name) self.module = '/' + self.module if not self.tags_path.startswith('/'): self.log.debug("Prepending '/' to svn-tags %r in %r", self.tags_path, self.name) self.tags_path = '/' + self.tags_path if not self.branches_path.startswith('/'): self.log.debug("Prepending '/' to svn-branches %r in %r", self.branches_path, self.name) self.branches_path = '/' + self.branches_path