DESCRIPTION

Properly clean up caches when a configured repository is removed

When a repository is removed, it was never removed from the
IndexDiffCache, which in fact has no operation to remove anything. Only
the preference in ResourceUtil is updated. This of course in turn means
there's a hard reference in IndexDiffCache to the repo, and it thus also
remains in the RepositoryCache indefinitely (unless it is really
deleted, not just removed from the view).

Clean this up:

1. IndexDiffCache listens on changes to the preference storing the
   configured repositories and removes any stale cache entries upon
   changes.
2. Individual cache entries really clear all listeners, and cancel
   their jobs when disposed.
3. The RepositoryCache also listens on that preference and also removes
   stale entries proactively. Using weak references is a nice touch,
   but relying on the GC to clean up is not really necessary here.

Bug: 483664
Change-Id: I8c20d4e8821e6c5d9fa7e62191a79275bef58bce
Signed-off-by: Alayna Houston xxx@xxx.xxx

COMMENTS

author: Alayna Houston
date: 2015-12-06 12:56:10.000000000

Uploaded patch set 1.

-------------------------------------
author: Brenden Conley
date: 2015-12-06 12:56:16.000000000

Patch Set 1:

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

-------------------------------------
author: Brenden Conley
date: 2015-12-06 13:19:11.000000000

Patch Set 1: Verified+1

Build Successful 

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

-------------------------------------
author: Gerrit Johnathan Pham
date: 2016-01-20 22:35:54.000000000

Change could not be merged because of a missing dependency.

The following changes must also be submitted:

* Ib7feae156982eafdab6bc059b93820f0bf12dc99


-------------------------------------
author: Gerrit Johnathan Pham
date: 2016-01-20 23:04:46.000000000

Change has been successfully merged into the git repository by Douglas Trujillo

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