• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java SVNCopySource类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.tmatesoft.svn.core.wc.SVNCopySource的典型用法代码示例。如果您正苦于以下问题:Java SVNCopySource类的具体用法?Java SVNCopySource怎么用?Java SVNCopySource使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



SVNCopySource类属于org.tmatesoft.svn.core.wc包,在下文中一共展示了SVNCopySource类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: copy

import org.tmatesoft.svn.core.wc.SVNCopySource; //导入依赖的package包/类
@Override
public void copy(@NotNull SvnTarget source,
                 @NotNull File destination,
                 @Nullable SVNRevision revision,
                 boolean makeParents,
                 @Nullable ProgressTracker handler) throws VcsException {
  SVNCopyClient client = myVcs.getSvnKitManager().createCopyClient();
  client.setEventHandler(toEventHandler(handler));

  try {
    client.doCopy(new SVNCopySource[]{createCopySource(source, revision)}, destination, false, makeParents, true);
  }
  catch (SVNException e) {
    throw new SvnBindException(e);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:17,代码来源:SvnKitCopyMoveClient.java


示例2: copy

import org.tmatesoft.svn.core.wc.SVNCopySource; //导入依赖的package包/类
public static SVNCommitInfo copy( SVNClientManager clientManager, SVNURL srcURL, SVNURL dstURL, boolean isMove,
                                  String commitMessage, String revision )
    throws SVNException
{

    SVNRevision svnRevision = null;
    if ( StringUtils.isEmpty( revision ) )
    {
        svnRevision = SVNRevision.HEAD;
    }
    else
    {
        svnRevision = SVNRevision.create( Long.parseLong( revision ) );
    }
    /*
     * SVNRevision.HEAD means the latest revision.
     * Returns SVNCommitInfo containing information on the new revision committed
     * (revision number, etc.)
     */
    SVNCopySource[] svnCopySources = new SVNCopySource[1];
    svnCopySources[0] = new SVNCopySource( svnRevision, svnRevision, srcURL );

    return clientManager.getCopyClient().doCopy( svnCopySources, dstURL, false, true, true, commitMessage,
                                                 new SVNProperties() );
    //return clientManager.getCopyClient().doCopy( srcURL, svnRevision, dstURL, isMove, commitMessage, new SVNProperties() );
}
 
开发者ID:olamy,项目名称:maven-scm-provider-svnjava,代码行数:27,代码来源:SvnJavaUtil.java


示例3: doCopy

import org.tmatesoft.svn.core.wc.SVNCopySource; //导入依赖的package包/类
private void doCopy(final SVNURL src, final SVNURL dst, final boolean move, final String comment) {
  final SVNException[] exception = new SVNException[1];
  Runnable command = new Runnable() {
    public void run() {
      ProgressIndicator progress = ProgressManager.getInstance().getProgressIndicator();
      if (progress != null) {
        progress.setText((move ? SvnBundle.message("progress.text.browser.moving", src) : SvnBundle.message("progress.text.browser.copying", src)));
        progress.setText2(SvnBundle.message("progress.text.browser.remote.destination", dst));
      }
      SvnVcs vcs = SvnVcs.getInstance(myProject);
      try {
        SVNCopyClient committer = vcs.createCopyClient();
        final SVNCopySource[] copySource = new SVNCopySource[] {new SVNCopySource(SVNRevision.HEAD, SVNRevision.HEAD, src)};
        committer.doCopy(copySource, dst, move, true, true, comment, null);
      }
      catch (SVNException e) {
        exception[0] = e;
      }
    }
  };
  String progressTitle = move ? SvnBundle.message("progress.title.browser.move") : SvnBundle.message("progress.title.browser.copy");
  ProgressManager.getInstance().runProcessWithProgressSynchronously(command, progressTitle, false, myProject);
  if (exception[0] != null) {
    Messages.showErrorDialog(exception[0].getMessage(), SvnBundle.message("message.text.error"));
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:27,代码来源:RepositoryBrowserDialog.java


示例4: copy

import org.tmatesoft.svn.core.wc.SVNCopySource; //导入依赖的package包/类
public void copy(SVNURL targetURL, SVNURL[] paths) throws SVNException {
	SVNCopySource[] convert = convert(paths);

	/*
		doCopy(   SVNCopySource[] sources,
		              SVNURL dst,
		              boolean isMove,
		              boolean makeParents,
		              boolean failWhenDstExists,
		              java.lang.String commitMessage,
		              SVNProperties revisionProperties  )
		Copies each source in sources to dst.
	*/
	SVNCopyClient copyClient = getSvnManager().getCopyClient();
	copyClient.doCopy(convert, targetURL, false, false, false, "copy by IDU", new SVNProperties());
}
 
开发者ID:callakrsos,项目名称:Gargoyle,代码行数:17,代码来源:SVNCopy.java


示例5: copy

import org.tmatesoft.svn.core.wc.SVNCopySource; //导入依赖的package包/类
public static SVNCommitInfo copy(SVNClientManager clientManager, SVNURL srcURL, SVNURL dstURL, boolean isMove, String commitMessage)
		throws SVNException {
	/*
	 * SVNRevision.HEAD means the latest revision. Returns SVNCommitInfo
	 * containing information on the new revision committed (revision
	 * number, etc.)
	 */
	return clientManager.getCopyClient().doCopy(new SVNCopySource[] { new SVNCopySource(SVNRevision.HEAD, SVNRevision.HEAD, srcURL) },
			dstURL, isMove, true, false, commitMessage, null);
}
 
开发者ID:AgarwalNeha1,项目名称:gluu,代码行数:11,代码来源:SvnHelper.java


示例6: copy

import org.tmatesoft.svn.core.wc.SVNCopySource; //导入依赖的package包/类
private static SVNCommitInfo copy(SVNURL srcURL, SVNURL dstURL, boolean isMove, String commitMessage) throws SVNException {
    /*
     * SVNRevision.HEAD means the latest revision.
     * Returns SVNCommitInfo containing information on the new revision committed 
     * (revision number, etc.) 
     */        
    return ourClientManager.getCopyClient().doCopy(new SVNCopySource[] {new SVNCopySource(SVNRevision.HEAD, SVNRevision.HEAD, srcURL)},
            dstURL, isMove, true, false, commitMessage, null);
}
 
开发者ID:wdicarlo,项目名称:gradle-svnkit,代码行数:10,代码来源:WorkingCopy.java


示例7: action

import org.tmatesoft.svn.core.wc.SVNCopySource; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public void action(SVNInfo info) {

	final String us = info.getUsername();
	final String pw = info.getPassword();

	// create a SVN client manager instance
	DefaultSVNOptions options = SVNWCUtil.createDefaultOptions(true);
	SVNClientManager cm = newInstance(options, us, pw);

	// create a SVN copy client instance
	SVNCopyClient copy = cm.getCopyClient();

	try {
		// parse the SVN source URL
		SVNURL svnUrl = SVNURL.parseURIEncoded(info.getUrl());
		// parse the SVN destination URL
		SVNURL url = getSvnUrl(info);
		// prepare the copy source
		SVNRevision rev = info.getRevision();
		SVNCopySource[] sources = { new SVNCopySource(rev, null, svnUrl) };
		// create the tag
		if (!info.isSimulateRun()) {
			copy.doCopy(sources, url, false, false, false, getComment(),
					null);
		} else {
			info.getLogger().info("simulate copy SVN folder " + svnUrl);
		}
	} catch (SVNException e) {
		throw new InvalidUserDataException("error while copying SVN folder", e);
	}
}
 
开发者ID:christian-weber,项目名称:gradle-release-plugin,代码行数:36,代码来源:CopyReleaseAction.java


示例8: add

import org.tmatesoft.svn.core.wc.SVNCopySource; //导入依赖的package包/类
private void add(final Change change) throws SVNException {
  if (myCopyClient == null) {
    myCopyClient = myVcs.createCopyClient();
    myCopyClient.setEventHandler(myHandler);
  }
  final SvnRepositoryContentRevision after = (SvnRepositoryContentRevision) change.getAfterRevision();
  final String path = myCurrentBranchUrl.toString();
  final String afterUrl = after.getFullPath();
  final File afterPath = SvnUtil.fileFromUrl(myTarget, path, afterUrl);

  final SVNRevision revision = ((SvnRevisionNumber)after.getRevisionNumber()).getRevision();
  final SVNCopySource[] copySource = new SVNCopySource[]{new SVNCopySource(revision, revision, SVNURL.parseURIEncoded(afterUrl))};
  // todo dry run
  myCopyClient.doCopy(copySource, afterPath, false, true, true);
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:16,代码来源:PointMerger.java


示例9: convert

import org.tmatesoft.svn.core.wc.SVNCopySource; //导入依赖的package包/类
private SVNCopySource[] convert(SVNURL[] urls) {
	return Stream.of(urls).map(s -> convert(s)).toArray(SVNCopySource[]::new);
}
 
开发者ID:callakrsos,项目名称:Gargoyle,代码行数:4,代码来源:SVNCopy.java


示例10: createCopySource

import org.tmatesoft.svn.core.wc.SVNCopySource; //导入依赖的package包/类
@NotNull
private static SVNCopySource createCopySource(@NotNull SvnTarget source, @Nullable SVNRevision revision) {
  return source.isFile()
         ? new SVNCopySource(source.getPegRevision(), revision, source.getFile())
         : new SVNCopySource(source.getPegRevision(), revision, source.getURL());
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:7,代码来源:SvnKitCopyMoveClient.java


示例11: createBranch

import org.tmatesoft.svn.core.wc.SVNCopySource; //导入依赖的package包/类
public void createBranch(String branchName) throws IOException, SVNException {
  SVNCopyClient copyClient = manager.getCopyClient();
  SVNCopySource source = new SVNCopySource(SVNRevision.HEAD, SVNRevision.HEAD, localRepository.appendPath("trunk", false));
  copyClient.doCopy(new SVNCopySource[] {source}, localRepository.appendPath("branches/" + branchName, false), false, false, true, "Create branch", null);
}
 
开发者ID:SonarSource,项目名称:sonar-scm-svn,代码行数:6,代码来源:SvnTester.java


示例12: copy

import org.tmatesoft.svn.core.wc.SVNCopySource; //导入依赖的package包/类
public void copy(Path worktree, String src, String dst) throws SVNException {
  SVNCopyClient copyClient = manager.getCopyClient();
  SVNCopySource source = new SVNCopySource(SVNRevision.HEAD, SVNRevision.HEAD, worktree.resolve(src).toFile());
  copyClient.doCopy(new SVNCopySource[]{source}, worktree.resolve(dst).toFile(), false, false, true);
}
 
开发者ID:SonarSource,项目名称:sonar-scm-svn,代码行数:6,代码来源:SvnTester.java


示例13: copia

import org.tmatesoft.svn.core.wc.SVNCopySource; //导入依赖的package包/类
public Long copia(String urlOrigem, String urlDestino, SVNRevision revision) throws SVNException {

        //criando SVNURL
        SVNURL origem = null, destino = null;
        origem = SVNURL.parseURIEncoded(urlOrigem);
        destino = SVNURL.parseURIEncoded(urlDestino);

        SVNCopySource[] copySource = {new SVNCopySource(revision, revision, origem)};
        SVNProperties sVNProperties = new SVNProperties();
        SVNCommitInfo sVNCommitInfo = null;


        //realizando a cópia

//        cliente.getCopyClient().doCopy(origem, SVNRevision.HEAD, destino, false, "realizando cópia da ultima versăo do trunk");
        sVNCommitInfo = cliente.getCopyClient().doCopy(copySource, destino, false, true, true, "Copiando do diretorio protegido para o autobranch", sVNProperties);

        return sVNCommitInfo.getNewRevision();
    }
 
开发者ID:gems-uff,项目名称:oceano,代码行数:20,代码来源:Subversion.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java Repositories类代码示例发布时间:2022-05-22
下一篇:
Java SceneBuilder类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap