Boolean () { final AbstractVcs vcs = myVcsRoot.getVcs(); // won't be called in parallel for same vcs -> just synchronized map is ok final String vcsName = vcs.getName(); LOG.debug("should update for: " + vcsName + " root: " + myVcsRoot.getPath().getPath()); final VcsRevisionNumber latestNew = vcs.getDiffProvider().getLatestCommittedRevision(myVcsRoot.getPath()); // TODO: Why vcsName is used as key and not myVcsRoot.getKey()??? // TODO: This seems to be invalid logic as we get latest revision for vcs root final VcsRevisionNumber latestKnown = myLatestRevisionsMap.get(vcsName); // not known if (latestNew == null) return true; if ((latestKnown == null) || (latestNew.compareTo(latestKnown) != 0)) { myLatestRevisionsMap.put(vcsName, latestNew); return true; } return false; }