當前位置: 首頁>>代碼示例>>Java>>正文


Java SVNURL.removePathTail方法代碼示例

本文整理匯總了Java中org.tmatesoft.svn.core.SVNURL.removePathTail方法的典型用法代碼示例。如果您正苦於以下問題:Java SVNURL.removePathTail方法的具體用法?Java SVNURL.removePathTail怎麽用?Java SVNURL.removePathTail使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.tmatesoft.svn.core.SVNURL的用法示例。


在下文中一共展示了SVNURL.removePathTail方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: goUpInRepo

import org.tmatesoft.svn.core.SVNURL; //導入方法依賴的package包/類
@NotNull
private SvnMergeInfoCache.MergeCheckResult goUpInRepo(final long revisionAsked,
                                                      final long targetRevision,
                                                      final SVNURL branchUrl,
                                                      final String trunkUrl) throws VcsException, SVNException {
  SvnMergeInfoCache.MergeCheckResult result;
  Set<Long> mergeInfo = myPathMergedMap.get(branchUrl.toString() + "@" + targetRevision);

  if (mergeInfo != null) {
    // take from self or first parent with info; do not go further
    result = SvnMergeInfoCache.MergeCheckResult.getInstance(mergeInfo.contains(revisionAsked));
  }
  else {
    SvnTarget target = SvnTarget.fromURL(branchUrl);
    PropertyValue mergeinfoProperty = myVcs.getFactory(target).createPropertyClient()
      .getProperty(target, SvnPropertyKeys.MERGE_INFO, false, SVNRevision.create(targetRevision));

    if (mergeinfoProperty == null) {
      final String newTrunkUrl = SVNPathUtil.removeTail(trunkUrl).trim();
      final SVNURL newBranchUrl = branchUrl.removePathTail();
      final String absoluteTrunk = SVNPathUtil.append(myInfo.getRepoUrl(), newTrunkUrl);

      result = newTrunkUrl.length() <= 1 ||
               newBranchUrl.toString().length() <= myInfo.getRepoUrl().length() ||
               newBranchUrl.toString().equals(absoluteTrunk)
               ? SvnMergeInfoCache.MergeCheckResult.NOT_MERGED
               : goUpInRepo(revisionAsked, targetRevision, newBranchUrl, newTrunkUrl);
    }
    else {
      result = processMergeinfoProperty(branchUrl.toString() + "@" + targetRevision, revisionAsked, mergeinfoProperty, trunkUrl, false);
    }
  }

  return result;
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:36,代碼來源:BranchInfo.java

示例2: getServerUrl

import org.tmatesoft.svn.core.SVNURL; //導入方法依賴的package包/類
private SVNURL getServerUrl(String realm) {
  SVNURL result = parseUrl(realm);

  while (result != null && !StringUtil.isEmpty(result.getPath())) {
    try {
      result = result.removePathTail();
    }
    catch (SVNException e) {
      result = null;
    }
  }

  return result;
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:15,代碼來源:CertificateCallbackCase.java

示例3: getBranchLocationsParent

import org.tmatesoft.svn.core.SVNURL; //導入方法依賴的package包/類
@Nullable
private static SVNURL getBranchLocationsParent(@NotNull SVNURL url) throws SVNException {
  while (!hasEmptyName(url) && !hasDefaultName(url)) {
    url = url.removePathTail();
  }

  return hasDefaultName(url) ? url.removePathTail() : null;
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:9,代碼來源:DefaultBranchConfigInitializer.java


注:本文中的org.tmatesoft.svn.core.SVNURL.removePathTail方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。