DESCRIPTION

[RFC] Recover from lock failed exceptions

This begins the work to prompt the user to delete the .lock
file left over by a crashed process that was holding it.

A new LockOperation is added that wraps an IEGitOperation
and prompts the user to delete the lock failure being reported
in a wrapped CoreException.

This commit only currently modified ResetCommand but if this
approach  works then other commands can begin wrapping
core operations in a LockOperation.

Bug: 360141
Change-Id: Icdd58cc2d7606b23ca1cac550ca287f94f072312


COMMENTS

author: Jaidyn Nichols
date: 2012-01-11 00:36:46.000000000

Uploaded patch set 6.

-------------------------------------
author: Brenden Conley
date: 2012-01-11 00:51:53.000000000

Patch Set 6:

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

-------------------------------------
author: Brenden Conley
date: 2012-01-11 01:06:51.000000000

Patch Set 6: Build Successful

Build Successful 
 
https://hudson.eclipse.org/sandbox/job/egit.gerrit/2292/ : SUCCESS

-------------------------------------
author: Marlie Beasley
date: 2012-01-11 16:47:52.000000000

Patch Set 6: I would prefer that you didn't submit this

(2 inline comments)

I am not sure if this approach is compliant to Eclipse guide lines.
Is it a good behavior to send dialogs to a user when executing a Job?
What is the result of a job if the operation failed and the user removed the lock afterwards? If the result is failure then the user will get an additional error pop-up from Eclipse. If the result is success, then the result is a bit strange.

Line:64, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/operations/LockOperation.java -> Exceptions other than LockException need to be re-thrown. Otherwise Jobs executing the operation are treated as executed successfully.
Other question: can a Job executing an operation be treated as successful if the following happens:
1. Operation fails with lock failure
2. User removes lock by confirming pop up

Line:622, org.eclipse.egit.ui/src/org/eclipse/egit/ui/UIUtils.java -> This sends a dialog to the user while the operation is running and holding locks (e.g. Workspace Root). This might be problematic (dead locks).

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