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

Side by Side Diff: dashboard/svn-log

Issue 251013003: Allow range to be specified using dates. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/perf/
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 2
3 import os 3 import os
4 import re 4 import re
5 import subprocess 5 import subprocess
6 import sys 6 import sys
7 7
8 try: 8 try:
9 options = {} 9 options = {}
10 query_string = os.environ['QUERY_STRING'].split('&') 10 query_string = os.environ['QUERY_STRING'].split('&')
11 for q in query_string: 11 for q in query_string:
12 opt = q.split('=') 12 opt = q.split('=')
13 options[opt[0]] = opt[1] 13 options[opt[0]] = opt[1]
14 if ('range' not in options or 'url' not in options or 14 if ('range' not in options or 'url' not in options or
15 not (options['url'].startswith('http://src.chromium.org/svn/') or 15 not (options['url'].startswith('http://src.chromium.org/svn/') or
16 options['url'].startswith('http://webrtc.googlecode.com/svn/') or 16 options['url'].startswith('http://webrtc.googlecode.com/svn/') or
17 options['url'].startswith('http://v8.googlecode.com/svn/')) or 17 options['url'].startswith('http://v8.googlecode.com/svn/')) or
18 not re.match(r'^(\d+):(\d+)$', options['range'])): 18 not (re.match(r'^(\d+):(\d+)$', options['range']) or
19 re.match(r'^{(\d{4}-(1[0-2]|0?[1-9])-(3[01]|[12][0-9]|0?[1-9]))}'
20 ':{(\d{4}-(1[0-2]|0?[1-9])-(3[01]|[12][0-9]|0?[1-9]))}$',
reveman 2014/04/25 21:46:28 fyi, this is not perfect. ie. it doesn't complain
21 options['range']))):
19 print 'Content-Type: text/html' 22 print 'Content-Type: text/html'
20 print '' 23 print ''
21 print '' 24 print ''
22 sys.exit(1) 25 sys.exit(1)
23 c = ['svn', 'log', '--xml', '-v', '-r', options['range'], options['url']] 26 c = ['svn', 'log', '--xml', '-v', '-r', options['range'], options['url']]
24 print 'Content-Type: text/xml' 27 print 'Content-Type: text/xml'
25 print '' 28 print ''
26 sys.stdout.flush() 29 sys.stdout.flush()
27 subprocess.call(c) 30 subprocess.call(c)
28 except Exception, e: 31 except Exception, e:
29 sys.stderr.write(e) 32 sys.stderr.write(e)
OLDNEW
« 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