void (boolean ignoreWhitespaces) { cd(myRepository); String whitespaceFile = "whitespaces.txt"; touch(whitespaceFile, "not whitespaces"); myRepository.refresh(false, true); String whiteSpaceAuthor = "Mr.Whitespace"; final VirtualFile file = myRepository.findFileByRelativePath(whitespaceFile); assert file != null; hg("add " + whitespaceFile); hg("commit -m modify -u '" + defaultAuthor + "'"); echo(whitespaceFile, " ");//add several whitespaces hg("commit -m whitespaces -u '" + whiteSpaceAuthor + "'"); final HgFile hgFile = new HgFile(myRepository, VfsUtilCore.virtualToIoFile(file)); myVcs.getProjectSettings().setIgnoreWhitespacesInAnnotations(ignoreWhitespaces); List<HgAnnotationLine> annotationLines = new HgAnnotateCommand(myProject).execute(hgFile, null); HgAnnotationLine line = annotationLines.get(0); assertEquals(ignoreWhitespaces ? defaultAuthor : whiteSpaceAuthor, line.get(HgAnnotation.FIELD.USER)); }