예제 #1
0
  private void analyzeFolder(File file) {
    try {
      LOG.debug("File:" + file.getPath());
      SVNInfo svnInfo = svnCln.getInfo(file);

      String lastCommitter = svnInfo.getAuthor();

      Date lastDateCommit = svnInfo.getCommittedDate();
      LOG.debug("lastDateCommit=" + lastDateCommit);

      long lastRev = svnInfo.getRevision().getNumber();
      assertEquals(99, lastRev);

      // Get SVNUrl
      LOG.debug("getChangelistName=" + svnInfo.getChangelistName());
      String svnUrl = svnInfo.getRepositoryRootURL().toDecodedString();

      assertEquals("http://svn.mkss.vn/svnobserver", svnUrl);

      scanFolder(new File(wcPath));
    } catch (SVNException ex) {
      // TODO Auto-generated catch block
      ex.printStackTrace();
    }
  }
예제 #2
0
  /** Test method for {@link svn.client.SVNClient#doCheckOut(java.util.Date)}. */
  @Test
  public void testGetWCInfo() {

    try {
      SVNWCClient wcCln = svnCln.getSVNWCClient();

      SVNInfo svnInfo = wcCln.doInfo(new File(this.wcPath), SVNRevision.HEAD);
      String lastCommitter = svnInfo.getAuthor();
      assertEquals("thach", lastCommitter);

      Date lastDateCommit = svnInfo.getCommittedDate();
      LOG.debug("lastDateCommit=" + lastDateCommit);
      assertNotNull(lastDateCommit);

      long lastRev = svnInfo.getRevision().getNumber();
      assertEquals(99, lastRev);

      // Get SVNUrl
      LOG.debug("getChangelistName=" + svnInfo.getChangelistName());
      String svnUrl = svnInfo.getRepositoryRootURL().toDecodedString();

      assertEquals("http://svn.mkss.vn/svnobserver", svnUrl);
      analyzeFolder(new File(wcPath));
    } catch (SVNException ex) {
      ex.printStackTrace();
      fail(ex.getMessage());
    }
  }