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

Unified Diff: Tools/Scripts/webkitpy/tool/commands/rebaseline.py

Issue 1187483002: Setup git-svn and handle detached HEAD state in auto-rebaseline script. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fix tests Created 5 years, 6 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 | Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Tools/Scripts/webkitpy/tool/commands/rebaseline.py
diff --git a/Tools/Scripts/webkitpy/tool/commands/rebaseline.py b/Tools/Scripts/webkitpy/tool/commands/rebaseline.py
index 9d238f4fd3dc3ddf7a1f0b28a1d2f54fd2eedd30..1c35f2389417bb36e80110ee4869954b48ca756e 100644
--- a/Tools/Scripts/webkitpy/tool/commands/rebaseline.py
+++ b/Tools/Scripts/webkitpy/tool/commands/rebaseline.py
@@ -803,6 +803,9 @@ class AutoRebaseline(AbstractParallelRebaselineCommand):
_log.error("Cannot proceed with working directory changes. Clean working directory first.")
return
+ # Setup git-svn for dcommit.
+ tool.executive.run_command(['git', 'auto-svn'])
Dirk Pranke 2015/06/12 19:51:30 I wonder if there's much of a cost to running this
joelo 2015/06/17 18:37:37 Good point, done.
+
revision_data = self.bot_revision_data()
if not revision_data:
return
@@ -829,7 +832,10 @@ class AutoRebaseline(AbstractParallelRebaselineCommand):
did_finish = False
try:
- old_branch_name = tool.scm().current_branch()
+ old_branch_name = tool.executive.run_command(["git", "rev-parse", "--symbolic-full-name", "HEAD"])
+ if old_branch_name == "HEAD":
+ # If HEAD is detached use commit SHA instead.
+ old_branch_name = tool.executive.run_command(["git", "rev-parse", "HEAD"])
tool.scm().delete_branch(self.AUTO_REBASELINE_BRANCH_NAME)
tool.scm().create_clean_branch(self.AUTO_REBASELINE_BRANCH_NAME)
« no previous file with comments | « no previous file | Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698