boolean (@NotNull HgRepository repository, @NotNull FilePath path, @NotNull HgRevisionNumber compareWithRevisionNumber) { HgStatusCommand statusCommand = new HgStatusCommand.Builder(true).ignored(false).unknown(false).copySource(!path.isDirectory()) .baseRevision(compareWithRevisionNumber).targetRevision(null).build(repository.getProject()); statusCommand.cleanFilesOption(true); return !statusCommand.executeInCurrentThread(repository.getRoot(), Collections.singleton(path)).isEmpty(); }