DESCRIPTION

Do not pass on an uninitialized scope to callers from GitScopeUtil

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


COMMENTS

author: Gustavo Green
date: 2014-05-07 12:03:12.000000000

Uploaded patch set 3.

-------------------------------------
author: Douglas Trujillo
date: 2014-05-07 21:55:21.000000000

Patch Set 3: Code-Review-1

(2 comments)

Line:103, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/operations/GitScopeUtil.java -> typo: s/Synchonize/Synchronize/

Line:8, /COMMIT_MSG -> why ?

-------------------------------------
author: Brenden Conley
date: 2014-05-07 22:06:21.000000000

Patch Set 3:

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

-------------------------------------
author: Brenden Conley
date: 2014-05-07 22:22:31.000000000

Patch Set 3: Verified+1

Build Successful 

https://hudson.eclipse.org/egit/job/egit.gerrit/5835/ : SUCCESS

-------------------------------------
author: Gustavo Green
date: 2014-05-13 12:36:19.000000000

Patch Set 3:

(2 comments)

Line:103, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/operations/GitScopeUtil.java -> That's a property key that previously existed. Should I changed it anyway (though I did make the same error in the key I've added for the interruption)?

Line:8, /COMMIT_MSG -> Because this SubscriberScopeManager will be passed over to Team as-is, and some of the implementations of Team APIs will rely on the proper initialization of this scope. I cannot provide the full stack, but here is one of those that can happen (here, when trying to <commit> a file which is part of a model) :

 java.lang.NullPointerException
 at org.eclipse.egit.core.synchronize.GitResourceVariantTreeSubscriber.getBaseTree(GitResourceVariantTreeSubscriber.java:276)
 at org.eclipse.team.core.variants.ResourceVariantTreeSubscriber.refresh(ResourceVariantTreeSubscriber.java:170)
 at org.eclipse.team.core.variants.ResourceVariantTreeSubscriber.refresh(ResourceVariantTreeSubscriber.java:114)
 at org.eclipse.egit.core.synchronize.GitResourceVariantTreeSubscriber.refresh(GitResourceVariantTreeSubscriber.java:187)
 at org.eclipse.team.core.subscribers.SubscriberResourceMappingContext.refresh(SubscriberResourceMappingContext.java:167)
 at org.eclipse.team.core.subscribers.SubscriberResourceMappingContext.ensureRefreshed(SubscriberResourceMappingContext.java:207)
 at org.eclipse.team.core.subscribers.SubscriberResourceMappingContext.fetchMembers(SubscriberResourceMappingContext.java:132)
 [...]
 at org.eclipse.core.resources.mapping.ModelProvider.getMappings(ModelProvider.java:169)
 at org.eclipse.team.core.mapping.provider.SynchronizationScopeManager.getMappings(SynchronizationScopeManager.java:100)
 at org.eclipse.team.core.mapping.provider.SynchronizationScopeManager.getMappingsFromProviders(SynchronizationScopeManager.java:86)
 at org.eclipse.team.core.mapping.provider.SynchronizationScopeManager.internalPrepareContext(SynchronizationScopeManager.java:204)
 at org.eclipse.team.core.mapping.provider.SynchronizationScopeManager.access$0(SynchronizationScopeManager.java:187)
 at org.eclipse.team.core.mapping.provider.SynchronizationScopeManager$1.run(SynchronizationScopeManager.java:167)
 at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344)
 at org.eclipse.team.core.mapping.provider.SynchronizationScopeManager.initialize(SynchronizationScopeManager.java:165)
 at org.eclipse.team.core.subscribers.SubscriberScopeManager.access$0(SubscriberScopeManager.java:1)
 at org.eclipse.team.core.subscribers.SubscriberScopeManager$1.run(SubscriberScopeManager.java:81)
 at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344)
 at org.eclipse.team.core.subscribers.SubscriberScopeManager.initialize(SubscriberScopeManager.java:79)
 at org.eclipse.team.ui.synchronize.ModelOperation.initializeScope(ModelOperation.java:161)
 at org.eclipse.team.ui.synchronize.ModelOperation.beginOperation(ModelOperation.java:124)
 at org.eclipse.team.ui.synchronize.ModelOperation.run(ModelOperation.java:105)
 at org.eclipse.egit.ui.internal.operations.GitScopeUtil.collectRelatedChanges(GitScopeUtil.java:168)

-------------------------------------
author: Douglas Trujillo
date: 2014-05-13 22:05:10.000000000

Patch Set 3:

(2 comments)

Line:103, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/operations/GitScopeUtil.java -> ok, then I'd fix this in another change and rebase this one on top of that fix

Line:8, /COMMIT_MSG -> ok, then explain this in the commit message so that we can understand the reason for this change when we look at the history later

-------------------------------------
author: Gustavo Green
date: 2014-06-02 11:24:39.000000000

Patch Set 3:

(2 comments)

Line:103, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/operations/GitScopeUtil.java -> Done

Line:8, /COMMIT_MSG -> Done

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