Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: sitescripts/subscriptions/bin/updateSubscriptionDownloadsCVS.py

Issue 10942098: Make sure subprocess calls don`t ignore result codes indicating errors. Fix JS docs generation whil… (Closed)
Patch Set: Addressed issues Created July 5, 2013, 11:22 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
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:

Powered by Google App Engine
This is Rietveld