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


Java SVNRevision.WORKING属性代码示例

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


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

示例1: createPropertyRevision

@Nullable
private ContentRevision createPropertyRevision(@NotNull Change change, @NotNull File file, boolean isBeforeRevision)
  throws SVNException {
  FilePath path = ChangesUtil.getFilePath(change);
  ContentRevision contentRevision = isBeforeRevision ? change.getBeforeRevision() : change.getAfterRevision();
  SVNRevision revision = isBeforeRevision ? SVNRevision.BASE : SVNRevision.WORKING;

  return new SimplePropertyRevision(getProperties(file, revision), path, getRevisionNumber(contentRevision));
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:SvnChangeProviderContext.java

示例2: getAfterRevisionValue

protected SVNRevision getAfterRevisionValue(final Change change, final SvnVcs vcs) throws SVNException {
  final ContentRevision afterRevision = change.getAfterRevision();
  if (afterRevision != null) {
    // CurrentContentRevision will be here, for instance, if invoked from changes dialog for "Compare with Branch" action
    return afterRevision instanceof CurrentContentRevision
           ? SVNRevision.WORKING
           : ((SvnRevisionNumber)afterRevision.getRevisionNumber()).getRevision();
  } else {
    return SVNRevision.create(((SvnRevisionNumber) change.getBeforeRevision().getRevisionNumber()).getRevision().getNumber() + 1);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:ShowPropertiesDiffAction.java

示例3: getRevision

public SVNRevision getRevision() {
  if (myWorkingCopyRadioButton.isSelected()) {
    return SVNRevision.WORKING;
  }
  else {
    try {
      return myRevisionPanel.getRevision();
    }
    catch (ConfigurationException e) {
      return SVNRevision.UNDEFINED;
    }
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:13,代码来源:CreateBranchOrTagDialog.java

示例4: copy

@Override
public void copy(@NotNull File src, @NotNull File dst, boolean makeParents, boolean isMove) throws VcsException {
  final SVNCopySource copySource = new SVNCopySource(isMove ? SVNRevision.UNDEFINED : SVNRevision.WORKING, SVNRevision.WORKING, src);

  try {
    myVcs.getSvnKitManager().createCopyClient().doCopy(new SVNCopySource[]{copySource}, dst, isMove, makeParents, true);
  }
  catch (SVNException e) {
    throw new VcsException(e);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:SvnKitCopyMoveClient.java

示例5: getAfterRevisionValue

@Nullable
protected SVNRevision getAfterRevisionValue(final Change change, final SvnVcs vcs) throws SVNException {
  return SVNRevision.WORKING;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:ShowPropertiesDiffWithLocalAction.java

示例6: checkPathGoingUp

@NotNull
private SvnMergeInfoCache.MergeCheckResult checkPathGoingUp(final long revisionAsked,
                                                            final long targetRevision,
                                                            @NotNull String branchRootPath,
                                                            @NotNull String path,
                                                            final String trunkUrl,
                                                            final boolean self) throws VcsException, SVNException {
  SvnMergeInfoCache.MergeCheckResult result;
  final File pathFile = new File(path);

  // we didn't find existing item on the path jet
  // check whether we locally have path
  if (targetRevision == -1 && !pathFile.exists()) {
    result = goUp(revisionAsked, targetRevision, branchRootPath, path, trunkUrl);
  }
  else {
    final Info svnInfo = myVcs.getInfo(pathFile);
    if (svnInfo == null || svnInfo.getURL() == null) {
      LOG.info("Svninfo for " + pathFile + " is null or not full.");
      result = SvnMergeInfoCache.MergeCheckResult.NOT_MERGED;
    }
    else {
      final long actualRevision = svnInfo.getRevision().getNumber();
      final long targetRevisionCorrected = (targetRevision == -1) ? actualRevision : targetRevision;

      // here we know local URL and revision

      // check existing info
      final String keyString = path + "@" + targetRevisionCorrected;
      final Set<Long> selfInfo = self ? myNonInheritablePathMergedMap.get(keyString) : null;
      final Set<Long> mergeInfo = myPathMergedMap.get(keyString);
      if (mergeInfo != null || selfInfo != null) {
        boolean merged = mergeInfo != null && mergeInfo.contains(revisionAsked) || selfInfo != null && selfInfo.contains(revisionAsked);
        // take from self or first parent with info; do not go further
        result = SvnMergeInfoCache.MergeCheckResult.getInstance(merged);
      }
      else {
        if (actualRevision != targetRevisionCorrected) {
          myMixedRevisionsFound = true;
        }

        SvnTarget target;
        SVNRevision revision;
        if (actualRevision == targetRevisionCorrected) {
          // look in WC
          target = SvnTarget.fromFile(pathFile, SVNRevision.WORKING);
          revision = SVNRevision.WORKING;
        }
        else {
          // in repo
          target = SvnTarget.fromURL(svnInfo.getURL());
          revision = SVNRevision.create(targetRevisionCorrected);
        }

        PropertyValue mergeinfoProperty =
          myVcs.getFactory(target).createPropertyClient().getProperty(target, SvnPropertyKeys.MERGE_INFO, false, revision);

        result = mergeinfoProperty == null
                 ? goUp(revisionAsked, targetRevisionCorrected, branchRootPath, path, trunkUrl)
                 : processMergeinfoProperty(keyString, revisionAsked, mergeinfoProperty, trunkUrl, self);
      }
    }
  }

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


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