use of org.tmatesoft.svn.core.SVNCommitInfo in project Gargoyle by callakrsos.
the class SVNCommit method modifyFileCommit.
/**
*
* 수정된 코드를 서버 반영시 사용.
*
*
* @작성자 : KYJ
* @작성일 : 2016. 7. 12.
* @param dirPath
* remote server relative path.
* @param fileName
* only SimpleFileName
* @param oldData
* @param newData
* @param commitMessage
* @return
* @throws SVNException
* @throws IOException
*/
public SVNCommitInfo modifyFileCommit(String dirPath, String fileName, InputStream oldData, InputStream newData, String commitMessage) throws SVNException, IOException {
ISVNEditor editor = getDefaultSVNEditor(commitMessage);
SVNCommitInfo modifyFile = SVNCommitInfo.NULL;
try {
modifyFile = modifyFile(editor, dirPath, dirPath.concat("/").concat(fileName), oldData, newData);
} finally {
close(oldData);
close(newData);
}
return modifyFile;
}
use of org.tmatesoft.svn.core.SVNCommitInfo in project Gargoyle by callakrsos.
the class SVNImport method doImport.
/**
* SVN Import Command 수행.
*
* @작성자 : KYJ
* @작성일 : 2016. 7. 11.
* @param checkoutedDir
* @param to
* @return
* @throws SVNException
*/
private SVNCommitInfo doImport(File checkoutedDir, SVNURL to) throws SVNException {
if (checkoutedDir.exists()) {
SVNCommitClient commitClient = getSvnManager().getCommitClient();
SVNCommitInfo doImport = commitClient.doImport(checkoutedDir, to, "Init Commit . SVN Import Command", new SVNProperties(), true, true, SVNDepth.INFINITY);
LOGGER.debug(" Do SVN Import Command ");
return doImport;
}
return SVNCommitInfo.NULL;
}
use of org.tmatesoft.svn.core.SVNCommitInfo in project Gargoyle by callakrsos.
the class CommandTest3 method commitTest.
/**
* SVN Commit Test.
*
* @작성자 : KYJ
* @작성일 : 2016. 7. 12.
* @throws SVNException
* @throws IOException
*/
@Test
public void commitTest() throws SVNException, IOException {
File[] commitTestFiles = getCommitTestFiles();
FileInputStream inputStream = null;
try {
inputStream = new FileInputStream(commitTestFiles[0]);
// thirdPartManager.commit_new("/sql", commitTestFiles[0].getName(), inputStream, "test commit.");
// commitTestFiles = new File[] { new File("C:\\logs\\test\\deprecated_pass-batch-core\\sql\\text.txt") };
SVNCommitInfo commit_modify = localServerManager.commit_modify("sql", "text.txt", inputStream, "test commit.");
System.out.println(commit_modify.getAuthor());
System.out.println(commit_modify.getNewRevision());
} finally {
if (inputStream != null)
inputStream.close();
}
}
Aggregations