/** * Query whether this version of LensKit includes a particular revision. * * @param revision The revision to query. * @return {@code true} if the LensKit source is descended from {@code revision}. */ public static boolean includesRevision(String revision) { return getRevisions().contains(revision); }
/** * Get the HEAD revision from which LensKit was built. * @return The revision from which this version of LensKit was built. */ @Nonnull public static String getHeadRevision() { Iterator<String> iter = getRevisions().iterator(); if (iter.hasNext()) { return iter.next(); } else { return "UNKNOWN"; } }
@Test public void testGetRevisions() throws Exception { assertThat(LenskitInfo.getRevisions(), hasItem("9103068a95fc650f9f4670683308819366e9d03b")); }
/** * Query whether this version of LensKit includes a particular revision. * * @param revision The revision to query. * @return {@code true} if the LensKit source is descended from {@code revision}. */ public static boolean includesRevision(String revision) { return getRevisions().contains(revision); }
/** * Get the HEAD revision from which LensKit was built. * @return The revision from which this version of LensKit was built. */ @Nonnull public static String getHeadRevision() { Iterator<String> iter = getRevisions().iterator(); if (iter.hasNext()) { return iter.next(); } else { return "UNKNOWN"; } }