Convert cvs2svn_rcsparse/update.sh to Python.
[cvs2svn.git] / cvs2svn_rcsparse / update
blob475dfcce9dc7f57fb121bcf9bf3fe64a86b61a8e
1 #!/usr/bin/env python
3 """Update the rcsparse library from ViewVC."""
5 import sys
6 import os
7 import subprocess
10 VIEWVC_REPOS = 'http://viewvc.tigris.org/svn/viewvc'
11 BRANCH = 'trunk'
12 URL = '/'.join([VIEWVC_REPOS, BRANCH, 'lib/vclib/ccvs/rcsparse'])
14 cmd = ['svn', 'export', '--force', URL, os.path.dirname(__file__)]
15 sys.stderr.write('%s\n' % (' '.join(cmd),))
16 retcode = subprocess.call(cmd)
18 if retcode:
19 sys.exit('Export failed!')