Index: sitescripts/subscriptions/bin/updateSubscriptionDownloadsCVS.py |
=================================================================== |
--- a/sitescripts/subscriptions/bin/updateSubscriptionDownloadsCVS.py |
+++ b/sitescripts/subscriptions/bin/updateSubscriptionDownloadsCVS.py |
@@ -24,17 +24,17 @@ if __name__ == '__main__': |
source = get_config().get('subscriptionDownloads', 'outdir') |
cvsroot = get_config().get('subscriptionDownloads', 'cvsroot') |
cvsdir = get_config().get('subscriptionDownloads', 'cvsdir') |
dest = tempfile.mkdtemp() |
try: |
os.chdir(os.path.dirname(dest)) # Yes, CVS sucks |
subprocess.check_call(['cvs', '-Q', '-d', cvsroot, 'checkout', '-d', os.path.basename(dest), cvsdir]) |
os.chdir(dest) |
- result = subprocess.check_output(['rsync', '-a', '--delete', '--out-format=%o %n', '--exclude=CVS', source + '/', dest]) |
+ result = subprocess.check_output(['rsync', '-a', '--delete', '--out-format=%o %n', '--exclude=CVS', source + os.path.sep, dest]) |
for line in result.split('\n'): |
match = re.search(r'^(\S+)\s+(.*)', line) |
if match and match.group(1) == 'send': |
subprocess.check_call(['cvs', '-Q', 'add', match.group(2)]) |
elif match and match.group(1) == 'del.': |
subprocess.check_call(['cvs', '-Q', 'remove', match.group(2)]) |
subprocess.check_call(['cvs', '-Q', 'commit', '-m', 'Uploading subscription updates']) |
finally: |