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

Unified Diff: tools/testing/perf_testing/create_graph.py

Issue 9677056: Add git svn support to create_graph.py. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Some cleanup Created 8 years, 9 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: tools/testing/perf_testing/create_graph.py
diff --git a/tools/testing/perf_testing/create_graph.py b/tools/testing/perf_testing/create_graph.py
index a3fe757ea3865ae3cabd57565640597d9bc52d31..b7ffe2a707ffedbba794812d1ca70ad07f195e56 100755
--- a/tools/testing/perf_testing/create_graph.py
+++ b/tools/testing/perf_testing/create_graph.py
@@ -276,12 +276,19 @@ class TestRunner(object):
def add_svn_revision_to_trace(self, outfile):
"""Add the svn version number to the provided tracefile."""
- p = subprocess.Popen(['svn', 'info'], stdout = subprocess.PIPE,
- stderr = subprocess.STDOUT, shell = HAS_SHELL)
- output, not_used = p.communicate()
- for line in output.split('\n'):
- if 'Revision' in line:
- run_cmd(['echo', line.strip()], outfile)
+ def search_for_revision(svn_info_command):
+ p = subprocess.Popen(svn_info_command, stdout = subprocess.PIPE,
+ stderr = subprocess.STDOUT, shell = HAS_SHELL)
+ output, _ = p.communicate()
+ for line in output.split('\n'):
+ if 'Revision' in line:
+ run_cmd(['echo', line.strip()], outfile)
+ return True
+ return False
+
+ if not search_for_revision(['svn', 'info']):
+ if not search_for_revision(['git', 'svn', 'info']):
+ run_cmd(['echo', 'Revision: unknown'], outfile)
def write_html(self, delimiter, rev_nums, label_1, dict_1, label_2, dict_2,
cleanFile=False):
@@ -756,4 +763,3 @@ def main():
if __name__ == '__main__':
main()
-
« 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