use of org.tmatesoft.svn.core.wc.SVNCommitClient in project intellij-community by JetBrains.
the class SvnKitImportClient method doImport.
@Override
public long doImport(@NotNull File path, @NotNull SVNURL url, @Nullable Depth depth, @NotNull String message, boolean noIgnore, @Nullable CommitEventHandler handler, @Nullable ISVNCommitHandler commitHandler) throws VcsException {
SVNCommitClient client = myVcs.getSvnKitManager().createCommitClient();
client.setEventHandler(toEventHandler(handler));
client.setCommitHandler(commitHandler);
try {
SVNCommitInfo info = client.doImport(path, url, message, null, !noIgnore, false, toDepth(depth));
return info.getNewRevision();
} catch (SVNException e) {
throw new SvnBindException(e);
}
}
use of org.tmatesoft.svn.core.wc.SVNCommitClient in project intellij-community by JetBrains.
the class SvnKitCheckinClient method commit.
@NotNull
@Override
public CommitInfo[] commit(@NotNull List<File> paths, @NotNull String comment) throws VcsException {
File[] pathsToCommit = ArrayUtil.toObjectArray(paths, File.class);
boolean keepLocks = myVcs.getSvnConfiguration().isKeepLocks();
SVNCommitPacket[] commitPackets = null;
SVNCommitInfo[] results;
SVNCommitClient committer = myVcs.getSvnKitManager().createCommitClient();
IdeaCommitHandler handler = new IdeaCommitHandler(ProgressManager.getInstance().getProgressIndicator(), true, true);
committer.setEventHandler(toEventHandler(handler));
try {
commitPackets = committer.doCollectCommitItems(pathsToCommit, keepLocks, true, SVNDepth.EMPTY, true, null);
results = committer.doCommit(commitPackets, keepLocks, comment);
commitPackets = null;
} catch (SVNException e) {
throw new SvnBindException(e);
} finally {
if (commitPackets != null) {
for (SVNCommitPacket commitPacket : commitPackets) {
try {
commitPacket.dispose();
} catch (SVNException e) {
LOG.info(e);
}
}
}
}
// This seems to be necessary only for SVNKit as changes after command line operations should be detected during VFS refresh.
for (VirtualFile f : handler.getDeletedFiles()) {
f.putUserData(VirtualFile.REQUESTOR_MARKER, this);
}
return convert(results);
}
use of org.tmatesoft.svn.core.wc.SVNCommitClient 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;
}
Aggregations