use of org.tmatesoft.svn.core.wc.SVNWCClient in project intellij-community by JetBrains.
the class SvnMergeInfoTest method assertMergeInfo.
private void assertMergeInfo(@NotNull File file, @NotNull String... values) throws SVNException {
// TODO: Replace with ClientFactory model
final SvnVcs vcs = SvnVcs.getInstance(myProject);
final SVNWCClient wcClient = vcs.getSvnKitManager().createWCClient();
final SVNPropertyData data = wcClient.doGetProperty(file, "svn:mergeinfo", SVNRevision.UNDEFINED, SVNRevision.WORKING);
assert data != null && data.getValue() != null;
boolean result = false;
for (String value : values) {
result |= value.equals(data.getValue().getString());
}
assert result;
}
use of org.tmatesoft.svn.core.wc.SVNWCClient in project intellij-community by JetBrains.
the class SvnKitLockClient method getClient.
@NotNull
private SVNWCClient getClient(@Nullable ProgressTracker handler) {
SVNWCClient client = myVcs.getSvnKitManager().createWCClient();
client.setEventHandler(toEventHandler(handler));
return client;
}
use of org.tmatesoft.svn.core.wc.SVNWCClient in project intellij-community by JetBrains.
the class SvnKitRevertClient method revert.
@Override
public void revert(@NotNull Collection<File> paths, @Nullable Depth depth, @Nullable ProgressTracker handler) throws VcsException {
SVNWCClient client = myVcs.getSvnKitManager().createWCClient();
client.setEventHandler(toEventHandler(handler));
try {
client.doRevert(ArrayUtil.toObjectArray(paths, File.class), toDepth(depth), null);
} catch (SVNException e) {
throw new VcsException(e);
}
}
use of org.tmatesoft.svn.core.wc.SVNWCClient in project intellij-community by JetBrains.
the class SvnKitAddClient method add.
/**
* TODO: Implement correct support for includeIgnored parameter. Also check that correct depth will be used for all cases (when another
* TODO: overload of doAdd() is used) as, for instance, SVNDepth.recurseFromDepth(EMPTY) = false, SVNDepth.fromRecursive(false) = FILES.
*/
@Override
public void add(@NotNull File file, @Nullable Depth depth, boolean makeParents, boolean includeIgnored, boolean force, @Nullable ProgressTracker handler) throws VcsException {
try {
SVNWCClient client = myVcs.getSvnKitManager().createWCClient();
client.setEventHandler(toEventHandler(handler));
client.doAdd(file, force, // directory should already be created
false, // not used but will be passed as makeParents value
makeParents, Depth.isRecursive(depth));
} catch (SVNException e) {
throw new VcsException(e);
}
}
use of org.tmatesoft.svn.core.wc.SVNWCClient in project intellij-community by JetBrains.
the class SvnRollbackTest method setProperty.
private void setProperty(final File file, final String name, final String value) throws SVNException {
final SVNWCClient client = myVcs.getSvnKitManager().createWCClient();
client.doSetProperty(file, (path, properties) -> {
final SVNProperties result = new SVNProperties();
result.put(name, SVNPropertyValue.create(value));
return result;
}, true, SVNDepth.EMPTY, null, null);
}
Aggregations