Provide proper scheduling rules for operations locking the Git index
commit99354e31eee9a6e73c394fc4a6be90b32956dec2
authorJens Baumgart <jens.baumgart@sap.com>
Thu, 22 Dec 2011 19:41:24 +0000 (22 20:41 +0100)
committerDariusz Luksza <dariusz@luksza.org>
Sat, 14 Jan 2012 13:46:45 +0000 (14 14:46 +0100)
tree6dc3648d3bc4366325f4812b203fdec071d02442
parentac1a4aa541346d7a12f2aa967d970546c4c29190
Provide proper scheduling rules for operations locking the Git index

Currently the AddToIndexOperation provides the input resources as
scheduling rule. This is wrong because this suggests that two Add To
Index Jobs can run in parallel if the input resources are not
conflicting and belong to the same Git repository.
Now a scheduling rule is used that locks all projects of a given
repository to prevent Jobs running in parallel that modify the index
of the same repository.
The scheduling rules of other EGit operations modifying the Git index
were changed accordingly.

Bug: 366684
Change-Id: I5a6d420035d086cedb51a69041e571c178f3dbc8
Signed-off-by: Jens Baumgart <jens.baumgart@sap.com>
org.eclipse.egit.core/src/org/eclipse/egit/core/internal/job/RuleUtil.java [new file with mode: 0644]
org.eclipse.egit.core/src/org/eclipse/egit/core/op/AddToIndexOperation.java
org.eclipse.egit.core/src/org/eclipse/egit/core/op/AssumeUnchangedOperation.java
org.eclipse.egit.core/src/org/eclipse/egit/core/op/DiscardChangesOperation.java
org.eclipse.egit.core/src/org/eclipse/egit/core/op/RemoveFromIndexOperation.java
org.eclipse.egit.core/src/org/eclipse/egit/core/op/UntrackOperation.java