DESCRIPTION

[sync] Add cache provider for Git Change Set model

Base commit for improving Git Change Set model performance and reducing
memory footprint. It simply reduces number of created TreeWalks and
instead of keeping full JGit objects it contains only basic data needed
by synchronize view.

This implementation can change over time. It is possible that during
further refactoring of current Git Change Set implementation more data
will be needed in cache in such case I'll amend this commit.

Change-Id: If8dfa0251797aca56ddc825619500dc21885ba26
Signed-off-by: Leslie Stephenson xxx@xxx.xxx


COMMENTS

author: Leslie Stephenson
date: 2012-01-13 17:02:06.000000000

Uploaded patch set 9.

-------------------------------------
author: Leslie Stephenson
date: 2012-01-13 17:02:31.000000000

Patch Set 9:

rebased

-------------------------------------
author: Brenden Conley
date: 2012-01-13 17:24:38.000000000

Patch Set 9:

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

-------------------------------------
author: Brenden Conley
date: 2012-01-13 17:40:00.000000000

Patch Set 9: Build Successful

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

-------------------------------------
author: Douglas Trujillo
date: 2012-01-22 22:51:44.000000000

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

(13 inline comments)



Line:78, org.eclipse.egit.core.test/src/org/eclipse/egit/core/synchronize/ChangeTest.java -> I wouldn't use ZERO_ID here as it is a special ID

Line:561, org.eclipse.egit.core.test/src/org/eclipse/egit/core/synchronize/CheckedInCommitsCacheTest.java -> instead of copying you may consider to move the reusable stuff in RepositoryTestCase to the jgit.junit bundle

Line:35, org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/CheckedInCommitsCache.java -> This looks strange, commits which are not checked in don't exist, right ?

So you also need a better class name.

Line:50, org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/CheckedInCommitsCache.java -> can't this lead to wrong results if abbreviated IDs are ambiguous in a large repository ?

Line:65, org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/CheckedInCommitsCache.java -> s/does/if/

Line:148, org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/CheckedInCommitsCache.java -> s/does this change in/if this change is/

Line:241, org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/CheckedInCommitsCache.java -> it's unclear what source and destination mean here

Line:269, org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/CheckedInCommitsCache.java -> I would expect that one of these commits points at the end of what this call is interested in, so I would expect one call to rw.markUninteresting(RevCommit) or do I miss something here ?

Line:283, org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/CheckedInCommitsCache.java -> why do we retreive author time as a Date and committer time as an int ?

Line:291, org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/CheckedInCommitsCache.java -> if this should never happen you better throw an exception, right ?

Line:294, org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/CheckedInCommitsCache.java -> why is it ok to ignore changes in merge commits ?

Line:319, org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/CheckedInCommitsCache.java -> typo in variable name s/remoteComitAbb/remoteCommitAbb/

Also naming is inconsistent here you mention that this is abbreviated for actualCommit you don't do that. As this has local scope only I would remove "Abb" from variable name.

Line:351, org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/CheckedInCommitsCache.java -> so CHANGE can be a content or a mode change, right ?

-------------------------------------
author: Leslie Stephenson
date: 2012-01-23 00:05:50.000000000

Patch Set 9: (13 inline comments)



Line:78, org.eclipse.egit.core.test/src/org/eclipse/egit/core/synchronize/ChangeTest.java -> Done

Line:561, org.eclipse.egit.core.test/src/org/eclipse/egit/core/synchronize/CheckedInCommitsCacheTest.java -> Done

Line:35, org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/CheckedInCommitsCache.java -> Done

Line:50, org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/CheckedInCommitsCache.java -> According to AbbreviatedObjectId it should be unique within repository it was generated from

Line:65, org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/CheckedInCommitsCache.java -> Done

Line:148, org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/CheckedInCommitsCache.java -> Done

Line:241, org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/CheckedInCommitsCache.java -> Done

Line:269, org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/CheckedInCommitsCache.java -> If you try replace one of markStart with markUniteresting you'll notice that all test cases will fail. AFAIR I was investigating markStart/markUninteresting combinations and only two markStart produces proper results

Line:283, org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/CheckedInCommitsCache.java -> Good catch. I'll remove commitTime and use time from author ident as a commit time

Line:291, org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/CheckedInCommitsCache.java -> Done

Line:294, org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/CheckedInCommitsCache.java -> In such case you'll have doubled list of changes made by merged committs, IMHO this should lead to some misunderstanding (eg. why my changes was applied to times, ones with my commit and second time with "merge commit")

Line:319, org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/CheckedInCommitsCache.java -> fixed typo, but I cannot remove 'Abb' from this variable name since 'remoteCommit' is already used

Line:351, org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/CheckedInCommitsCache.java -> yes, for now I would leave it as it is, in feature we could change this behavior

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