Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(16)

Unified Diff: svn-log

Issue 13801015: Updating svn-log. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/perf/dashboard/
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: svn-log
===================================================================
--- svn-log (revision 192835)
+++ svn-log (working copy)
@@ -1,22 +1,28 @@
-#!/usr/bin/python2.4
+#!/usr/bin/python
import os
+import re
import subprocess
import sys
-print 'content-type: text/xml'
-print ''
-
try:
- options = {}
- query_string = os.environ['QUERY_STRING'].split('&')
- for q in query_string:
- opt = q.split('=')
- options[opt[0]] = opt[1]
-
- c = ['svn', 'log', '--xml', '-v', '-r', options['range'], options['url']]
- sys.stdout.flush()
- subprocess.call(c)
+ options = {}
+ query_string = os.environ['QUERY_STRING'].split('&')
+ for q in query_string:
+ opt = q.split('=')
+ options[opt[0]] = opt[1]
+ if ('range' not in options or 'url' not in options or
+ not (options['url'].startswith('http://src.chromium.org/svn/') or
+ options['url'].startswith('http://webrtc.googlecode.com/svn/')) or
+ not re.match(r'^(\d+):(\d+)$', options['range'])):
+ print 'Content-Type: text/html'
+ print ''
+ print ''
+ sys.exit(1)
+ c = ['svn', 'log', '--xml', '-v', '-r', options['range'], options['url']]
+ print 'Content-Type: text/xml'
+ print ''
+ sys.stdout.flush()
+ subprocess.call(c)
except Exception, e:
- print e
-
+ sys.stderr.write(e)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698