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


Java SVNWCClient.doSetWCFormat方法代码示例

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


在下文中一共展示了SVNWCClient.doSetWCFormat方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: upgrade

import org.tmatesoft.svn.core.wc.SVNWCClient; //导入方法依赖的package包/类
private static void upgrade(@NotNull File path,
                            @NotNull WorkingCopyFormat format,
                            @NotNull SVNWCClient client,
                            @Nullable ProgressTracker handler) throws SVNException, VcsException {
  // fake event indicating upgrade start
  callHandler(handler, createEvent(path, EventAction.UPDATE_COMPLETED));
  client.doSetWCFormat(path, format.getFormat());
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:SvnKitUpgradeClient.java

示例2: run

import org.tmatesoft.svn.core.wc.SVNWCClient; //导入方法依赖的package包/类
public void run(@NotNull final ProgressIndicator indicator) {
  ProjectLevelVcsManager.getInstanceChecked(myProject).startBackgroundVcsOperation();
  indicator.setIndeterminate(true);
  final boolean supportsChangelists = myNewFormat.supportsChangelists();
  if (supportsChangelists) {
    myBeforeChangeLists = ChangeListManager.getInstance(myProject).getChangeListsCopy();
  }
  final SVNWCClient wcClient = myVcs.createWCClient();
  wcClient.setEventHandler(new ISVNEventHandler() {
    @Override
    public void handleEvent(SVNEvent event, double progress) throws SVNException {
      if (SVNEventAction.UPGRADED_PATH.equals(event.getAction()) && event.getFile() != null) {
        indicator.setText2("Upgraded path " + VcsUtil.getPathForProgressPresentation(event.getFile()));
      }
    }

    @Override
    public void checkCancelled() throws SVNCancelException {
      indicator.checkCanceled();
    }
  });
  try {
    for (WCInfo wcInfo : myWcInfos) {
      File path = new File(wcInfo.getPath());
      if (! wcInfo.isIsWcRoot()) {
        path = SvnUtil.getWorkingCopyRoot(path);
      }
      try {
        if (WorkingCopyFormat.ONE_DOT_SEVEN.equals(myNewFormat)) {
          indicator.setText(SvnBundle.message("action.Subversion.cleanup.progress.text", path.getAbsolutePath()));
          wcClient.doCleanup(path);
        }
        indicator.setText(SvnBundle.message("action.change.wcopy.format.task.progress.text", path.getAbsolutePath(),
                                            SvnUtil.formatRepresentation(wcInfo.getFormat()), SvnUtil.formatRepresentation(myNewFormat)));
        wcClient.doSetWCFormat(path, myNewFormat.getFormat());
      } catch (Throwable e) {
        myExceptions.add(e);
      }
    }
  }
  finally {
    ProjectLevelVcsManager.getInstance(myProject).stopBackgroundVcsOperation();

    // to map to native
    if (supportsChangelists) {
      SvnVcs.getInstance(myProject).processChangeLists(myBeforeChangeLists);
    }

    ApplicationManager.getApplication().getMessageBus().syncPublisher(SvnVcs.WC_CONVERTED).run();
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:52,代码来源:SvnFormatWorker.java

示例3: mergePath

import org.tmatesoft.svn.core.wc.SVNWCClient; //导入方法依赖的package包/类
public List<String> mergePath(String url1, String url2, String destino) throws SVNException {


        //SVNWCClient wCClient = cliente.getWCClient();
        SVNWCClient wCClient = SVNClientManager.newInstance().getWCClient();

        SVNDiffClient diffClient = cliente.getDiffClient();

        //criando o DefaultOptions
        DefaultSVNOptions svnOptions = (DefaultSVNOptions) diffClient.getOptions();
        ConflictResolverHandler con = new ConflictResolverHandler();
        svnOptions.setConflictHandler(con);


        File ws1 = new File(url1);
        File ws2 = new File(url2);
        File wsDestino = new File(destino);
        wCClient.doSetWCFormat(ws1, SVNAdminAreaFactory.WC_FORMAT_14);
        wCClient.doSetWCFormat(ws2, SVNAdminAreaFactory.WC_FORMAT_14);
        wCClient.doSetWCFormat(wsDestino, SVNAdminAreaFactory.WC_FORMAT_14);


        cliente.getDiffClient().doMerge(ws1, SVNRevision.HEAD, ws2, SVNRevision.HEAD, wsDestino, SVNDepth.INFINITY, true, false, false, false);

        return con.getConflitos();


    }
 
开发者ID:gems-uff,项目名称:oceano,代码行数:29,代码来源:Subversion.java


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