void () { cd(myRepository); hg("branch branchA"); String aFile = "A.txt"; touch(aFile, "a"); hg("add " + aFile); hg("commit -m 'create file in branchA' "); hg("up default"); touch(aFile, "default"); hg("add " + aFile); hg("commit -m 'create file in default branch'"); hgMergeWith("branchA"); HgCommandResult revertResult = new HgRevertCommand(myProject) .execute(myRepository, Collections.singleton(new File(myRepository.getPath(), aFile).getAbsolutePath()), null, false); assertTrue(HgErrorUtil.hasUncommittedChangesConflict(revertResult)); }