void (@NotNull List<? extends @NotNull VFileEvent> events) { // which files in .hg were changed boolean branchHeadsChanged = false; boolean branchFileChanged = false; boolean dirstateFileChanged = false; boolean mergeFileChanged = false; boolean rebaseFileChanged = false; boolean bookmarksFileChanged = false; boolean tagsFileChanged = false; boolean localTagsFileChanged = false; boolean currentBookmarkFileChanged = false; boolean mqChanged = false; boolean hgIgnoreChanged = false; boolean configHgrcChanged = false; for (VFileEvent event : events) { String filePath = event.getPath(); if (myRepositoryFiles.isbranchHeadsFile(filePath)) { branchHeadsChanged = true; } else if (myRepositoryFiles.isBranchFile(filePath)) { branchFileChanged = true; DvcsUtil.ensureAllChildrenInVfs(myBranchHeadsDir); } else if (myRepositoryFiles.isDirstateFile(filePath)) { dirstateFileChanged = true; } else if (myRepositoryFiles.isMergeFile(filePath)) { mergeFileChanged = true; } else if (myRepositoryFiles.isRebaseFile(filePath)) { rebaseFileChanged = true; } else if (myRepositoryFiles.isBookmarksFile(filePath)) { bookmarksFileChanged = true; } else if (myRepositoryFiles.isTagsFile(filePath)) { tagsFileChanged = true; } else if (myRepositoryFiles.isLocalTagsFile(filePath)) { localTagsFileChanged = true; } else if (myRepositoryFiles.isCurrentBookmarksFile(filePath)) { currentBookmarkFileChanged = true; } else if (myRepositoryFiles.isMqFile(filePath)) { mqChanged = true; if (myMqDir == null) { myMqDir = VcsUtil.getVirtualFile(myRepositoryFiles.getMQDirPath()); } DvcsUtil.ensureAllChildrenInVfs(myMqDir); } else if (myRepositoryFiles.isConfigHgrcFile(filePath)) { configHgrcChanged = true; } else if (myRepositoryFiles.isHgIgnore(filePath)) { hgIgnoreChanged = true; } } if (branchHeadsChanged || branchFileChanged || dirstateFileChanged || mergeFileChanged || rebaseFileChanged || bookmarksFileChanged || currentBookmarkFileChanged || tagsFileChanged || localTagsFileChanged || mqChanged) { myUpdateQueue.queue(new MyUpdater("hgrepositoryUpdate")); } if (configHgrcChanged) { myUpdateConfigQueue.queue(new MyUpdater("hgconfigUpdate"){ @Override public void run() { myRepository.updateConfig(); } }); } if (dirstateFileChanged || hgIgnoreChanged) { myRepository.getIgnoredFilesHolder().startRescan(); final VirtualFile root = myRepository.getRoot(); myDirtyScopeManager.dirDirtyRecursively(root); if (dirstateFileChanged) { //update async incoming/outgoing model BackgroundTaskUtil.syncPublisher(myProject, HgVcs.REMOTE_TOPIC).update(myProject, root); } } }