use of org.tmatesoft.svn.core.ISVNLogEntryHandler in project Gargoyle by callakrsos.
the class SVNLog method logFileSystem.
/********************************
* 작성일 : 2016. 7. 13. 작성자 : KYJ
*
*
* @param path
* @param startRevision
* @param endDate
* @param exceptionHandler
* @return
********************************/
public List<SVNLogEntry> logFileSystem(File[] path, long startRevision, Date endDate, Consumer<Exception> exceptionHandler) {
SVNLogClient logClient = getSvnManager().getLogClient();
List<SVNLogEntry> result = new ArrayList<>();
try {
ISVNLogEntryHandler handler = logEntry -> {
LOGGER.debug("path :: {} rivision :: {} date :: {} author :: {} message :: {} ", path, logEntry.getRevision(), logEntry.getDate(), logEntry.getAuthor(), logEntry.getMessage());
result.add(logEntry);
};
doLog(path, startRevision, endDate, logClient, handler);
} catch (SVNException e) {
LOGGER.error(ValueUtil.toString(e));
if (exceptionHandler != null)
exceptionHandler.accept(e);
}
return result;
}
use of org.tmatesoft.svn.core.ISVNLogEntryHandler in project Gargoyle by callakrsos.
the class SVNLog method log.
/********************************
* 작성일 : 2016. 5. 5. 작성자 : KYJ
*
* 이력정보 조회
*
* @param path
* 상대경로
* @param revision
* 리비젼번호
* @param exceptionHandler
* 에러발생시 처리할 핸들 정의
* @return
********************************/
public List<SVNLogEntry> log(String path, String revision, Consumer<Exception> exceptionHandler) {
SVNLogClient logClient = getSvnManager().getLogClient();
List<SVNLogEntry> result = new ArrayList<>();
try {
ISVNLogEntryHandler handler = logEntry -> {
LOGGER.debug("rivision :: {} date :: {} author :: {} message :: {} ", logEntry.getRevision(), logEntry.getDate(), logEntry.getAuthor(), logEntry.getMessage());
result.add(logEntry);
};
String _path = path;
try {
_path = URLDecoder.decode(_path, "UTF-8");
} catch (Exception e) {
e.printStackTrace();
}
logClient.doLog(getSvnURL(), new String[] { _path }, SVNRevision.create(Long.parseLong(revision)), SVNRevision.create(Long.parseLong(revision) == -1 ? 0 : Long.parseLong(revision)), SVNRevision.HEAD, true, false, 100L, handler);
} catch (SVNException e) {
if (exceptionHandler != null)
exceptionHandler.accept(e);
else
LOGGER.error(ValueUtil.toString(e));
}
return result;
}
use of org.tmatesoft.svn.core.ISVNLogEntryHandler in project Gargoyle by callakrsos.
the class SVNLog method log.
public List<SVNLogEntry> log(String path, long startRevision, Date endDate, Consumer<Exception> exceptionHandler) {
SVNLogClient logClient = getSvnManager().getLogClient();
List<SVNLogEntry> result = new ArrayList<>();
try {
ISVNLogEntryHandler handler = logEntry -> {
LOGGER.debug("path :: {} rivision :: {} date :: {} author :: {} message :: {} ", path, logEntry.getRevision(), logEntry.getDate(), logEntry.getAuthor(), logEntry.getMessage());
result.add(logEntry);
};
logServer(path, startRevision, endDate, logClient, handler);
} catch (SVNException e) {
LOGGER.error(ValueUtil.toString(e));
if (exceptionHandler != null)
exceptionHandler.accept(e);
}
return result;
}
Aggregations