SVN implements SourceControl { static void parsePropgetReader(final BufferedReader reader, final Map<String, List<String[]>> directories) throws IOException { String line; String currentDir = null; while ((line = reader.readLine()) != null) { String[] split = line.split(" - "); if (split.length > 1) { currentDir = split[0]; directories.put(currentDir, new ArrayList<String[]>()); line = split[1]; } split = line.split("\\s+"); if (!split[0].equals("")) { final List<String[]> externals = directories.get(currentDir); externals.add(split); } } }  Map<String, String> getProperties(); void setProperty(String property); void setPropertyOnDelete(String propertyOnDelete); void setConfigDir(String configDir); void setCheckExternals(boolean value); void setRepositoryLocation(String repositoryLocation); void setLocalWorkingCopy(String localWorkingCopy); void setUsername(String userName); void setPassword(String password); void validate(); List<Modification> getModifications(final Date lastBuild, final Date now); static DateFormat getOutDateFormatter(); void setUseLocalRevision(boolean useLocalRevision);  }
@Test public void parsingTheResultsOfExecutingPropGetForSVNExternals() throws Exception { String testPropgetResult = ". - shared/build\tsvn: + "shared/tool/jfcunit_2.08\tsvn: + "shared/lib/jnlp-1_2-dev\tsvn: final HashMap<String, List<String[]>> directories = new HashMap<String, List<String[]>>(); final BufferedReader reader = new BufferedReader(new InputStreamReader(new ByteArrayInputStream( testPropgetResult.getBytes("UTF-8")), "UTF-8")); try { SVN.parsePropgetReader(reader, directories); } finally { reader.close(); } assertEquals(1, directories.keySet().size()); String directory = directories.keySet().iterator().next(); List externals = directories.get(directory); assertEquals("Wrong number of externals", 3, externals.size()); String[] firstEntry = (String[]) externals.get(0); assertEquals("Wrong external: " + Arrays.asList(firstEntry).toString(), 2, firstEntry.length); assertEquals("Wrong externalSvnURL", "svn: }