[buildbot] clean-build script should remove untracked files and revert local changes too
authoryouenn.fablet@crf.canon.fr <youenn.fablet@crf.canon.fr@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 31 Mar 2015 08:58:31 +0000 (08:58 +0000)
committeryouenn.fablet@crf.canon.fr <youenn.fablet@crf.canon.fr@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 31 Mar 2015 08:58:31 +0000 (08:58 +0000)
commit22f5afc1365a614f25ad412ebc00fbf19e503358
treeaeb41125d4f4179235fa1bfea665b9e47a546deb
parentaff44c60c80c0d68f07e105d4d9fb6942b073c38
[buildbot] clean-build script should remove untracked files and revert local changes too
https://bugs.webkit.org/show_bug.cgi?id=142400

Reviewed by Ryosuke Niwa.

This patch cleans the WebKit folder by reverting tracked files changes and deleting SCM untracked files, including SCM ignored files.
A helper routine SCM.discard_untracked_files is added for that purpose.

* BuildSlaveSupport/clean-build:
(main): Making call to Scripts/clean-webkit
* Scripts/clean-webkit: Added.
(main): Revert changes and delete untracked files.
* Scripts/webkitpy/common/checkout/scm/scm.py:
(SCM.discard_untracked_files): Helper function to discard untracked files or folders found by SCM.
* Scripts/webkitpy/common/checkout/scm/scm_unittest.py:
(SCMTest._shared_test_discard_untracked_files):
(test_discard_untracked_files): Tests that untracked file and untracked folder get discarded correctly.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@182177 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Tools/BuildSlaveSupport/clean-build
Tools/ChangeLog
Tools/Scripts/clean-webkit [new file with mode: 0755]
Tools/Scripts/webkitpy/common/checkout/scm/scm.py
Tools/Scripts/webkitpy/common/checkout/scm/scm_unittest.py