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

Unified Diff: build/android/pylib/utils/flakiness_dashboard_results_uploader.py

Issue 14118014: Android: extracts "repo_utils.py" from flakiness_dashboard_results_uploader.py. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove \n 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 | build/android/pylib/utils/repo_utils.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/utils/flakiness_dashboard_results_uploader.py
diff --git a/build/android/pylib/utils/flakiness_dashboard_results_uploader.py b/build/android/pylib/utils/flakiness_dashboard_results_uploader.py
index 291308ecf3bac94860f24ddaeaee548766966d9d..d0ec91053867e54dd484f126b9e5b1d33c5a487a 100644
--- a/build/android/pylib/utils/flakiness_dashboard_results_uploader.py
+++ b/build/android/pylib/utils/flakiness_dashboard_results_uploader.py
@@ -32,6 +32,7 @@ from webkitpy.layout_tests.layout_package import json_results_generator
#TODO(craigdh): pylib/utils/ should not depend on pylib/.
from pylib import cmd_helper
from pylib import constants
+from pylib.utils import repo_utils
# The JSONResultsGenerator gets the filesystem.join operation from the Port
@@ -91,21 +92,11 @@ class JSONResultsGenerator(json_results_generator.JSONResultsGeneratorBase):
return False
return _is_git_directory(parent)
- def _get_git_revision(in_directory):
- """Returns the git hash tag for the given directory.
-
- Args:
- in_directory: The directory where git is to be run.
- """
- command_line = ['git', 'log', '-1', '--pretty=format:%H']
- output = cmd_helper.GetCmdOutput(command_line, cwd=in_directory)
- return output[0:40]
-
in_directory = os.path.join(constants.CHROME_DIR, in_directory)
if not os.path.exists(os.path.join(in_directory, '.svn')):
if _is_git_directory(in_directory):
- return _get_git_revision(in_directory)
+ return repo_utils.GetGitHeadSHA1(in_directory)
else:
return ''
« no previous file with comments | « no previous file | build/android/pylib/utils/repo_utils.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698