当前位置: 首页>>代码示例>>Java>>正文


Java SvnTarget.isURL方法代码示例

本文整理汇总了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);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:18,代码来源:SvnKitPropertyClient.java

示例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();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:32,代码来源:CmdCopyMoveClient.java

示例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;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:29,代码来源:SvnKitCopyMoveClient.java

示例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);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:8,代码来源:SvnDiffFromHistoryHandler.java

示例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);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:6,代码来源:BaseSvnClient.java


注:本文中的org.tmatesoft.svn.core.wc2.SvnTarget.isURL方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。