@Test public void testGetHistoryWithNoSuchRevision() throws Exception { setUpTestRepository(); File root = new File(repository.getSourceRoot(), "mercurial"); MercurialRepository mr = (MercurialRepository) RepositoryFactory.getRepository(root); String[] revisionParts = REVISIONS[1].split(":"); assertEquals(2, revisionParts.length); int number = Integer.parseInt(revisionParts[0]); String hash = revisionParts[1]; String constructedRevision = (number + 1) + ":" + hash; try { mr.getHistory(root, constructedRevision); fail("getHistory() should have failed"); } catch (HistoryException he) { String msg = he.getMessage(); if (msg != null && msg.contains("not found in the repository")) { } else { throw he; } } }
@Override History getHistory(File file) throws HistoryException { return getHistory(file, null); }
MercurialRepository extends Repository { @Override History getHistory(File file) throws HistoryException { return getHistory(file, null); } }
MercurialRepository extends Repository { @Override History getHistory(File file) throws HistoryException { return getHistory(file, null); } MercurialRepository(); }
MercurialRepository extends Repository { @Override History getHistory(File file) throws HistoryException { return getHistory(file, null); } MercurialRepository(); @Override Annotation annotate(File file, String revision); @Override boolean fileHasAnnotation(File file); @Override boolean fileHasHistory(File file); @Override boolean isWorking(); @Override String determineCurrentVersion(CommandTimeoutType cmdType); }
MercurialRepository extends Repository { @Override History getHistory(File file) throws HistoryException { return getHistory(file, null); } MercurialRepository(); @Override Annotation annotate(File file, String revision); @Override boolean fileHasAnnotation(File file); @Override boolean fileHasHistory(File file); @Override boolean isWorking(); @Override String determineCurrentVersion(CommandTimeoutType cmdType); static final String CMD_PROPERTY_KEY; static final String CMD_FALLBACK; static final String NOFOREST_PROPERTY_KEY; }