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

Unified Diff: third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline_cl_unittest.py

Issue 2590693002: Only add unstaged baseline changes to the git index when rebaselining. (Closed)
Patch Set: rebaseline-cl: Abort if there are unstaged baseline changes. Created 4 years 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
Index: third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline_cl_unittest.py
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline_cl_unittest.py b/third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline_cl_unittest.py
index a748e3705c276a138b7c96ce78a94fefcc7b721c..d8b525028158b162bf864876649d0473392c12b5 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline_cl_unittest.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline_cl_unittest.py
@@ -299,3 +299,12 @@ class RebaselineCLTest(BaseTestCase, LoggingTestCase):
'Try starting a new job for MOCK Try Win by running :\n'
' git cl try -b MOCK Try Win\n'
])
+
+ def test_bails_when_there_are_unstaged_baselines(self):
+ scm = self.tool.scm()
+ scm.unstaged_changes = lambda: {'third_party/WebKit/LayoutTests/my-test-expected.txt': '?'}
+ self.command.execute(self.command_options(issue=11112222), [], self.tool)
+ self.assertLog([
+ 'ERROR: Aborting: there are unstaged baselines:\n',
+ 'ERROR: /mock-checkout/third_party/WebKit/LayoutTests/my-test-expected.txt\n',
+ ])

Powered by Google App Engine
This is Rietveld 408576698