@Test public void testParseAndFilter() throws ParseException, JDOMException, IOException { String svnLog = "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n" + "<log>\n" + " <logentry revision=\"663\">\n" + " <author>lee</author>\n" + " <date>2003-08-02T10:01:13.349105Z</date>\n" + " <paths>\n" + " <path action=\"A\">/trunk/playground/bbb</path>\n" + " </paths>\n" + " <msg>bli</msg>\n" + " </logentry>\n" + " <logentry revision=\"664\">\n" + " <author>etienne</author>\n" + " <date>2003-07-29T17:45:12.100900Z</date>\n" + " <paths>\n" + " <path action=\"A\">/trunk/playground/aaa/f.txt</path>\n" + " </paths>\n" + " <msg>bla</msg>\n" + " </logentry>\n" + " <logentry revision=\"665\">\n" + " <author>martin</author>\n" + " <date>2003-07-29T18:15:11.100900Z</date>\n" + " <paths>\n" + " <path action=\"D\">/trunk/playground/ccc</path>\n" + " </paths>\n" + " <msg>blo</msg>\n" + " </logentry>\n" + "</log>"; TimeZone.setDefault(TimeZone.getTimeZone("GMT+0:00")); Date julyTwentynineSixPM2003 = new GregorianCalendar(2003, Calendar.JULY, 29, 18, 0, 0).getTime(); List modifications = SVN.SVNLogXMLParser.parseAndFilter(new StringReader(svnLog), julyTwentynineSixPM2003); assertEquals(2, modifications.size()); Modification modification = createModification(SVN.getOutDateFormatter().parse("2003-08-02T10:01:13.349"), "lee", "bli", "663", "", "/trunk/playground/bbb", "added"); assertThat((Modification) modifications.get(0), equalTo(modification)); modification = createModification(SVN.getOutDateFormatter().parse("2003-07-29T18:15:11.100"), "martin", "blo", "665", "", "/trunk/playground/ccc", "deleted"); assertThat((Modification) modifications.get(1), equalTo(modification)); Date julyTwentyeightZeroPM2003 = new GregorianCalendar(2003, Calendar.JULY, 28, 0, 0, 0).getTime(); modifications = SVN.SVNLogXMLParser.parseAndFilter(new StringReader(svnLog), julyTwentyeightZeroPM2003); assertEquals(3, modifications.size()); modifications = SVN.SVNLogXMLParser.parseAndFilter(new StringReader(svnLog), julyTwentynineSixPM2003, "external/path"); assertEquals(2, modifications.size()); modification = createModification(SVN.getOutDateFormatter().parse("2003-08-02T10:01:13.349"), "lee", "bli", "663", "", "/external/path:/trunk/playground/bbb", "added"); assertThat((Modification) modifications.get(0), equalTo(modification)); }
public static DateFormat getOutDateFormatter() { DateFormat f = new SimpleDateFormat(SVN_DATE_FORMAT_OUT); f.setTimeZone(TimeZone.getTimeZone("GMT")); return f; }
SVN implements SourceControl { public static DateFormat getOutDateFormatter() { DateFormat f = new SimpleDateFormat(SVN_DATE_FORMAT_OUT); f.setTimeZone(TimeZone.getTimeZone("GMT")); return f; } }
SVN implements SourceControl { public static DateFormat getOutDateFormatter() { DateFormat f = new SimpleDateFormat(SVN_DATE_FORMAT_OUT); f.setTimeZone(TimeZone.getTimeZone("GMT")); return f; }  }
SVN implements SourceControl { public static DateFormat getOutDateFormatter() { DateFormat f = new SimpleDateFormat(SVN_DATE_FORMAT_OUT); f.setTimeZone(TimeZone.getTimeZone("GMT")); return f; }  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); }
SVN implements SourceControl { public static DateFormat getOutDateFormatter() { DateFormat f = new SimpleDateFormat(SVN_DATE_FORMAT_OUT); f.setTimeZone(TimeZone.getTimeZone("GMT")); return f; }  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);  }