本文整理汇总了Java中org.tmatesoft.svn.core.wc2.SvnTarget.isURL方法的典型用法代码示例。如果您正苦于以下问题:Java SvnTarget.isURL方法的具体用法?Java SvnTarget.isURL怎么用?Java SvnTarget.isURL使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.tmatesoft.svn.core.wc2.SvnTarget
的用法示例。
在下文中一共展示了SvnTarget.isURL方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: runGetProperty
import org.tmatesoft.svn.core.wc2.SvnTarget; //导入方法依赖的package包/类
private void runGetProperty(@NotNull SvnTarget target,
@Nullable String property,
@Nullable SVNRevision revision,
@Nullable Depth depth,
@Nullable PropertyConsumer handler) throws VcsException {
SVNWCClient client = createClient();
try {
if (target.isURL()) {
client.doGetProperty(target.getURL(), property, target.getPegRevision(), revision, toDepth(depth), toHandler(handler));
} else {
client.doGetProperty(target.getFile(), property, target.getPegRevision(), revision, toDepth(depth), toHandler(handler), null);
}
} catch (SVNException e) {
throw new VcsException(e);
}
}
示例2: copy
import org.tmatesoft.svn.core.wc2.SvnTarget; //导入方法依赖的package包/类
@Override
public long copy(@NotNull SvnTarget source,
@NotNull SvnTarget destination,
@Nullable SVNRevision revision,
boolean makeParents,
boolean isMove,
@NotNull String message,
@Nullable CommitEventHandler handler) throws VcsException {
if (!destination.isURL()) {
throw new IllegalArgumentException("Only urls are supported as destination " + destination);
}
List<String> parameters = new ArrayList<String>();
CommandUtil.put(parameters, source);
CommandUtil.put(parameters, destination);
CommandUtil.put(parameters, revision);
CommandUtil.put(parameters, makeParents, "--parents");
parameters.add("--message");
parameters.add(message);
// copy to url output is the same as commit output - just statuses have "copy of" suffix
// so "Adding" will be "Adding copy of"
CmdCheckinClient.CommandListener listener = new CmdCheckinClient.CommandListener(handler);
if (source.isFile()) {
listener.setBaseDirectory(source.getFile());
}
execute(myVcs, source, getCommandName(isMove), parameters, listener);
return listener.getCommittedRevision();
}
示例3: copy
import org.tmatesoft.svn.core.wc2.SvnTarget; //导入方法依赖的package包/类
@Override
public long copy(@NotNull SvnTarget source,
@NotNull SvnTarget destination,
@Nullable SVNRevision revision,
boolean makeParents,
boolean isMove,
@NotNull String message,
@Nullable CommitEventHandler handler) throws VcsException {
if (!destination.isURL()) {
throw new IllegalArgumentException("Only urls are supported as destination " + destination);
}
final SVNCopySource copySource = createCopySource(source, revision);
SVNCopyClient client = myVcs.getSvnKitManager().createCopyClient();
client.setEventHandler(toEventHandler(handler));
SVNCommitInfo info;
try {
info = client
.doCopy(new SVNCopySource[]{copySource}, destination.getURL(), isMove, makeParents, true, message, null);
}
catch (SVNException e) {
throw new VcsException(e);
}
return info != null ? info.getNewRevision() : INVALID_REVISION;
}
示例4: executeDiff
import org.tmatesoft.svn.core.wc2.SvnTarget; //导入方法依赖的package包/类
@NotNull
private List<Change> executeDiff(@NotNull FilePath path, @NotNull SvnTarget target1, @NotNull SvnTarget target2) throws VcsException {
File file = path.getIOFile();
ClientFactory factory = target2.isURL() ? myVcs.getFactory(file) : DirectoryWithBranchComparer.getClientFactory(myVcs, file);
return factory.createDiffClient().compare(target1, target2);
}
示例5: assertUrl
import org.tmatesoft.svn.core.wc2.SvnTarget; //导入方法依赖的package包/类
protected void assertUrl(@NotNull SvnTarget target) {
if (!target.isURL()) {
throw new IllegalArgumentException("Target should be url " + target);
}
}