Fix CVS downloads.

This commit is contained in:
Chris Johns 2013-04-21 21:43:17 +10:00
parent 5142becd8e
commit 5f44fcdd1b
2 changed files with 9 additions and 2 deletions

View File

@ -52,7 +52,9 @@ class repo:
def _run(self, args, check = False, cwd = None):
e = execute.capture_execution()
if path.exists(self.path):
if cwd is None:
if not path.exists(self.path):
raise error.general('cvs path needs to exist: %s' % (self.path))
cwd = self.path
cmd = [self.cvs, '-q'] + args
log.output('cmd: (%s) %s' % (str(cwd), ' '.join(cmd)))

View File

@ -226,7 +226,12 @@ def _cvs_downloader(url, local, config, opts):
repo = cvs.repo(local, opts, config.macros, src_prefix)
if not repo.valid():
log.notice('cvs: checkout: %s -> %s' % (us[0], rlp))
if not opts.dry_run():
if not path.isdir(local):
log.notice('Creating source directory: %s' % \
(os.path.relpath(path.host(local))))
log.output('making dir: %s' % (path.host(path.dirname(local))))
if not opts.dry_run():
path.mkdir(local)
repo.checkout(':%s' % (us[0][6:]), module, tag, date)
for a in us[1:]:
_as = a.split('=')