Changeset 527 in tailor for vcpx/repository.py
- Timestamp:
- 08/09/05 01:36:47 (8 years ago)
- Hash name:
- 20050808233647-97f81-c2b161feb61fde0d387d466b1710dc661e822899
- File:
-
- 1 edited
-
vcpx/repository.py (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
vcpx/repository.py
r521 r527 35 35 as ``source-repository`` (or ``target-repository``) in its [DEFAULT] 36 36 section. 37 38 If the configuration does not specify a specific ``root-directory`` 39 take the one from the project. 37 40 """ 38 41 … … 45 48 self.module = config.get(self.name, 'module') or \ 46 49 config.get(self.name, '%s-module' % which) 47 if not self.module and self.repository: 48 self.module = split(self.repository)[1] 50 self.rootdir = config.get(self.name, 'root-directory', 51 self.project.rootdir) 52 self.subdir = config.get(self.name, 'subdir', self.project.subdir) 53 54 def _validateConfiguration(self): 55 """ 56 Validate the configuration, possibly altering/completing it. 57 """ 58 59 def log_info(self, what): 60 """ 61 Print some info on the log and, in verbose mode, to stdout as well. 62 """ 63 64 self.project.log_info(what) 65 66 def log_error(self, what, exc=False): 67 """ 68 Print an error message, possibly with an exception traceback, 69 to the log and to stdout as well. 70 """ 71 72 self.project.log_error(what, exc) 49 73 50 74 def workingDir(self): … … 53 77 repository. 54 78 """ 79 80 from source import InvocationError 81 82 self._validateConfiguration() 55 83 56 84 wdname = self.kind.capitalize() + 'WorkingDir' … … 61 89 except (AttributeError, ImportError): 62 90 raise InvocationError("Unhandled source VCS kind: " + self.kind) 63 return workingdir() 91 92 return workingdir(self) 64 93 65 94 … … 73 102 74 103 104 75 105 class BzrRepository(Repository): 76 106 METADIR = '.bzr' … … 99 129 self.CVS_CMD = config.get(self.name, 'cvs-command', self.CVS_CMD) 100 130 131 def _validateConfiguration(self): 132 from os.path import split 133 from config import ConfigurationError 134 135 136 if not self.module and self.repository: 137 self.module = split(self.repository)[1] 138 139 if not self.module: 140 raise ConfigurationError("Must specify a repository and maybe a module also") 101 141 102 142 class CvspsRepository(CvsRepository): … … 148 188 'svnadmin-command', self.SVNADMIN_CMD) 149 189 self.use_propset = config.get(self.name, 'use-propset', False) 190 191 def _validateConfiguration(self): 192 if not self.module: 193 raise ConfigurationError("Must the path within the " 194 "Subversion repository") 195 150 196 if not self.module.startswith('/'): 197 self.project.log_info("Prepending '/' to module") 151 198 self.module = '/' + self.module 152 199
Note: See TracChangeset
for help on using the changeset viewer.
