From e6170c3968596c4398e3ea22844d0bbd8e1fe016 Mon Sep 17 00:00:00 2001 From: mhagger Date: Tue, 24 May 2011 08:39:34 +0000 Subject: [PATCH] rcsparse update: Also export the ViewVC license to cvs2svn_rcsparse. git-svn-id: http://cvs2svn.tigris.org/svn/cvs2svn/trunk@5354 be7e6eca-30d4-0310-a8e5-ac0d63af7087 --- cvs2svn_rcsparse/update | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/cvs2svn_rcsparse/update b/cvs2svn_rcsparse/update index b630f009..8207e160 100755 --- a/cvs2svn_rcsparse/update +++ b/cvs2svn_rcsparse/update @@ -10,7 +10,8 @@ import re VIEWVC_REPOS = 'http://viewvc.tigris.org/svn/viewvc' BRANCH = 'trunk' -URL = '/'.join([VIEWVC_REPOS, BRANCH, 'lib/vclib/ccvs/rcsparse']) +RCSPARSE_URL = '/'.join([VIEWVC_REPOS, BRANCH, 'lib/vclib/ccvs/rcsparse']) +LICENSE_URL = '/'.join([VIEWVC_REPOS, BRANCH, 'LICENSE.html']) DEST = os.path.dirname(__file__) @@ -18,7 +19,7 @@ DEST = os.path.dirname(__file__) def get_current_revision(): revision_re = re.compile(r'^Revision\:\s*(?P\d+)$') - cmd = ['svn', 'info', URL] + cmd = ['svn', 'info', VIEWVC_REPOS] sys.stderr.write('%s\n' % (' '.join(cmd),)) p = subprocess.Popen(cmd, stdout=subprocess.PIPE) (out, err) = p.communicate() @@ -31,18 +32,23 @@ def get_current_revision(): 'Could not determine the current revision of the ViewVC repository!' ) -revision = get_current_revision() +def export(url, revision, dest): + cmd = ['svn', 'export', '-r', str(revision), '--force', url, dest] + sys.stderr.write('%s\n' % (' '.join(cmd),)) + retcode = subprocess.call(cmd) + + if retcode: + sys.exit('Export failed!') -cmd = ['svn', 'export', '-r', str(revision), '--force', URL, DEST] -sys.stderr.write('%s\n' % (' '.join(cmd),)) -retcode = subprocess.call(cmd) -if retcode: - sys.exit('Export failed!') +revision = get_current_revision() + +export(RCSPARSE_URL, revision, DEST) +export(LICENSE_URL, revision, os.path.join(DEST, 'LICENSE.html')) # Record which version of the upstream source was downloaded: open(os.path.join(DEST, 'UPSTREAM_SOURCE'), 'w').write( - '%s@%d\n' % (URL, revision,) + '%s@%d\n' % (RCSPARSE_URL, revision,) ) -- 2.11.4.GIT