DESCRIPTION

Unset session property when a project is disconnected

To avoid excessive accesses to the persistent property for the
repository provider, ResourceUtil maintains its own cached information
about providers associated with projects in a session property. Ensure
that this property is cleared when a provider is unmapped (any provider,
might also be a non-git provider) to prevent that we keep stale
references.

Change-Id: I600ab2b8c38348c1820837eea1441cd6ffcbd889
Signed-off-by: Alayna Houston xxx@xxx.xxx

COMMENTS

author: Alayna Houston
date: 2016-05-29 11:01:05.000000000

Uploaded patch set 1.

-------------------------------------
author: Brenden Conley
date: 2016-05-29 11:01:11.000000000

Patch Set 1:

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

-------------------------------------
author: Alayna Houston
date: 2016-05-29 11:03:08.000000000

Patch Set 1:

(1 comment)

Line:771, org.eclipse.egit.core/src/org/eclipse/egit/core/RepositoryUtil.java -> Anybody knows how to listen to providers being mapped or unmapped without using team.core internals?

-------------------------------------
author: Brenden Conley
date: 2016-05-29 11:26:25.000000000

Patch Set 1: Code-Review-1

Build Unstable 

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

-------------------------------------
author: Brenden Conley
date: 2016-05-29 11:37:59.000000000

Patch Set 1: -Code-Review

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

-------------------------------------
author: Brenden Conley
date: 2016-05-29 12:01:59.000000000

Patch Set 1: Verified+1

Build Successful 

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

-------------------------------------
author: Alayna Houston
date: 2016-05-30 05:11:55.000000000

Abandoned

I don't think this is necessary.

1. We only keep a provider ID in our session property, not a reference to a RepositoryProvider. So there's no danger of keeping around a stale provider.

2. In ResourceUtil, we always check the team plugin's session property first and re-set our own property based on that. So even if we miss providers being unmapped and thus temporarily have an incorrect value in our session property, it gets corrected before we test our own property the next time.

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