Bug 28603

Summary: webkit-patch commit-queue needs to delete files from failed patches (like git clean -f would)
Product: WebKit Reporter: Eric Seidel (no email) <eric>
Component: Tools / TestsAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: abarth, kbr, mjs
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   

Description Eric Seidel (no email) 2009-08-20 22:49:01 PDT
Turds from failed rebases before can cause errors:

error: Untracked working tree file 'WebCore/storage/SQLTransactionClient.cpp' would be overwritten by merge.
could not detach HEAD
rebase refs/remotes/trunk: command returned error: 1

Logging in as eric@webkit.org...
Rejecting patch 34895 from commit-queue.  This patch will require manual commit.

Failed to run "['git', 'svn', 'rebase']"  exit_code: 1  cwd: None
ERROR: Failed to run "['git', 'svn', 'rebase']"  exit_code: 1  cwd: None

Doing 'git clean -f' is really scary, but we need to do it to make the bot run nice...
Comment 1 Adam Barth 2009-09-01 16:20:26 PDT
commit-queue is scary.  Let loose the dogs of war!  git clean -f --for-realz-now
Comment 2 Eric Seidel (no email) 2009-09-01 16:22:15 PDT
LayoutTests getting left around are particularly bad.  When running the commit-queue from an SVN checkout any failed patch will leave any added files around.  If those added files were layout tests, all patches after that one will start failing!
Comment 3 Eric Seidel (no email) 2009-12-29 11:08:55 PST
Just saw this again with https://bugs.webkit.org/show_bug.cgi?id=32995#c5
Comment 4 Eric Seidel (no email) 2009-12-29 11:10:55 PST
This is the worst bug affecting the commit-queue now that it's running from an SVN checkout.  I'll have to bump this up on my priority list.
Comment 5 Adam Barth 2009-12-29 11:49:14 PST
How are you going to run git clean -f from an SVN checkout?
Comment 6 Eric Seidel (no email) 2009-12-30 09:31:12 PST
A possibly related failure:
Comment 7 Kenneth Russell 2010-01-01 11:30:12 PST
How about "svn revert -R ." from the root of the tree?
Comment 8 Eric Seidel (no email) 2010-01-03 16:26:05 PST
This has caused enough commit-queue failures that I'm going to move the commit-queue back to using Git for now.  I'll bump this bug up on my list of bugs to fix.
Comment 9 Eric Seidel (no email) 2010-01-03 17:49:14 PST
@kbr: svn revert -R is already done.  git clean -f actually deletes untracked files.  We'll ahve to write an SVN equivalent.
Comment 10 Kenneth Russell 2010-01-04 08:00:54 PST
Would this do it?

svn status | grep ^\? | awk '{print $2}' | xargs rm -rf
Comment 11 Eric Seidel (no email) 2010-01-04 13:23:00 PST
Yes.  We even have code like this already in scm.py, it just needs to all be wired together into some sort of remove_untracked_files() method on SCM implementations.

For an example of status-parsing logic see run_status_and_extract_filenames  and callers: