SubversionUtils { public static long getCheckoutRevision(final List<String> output) { return findRevision(output, CHECKOUT_REV_NUM_PATTERN); } private  SubversionUtils(); static long getCheckoutRevision(final List<String> output); static long getCommitRevision(final List<String> output); static long getUpdateRevision(final List<String> output); static long findRevision(final List<String> output, final Pattern pattern);  }
@Test public void testGetCheckoutRevision() throws Exception { assertEquals(-1, SubversionUtils.getCheckoutRevision(ImmutableList.of( "Some output", "Revision ABC" ))); assertEquals(-1, SubversionUtils.getCheckoutRevision(ImmutableList.of( "Some output", "Checked out revision ABC" ))); assertEquals(1588353, SubversionUtils.getCheckoutRevision(ImmutableList.of( "Some output", "Checked out revision 1588353." ))); }