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

Java SVNCancelException类代码示例

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

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



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

示例1: buildSvnEventHandler

import org.tmatesoft.svn.core.SVNCancelException; //导入依赖的package包/类
private ISVNEventHandler buildSvnEventHandler ( String desc, BufferedWriter outputWriter ) {
	lineCount = 0;
	return new ISVNEventHandler() {

		@Override
		public void checkCancelled ()
				throws SVNCancelException {

		}

		@Override
		public void handleEvent ( SVNEvent event, double progress )
				throws SVNException {
			// logger.debug("progess: " + progress + " " + event);
			if ( event.getURL() == null && event.getFile() != null ) {
				updateProgress( outputWriter, desc + event.getFile().getName() );
			} else if ( event.getURL() != null ) {
				updateProgress( outputWriter, desc + event.getURL() );
			} else {
				updateProgress( outputWriter, desc + event );
			}
		}
	};
}
 
开发者ID:csap-platform,项目名称:csap-core,代码行数:25,代码来源:SourceControlManager.java


示例2: createStatusClient

import org.tmatesoft.svn.core.SVNCancelException; //导入依赖的package包/类
public SVNStatusClient createStatusClient() {
  final SVNStatusClient result = myVcs.createStatusClient();
  result.setFilesProvider(myFileProvider);
  result.setEventHandler(new ISVNEventHandler() {
    public void handleEvent(SVNEvent event, double progress) throws SVNException {
      //
    }

    public void checkCancelled() throws SVNCancelException {
      if (myIndicator != null) {
        myIndicator.checkCanceled();
      }
    }
  });
  return result;
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:17,代码来源:StatusWalkerPartnerImpl.java


示例3: checkCancelled

import org.tmatesoft.svn.core.SVNCancelException; //导入依赖的package包/类
public void checkCancelled() throws SVNCancelException {
  if (myCheckCancel && myProgress != null) {
    try {
      myProgress.checkCanceled();
    }
    catch (ProcessCanceledException ex) {
      throw new SVNCancelException();
    }
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:IdeaCommitHandler.java


示例4: checkCancelled

import org.tmatesoft.svn.core.SVNCancelException; //导入依赖的package包/类
public void checkCancelled() throws SVNCancelException {
  if (myProgressIndicator != null) {
    myProgressIndicator.checkCanceled();
    if (myProgressIndicator.isCanceled()) {
      SVNErrorManager.cancel(SvnBundle.message("exception.text.update.operation.cancelled"), SVNLogType.DEFAULT);
    }
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:UpdateEventHandler.java


示例5: getWithPassiveImpl

import org.tmatesoft.svn.core.SVNCancelException; //导入依赖的package包/类
private SVNAuthentication getWithPassiveImpl(SvnAuthenticationManager passive) throws SVNException {
  try {
    return passive.getFirstAuthentication(myKind, myRealm, myUrl);
  }
  catch (SVNCancelException e) {
    return null;
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:CredentialsAuthenticator.java


示例6: checkCancelled

import org.tmatesoft.svn.core.SVNCancelException; //导入依赖的package包/类
public boolean checkCancelled() {
  if (!myWasCancelled && myCommand.getCanceller() != null) {
    try {
      myCommand.getCanceller().checkCancelled();
    }
    catch (SVNCancelException e) {
      // indicates command should be cancelled
      myWasCancelled = true;
    }
  }

  return myWasCancelled;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:14,代码来源:CommandExecutor.java


示例7: createUpgradeHandler

import org.tmatesoft.svn.core.SVNCancelException; //导入依赖的package包/类
private static ProgressTracker createUpgradeHandler(@NotNull final ProgressIndicator indicator,
                                                     @NotNull final String cleanupMessage,
                                                     @NotNull final String upgradeMessage) {
  return new ProgressTracker() {
    @Override
    public void consume(ProgressEvent event) throws SVNException {
      if (event.getFile() != null) {
        if (EventAction.UPGRADED_PATH.equals(event.getAction())) {
          indicator.setText2("Upgraded path " + VcsUtil.getPathForProgressPresentation(event.getFile()));
        }
        // fake event indicating cleanup start
        if (EventAction.UPDATE_STARTED.equals(event.getAction())) {
          indicator.setText(cleanupMessage);
        }
        // fake event indicating upgrade start
        if (EventAction.UPDATE_COMPLETED.equals(event.getAction())) {
          indicator.setText(upgradeMessage);
        }
      }
    }

    @Override
    public void checkCancelled() throws SVNCancelException {
      indicator.checkCanceled();
    }
  };
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:28,代码来源:SvnFormatWorker.java


示例8: createEventHandler

import org.tmatesoft.svn.core.SVNCancelException; //导入依赖的package包/类
@NotNull
public ProgressTracker createEventHandler() {
  return new ProgressTracker() {
    @Override
    public void consume(ProgressEvent event) throws SVNException {
    }

    @Override
    public void checkCancelled() throws SVNCancelException {
      SvnRecursiveStatusWalker.this.checkCanceled();
    }
  };
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:14,代码来源:SvnRecursiveStatusWalker.java


示例9: checkCancelled

import org.tmatesoft.svn.core.SVNCancelException; //导入依赖的package包/类
@Override
public void checkCancelled() throws SVNCancelException {
  final ProgressManager pm = ProgressManager.getInstance();
  final ProgressIndicator pi = pm.getProgressIndicator();
  if (pi != null) {
    if (pi.isCanceled()) throw new SVNCancelException();
  }
  ProgressIndicator indicator = ProgressManager.getInstance().getProgressIndicator();
  if (indicator != null && indicator.isCanceled()) {
    throw new SVNCancelException();
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:13,代码来源:PrimitivePool.java


示例10: checkCancelled

import org.tmatesoft.svn.core.SVNCancelException; //导入依赖的package包/类
public void checkCancelled() throws SVNCancelException {
  try {
    getRef().checkCancelled();
  } catch (ProcessCanceledException e) {
    throw new SVNCancelException();
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:8,代码来源:QuicklyDisposableISVNCanceller.java


示例11: checkCancelled

import org.tmatesoft.svn.core.SVNCancelException; //导入依赖的package包/类
public void checkCancelled() throws SVNCancelException {
  if (cancelFlag) {
    cancelFlag = false;
    invokeLater(1); // reset progressBar
    throw new SVNCancelException();
  }
}
 
开发者ID:open744,项目名称:terramaster,代码行数:8,代码来源:Svn.java


示例12: doInBackground

import org.tmatesoft.svn.core.SVNCancelException; //导入依赖的package包/类
private void doInBackground(Project project, VirtualFile vf, String url, boolean checkout, String target) {
  final SvnVcs vcs = SvnVcs.getInstance(project);
  try {
    final File ioFile = new File(vf.getPath());
    if (addToExternalProperty(vcs, ioFile, target, url)) return;
    final VcsDirtyScopeManager dirtyScopeManager = VcsDirtyScopeManager.getInstance(project);
    final FilePathImpl filePath = new FilePathImpl(ioFile, true);
    dirtyScopeManager.fileDirty(filePath);
    if (checkout) {
      // +-
      final SVNUpdateClient client = vcs.createUpdateClient();
      client.setEventHandler(new ISVNEventHandler() {
        @Override
        public void handleEvent(SVNEvent event, double progress) throws SVNException {
        }

        @Override
        public void checkCancelled() throws SVNCancelException {
          final ProgressIndicator pi = ProgressManager.getInstance().getProgressIndicator();
          if (pi != null && pi.isCanceled()) throw new SVNCancelException();
        }
      });
      client.doUpdate(ioFile, SVNRevision.HEAD, SVNDepth.UNKNOWN, false, false);
      vf.refresh(true, true, new Runnable() {
        @Override
        public void run() {
          dirtyScopeManager.dirDirtyRecursively(filePath);
        }
      });
    }
  }
  catch (SVNException e1) {
    AbstractVcsHelper.getInstance(project).showError(new VcsException(e1), "Create External");
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:36,代码来源:CreateExternalAction.java


示例13: checkCancelled

import org.tmatesoft.svn.core.SVNCancelException; //导入依赖的package包/类
public void checkCancelled() throws SVNCancelException {
  final ProgressIndicator indicator = ProgressManager.getInstance().getProgressIndicator();
  if (indicator != null && indicator.isCanceled()) {
    throw new SVNCancelException();
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:7,代码来源:SvnProgressCanceller.java


示例14: checkCancelled

import org.tmatesoft.svn.core.SVNCancelException; //导入依赖的package包/类
public void checkCancelled() throws SVNCancelException {
  if (myIndicator != null && myIndicator.isCanceled()) {
    throw new SVNCancelException(SVNErrorMessage.create(SVNErrorCode.CANCELLED, "Operation cancelled"));
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:6,代码来源:CheckoutEventHandler.java


示例15: MyLogEntryHandler

import org.tmatesoft.svn.core.SVNCancelException; //导入依赖的package包/类
public MyLogEntryHandler(SvnVcs vcs, final String url,
                             final SVNRevision pegRevision,
                             String lastPath,
                             final ThrowableConsumer<VcsFileRevision, SVNException> result,
                             SVNURL repoRootURL, Charset charset)
      throws SVNException, VcsException {
      myVcs = vcs;
      myLastPathCorrector = new SvnPathThroughHistoryCorrection(lastPath);
      myLastPath = lastPath;
      myCharset = charset;
      myIndicator = ProgressManager.getInstance().getProgressIndicator();
      myResult = result;
      myPegRevision = pegRevision;
      myUrl = url;
      myRepositoryRoot = repoRootURL;
      myTracker = new SvnMergeSourceTracker(new ThrowableConsumer<Pair<LogEntry, Integer>, SVNException>() {
        @Override
        public void consume(final Pair<LogEntry, Integer> svnLogEntryIntegerPair) throws SVNException {
          final LogEntry logEntry = svnLogEntryIntegerPair.getFirst();

          if (myIndicator != null) {
            if (myIndicator.isCanceled()) {
              SVNErrorManager.cancel(SvnBundle.message("exception.text.update.operation.cancelled"), SVNLogType.DEFAULT);
            }
            myIndicator.setText2(SvnBundle.message("progress.text2.revision.processed", logEntry.getRevision()));
          }
          LogEntryPath entryPath = null;
          String copyPath = null;
          final int mergeLevel = svnLogEntryIntegerPair.getSecond();

          if (! myLastPathCorrector.isRoot()) {
            myLastPathCorrector.consume(logEntry);
            entryPath = myLastPathCorrector.getDirectlyMentioned();
            copyPath = null;
            if (entryPath != null) {
              copyPath = entryPath.getCopyPath();
            } else {
              // if there are no path with exact match, check whether parent or child paths had changed
              // "entry path" is allowed to be null now; if it is null, last path would be taken for revision construction

              // Separate LogEntry is issued for each "merge source" revision. These "merge source" revisions are treated as child
              // revisions of some other revision - this way we construct merge hierarchy.
              // mergeLevel >= 0 indicates that we are currently processing some "merge source" revision. This "merge source" revision
              // contains changes from some other branch - so checkForChildChanges() and checkForParentChanges() return "false".
              // Because of this case we apply these methods only for non-"merge source" revisions - this means mergeLevel < 0.
              // TODO: Do not apply path filtering even for log entries on the first level => just output of 'svn log' should be returned.
              // TODO: Looks like there is no cases when we issue 'svn log' for some parent paths or some other cases where we need such
              // TODO: filtering. Check user feedback on this.
//              if (mergeLevel < 0 && !checkForChildChanges(logEntry) && !checkForParentChanges(logEntry)) return;
            }
          }

          final SvnFileRevision revision = createRevision(logEntry, copyPath, entryPath);
          if (mergeLevel >= 0) {
            addToListByLevel((SvnFileRevision)myPrevious, revision, mergeLevel);
          }
          else {
            myResult.consume(revision);
            myPrevious = revision;
          }
          if (myThrowCancelOnMeetPathCreation && myUrl.equals(revision.getURL()) && entryPath != null && entryPath.getType() == 'A') {
            throw new SVNCancelException();
          }
        }

      });
    }
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:68,代码来源:SvnHistoryProvider.java


示例16: testRefusedAdd

import org.tmatesoft.svn.core.SVNCancelException; //导入依赖的package包/类
@Test
public void testRefusedAdd ()throws Exception {
  SVNWCDb db = new SVNWCDb();
  final File ioFile = new File(myWorkingCopyRoot, filename);
  ioFile.getParentFile().mkdirs();
  ioFile.createNewFile();
  try {
    db.open(ISVNWCDb.SVNWCDbOpenMode.ReadWrite, new DefaultSVNOptions(), true, true);
    SVNWCContext context = new SVNWCContext(db, new ISVNEventHandler() {
      @Override
      public void handleEvent(SVNEvent event, double progress) throws SVNException {
      }

      @Override
      public void checkCancelled() throws SVNCancelException {
      }
    });

    File file = context.acquireWriteLock(myWorkingCopyRoot, false, true);
    boolean failed = false;
    try {
      SVNWCClient client = new SVNWCClient((ISVNRepositoryPool)null, new DefaultSVNOptions());
      client.doAdd(ioFile, true, false, false, true);
    }
    catch (SVNException e) {
      Assert.assertEquals(155004, e.getErrorMessage().getErrorCode().getCode());
      failed = true;
    }
    finally {
      context.releaseWriteLock(myWorkingCopyRoot);
    }
    Assert.assertTrue(failed);

    SVNStatusClient readClient = new SVNStatusClient((ISVNRepositoryPool)null, new DefaultSVNOptions());
    //readClient.doStatus(ioFile, false);
    readClient.doStatus(myWorkingCopyRoot, false);
  }
  finally {
    ioFile.delete();
    db.close();
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:43,代码来源:SvnBusyOnAddTest.java


示例17: checkCancelled

import org.tmatesoft.svn.core.SVNCancelException; //导入依赖的package包/类
/**
 * WCClient
 */
@Override
public void checkCancelled() throws SVNCancelException {
}
 
开发者ID:friedlwo,项目名称:AppWoksUtils,代码行数:7,代码来源:Subversion.java


示例18: checkCancelled

import org.tmatesoft.svn.core.SVNCancelException; //导入依赖的package包/类
public void checkCancelled() throws SVNCancelException {
}
 
开发者ID:friedlwo,项目名称:AppWoksUtils,代码行数:3,代码来源:StatusEventHandler.java


示例19: checkCancelled

import org.tmatesoft.svn.core.SVNCancelException; //导入依赖的package包/类
@Override
public void checkCancelled() throws SVNCancelException {
	// TODO Auto-generated method stub

}
 
开发者ID:aserg-ufmg,项目名称:ModularityCheck,代码行数:6,代码来源:SVNEventHandler.java


示例20: checkCancelled

import org.tmatesoft.svn.core.SVNCancelException; //导入依赖的package包/类
public void checkCancelled()
    throws SVNCancelException
{
    // null
}
 
开发者ID:olamy,项目名称:maven-scm-provider-svnjava,代码行数:6,代码来源:ScmFileEventHandler.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
Java Wrapper类代码示例发布时间:2022-05-22
下一篇:
Java FinalizeCommandProto类代码示例发布时间: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