DESCRIPTION

Prevent exception propagation when auto-staging moves or deletions.

Signed-off-by: Gustavo Green xxx@xxx.xxx
Change-Id: I41b2c75496178c925f09d65eab5a9b3ab6cbee32


COMMENTS

author: Gustavo Green
date: 2014-07-02 12:28:28.000000000

Uploaded patch set 4.

-------------------------------------
author: Brenden Conley
date: 2014-07-02 12:28:34.000000000

Patch Set 4:

Build Started https://hudson.eclipse.org/egit/job/egit.gerrit/5970/

-------------------------------------
author: Brenden Conley
date: 2014-07-02 13:08:47.000000000

Patch Set 4: Verified-1

Build Failed 

https://hudson.eclipse.org/egit/job/egit.gerrit/5970/ : ABORTED

-------------------------------------
author: Brenden Conley
date: 2014-07-02 13:16:03.000000000

Patch Set 4: -Verified

Build Started https://hudson.eclipse.org/egit/job/egit.gerrit/5971/

-------------------------------------
author: Brenden Conley
date: 2014-07-02 13:34:25.000000000

Patch Set 4: Code-Review-1

Build Unstable 

https://hudson.eclipse.org/egit/job/egit.gerrit/5971/ : UNSTABLE

-------------------------------------
author: Brenden Conley
date: 2014-07-02 14:38:11.000000000

Patch Set 4: -Code-Review

Build Started https://hudson.eclipse.org/egit/job/egit.gerrit/5975/

-------------------------------------
author: Brenden Conley
date: 2014-07-02 14:56:22.000000000

Patch Set 4: Code-Review-1

Build Unstable 

https://hudson.eclipse.org/egit/job/egit.gerrit/5975/ : UNSTABLE

-------------------------------------
author: Juliet Cantu
date: 2014-07-03 07:28:40.000000000

Patch Set 4: Code-Review-1

(2 comments)

Line:62, org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/FileDeleteHookTest.java -> You mean "may" or "will"?

Undeterministic tests are not in my taste.

Line:110, org.eclipse.egit.core/src/org/eclipse/egit/core/GitMoveDeleteHook.java -> You should log this. How else could the user figure out what the problem is?
Though sometimes benign, LockFailedException usually means there is a stale lock.

-------------------------------------
author: Gustavo Green
date: 2014-07-03 07:50:50.000000000

Patch Set 4:

(2 comments)

Line:62, org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/FileDeleteHookTest.java -> Well, we've locked the dircache, so we know "delete" will throw up a LockFailedException because of the auto-staging hook trying to re-lock... until the patch is applied, at which point it won't fail anymore.

I probably should have used "will", or not commented at all since this is the description of the bug.

Line:110, org.eclipse.egit.core/src/org/eclipse/egit/core/GitMoveDeleteHook.java -> Well, except that in the case I am describing here, logging this would be noise, and noise that would confuse the user. See also the FileDeleteHookTest contributed through this change : a process creates then deletes a file. the user does not need to know that the auto-staging hook tried to take a lock and failed, since "the process" is taking care of the locking himself, and possibly also taking care of the index cleanup.

In this case, there isn't a "stale lock" : it's just that the auto-staging hook is too eager.

I'll add the 'log' line, but there's a good chance this isn't what the user wants.

-------------------------------------
author: Gustavo Green
date: 2014-07-03 07:56:31.000000000

Patch Set 4:

(1 comment)

Line:62, org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/FileDeleteHookTest.java -> Please also see the explanation on patch set 3 https://git.eclipse.org/r/#/c/22670/3/org.eclipse.egit.core/src/org/eclipse/egit/core/GitMoveDeleteHook.java

-------------------------------------
author: Juliet Cantu
date: 2014-07-18 21:02:43.000000000

Patch Set 4:

(1 comment)

Line:62, org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/FileDeleteHookTest.java -> Please change to will:  "Delete will fail due to LockFailedException, so cleanup"

-------------------------------------
author: Gustavo Green
date: 2014-07-21 07:59:41.000000000

Patch Set 4:

(2 comments)

Line:62, org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/FileDeleteHookTest.java -> Done

Line:110, org.eclipse.egit.core/src/org/eclipse/egit/core/GitMoveDeleteHook.java -> Done

-------------------------------------
