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


Java SVNURL.toString方法代碼示例

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


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

示例1: getCredentials

import org.tmatesoft.svn.core.SVNURL; //導入方法依賴的package包/類
@Override
public boolean getCredentials(final String errText) throws SvnBindException {
  String realm = getRealm(errText);

  if (!errText.startsWith(CERTIFICATE_ERROR)) {
    // if we do not have explicit realm in error message - use server url and not full repository url
    // as SVNKit lifecycle resolves ssl realm (for saving certificate to runtime storage) as server url
    SVNURL serverUrl = getServerUrl(realm);
    realm = serverUrl != null ? serverUrl.toString() : realm;
  }

  if (myAuthenticationService.acceptSSLServerCertificate(myUrl, realm)) {
    accepted = true;
    return true;
  }
  throw new SvnBindException("Server SSL certificate rejected");
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:18,代碼來源:CertificateCallbackCase.java

示例2: getSelectedVcsFile

import org.tmatesoft.svn.core.SVNURL; //導入方法依賴的package包/類
@Nullable
public VirtualFile getSelectedVcsFile() {
  final RepositoryTreeNode node = getSelectedNode();
  if (node == null) return null;

  DirectoryEntry entry = node.getSVNDirEntry();
  if (entry == null || !entry.isFile()) {
    return null;
  }

  String name = entry.getName();
  FileTypeManager manager = FileTypeManager.getInstance();

  if (entry.getName().lastIndexOf('.') > 0 && !manager.getFileTypeByFileName(name).isBinary()) {
    SVNURL url = node.getURL();
    final SvnFileRevision revision = new SvnFileRevision(myVCS, SVNRevision.UNDEFINED, SVNRevision.HEAD, url.toString(),
            entry.getAuthor(), entry.getDate(), null, null);

    return new VcsVirtualFile(node.getSVNDirEntry().getName(), revision, VcsFileSystem.getInstance());
  } else {
    return null;
  }
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:24,代碼來源:RepositoryBrowserComponent.java

示例3: resolveElementUrl

import org.tmatesoft.svn.core.SVNURL; //導入方法依賴的package包/類
@Nullable
protected SVNURL resolveElementUrl() throws SVNException {
  final SvnFileUrlMapping urlMapping = myVcs.getSvnFileUrlMapping();
  final File file = new File(myVirtualFile.getPath());
  final SVNURL fileUrl = urlMapping.getUrlForFile(file);
  if (fileUrl == null) {
    return null;
  }

  final String fileUrlString = fileUrl.toString();
  final RootUrlInfo rootMixed = urlMapping.getWcRootForUrl(fileUrlString);
  if (rootMixed == null) {
    return null;
  }

  final SVNURL thisBranchForUrl = SvnUtil.getBranchForUrl(myVcs, rootMixed.getVirtualFile(), fileUrlString);
  if (thisBranchForUrl == null) {
    return null;
  }

  final String relativePath = SVNPathUtil.getRelativePath(thisBranchForUrl.toString(), fileUrlString);
  return SVNURL.parseURIEncoded(SVNPathUtil.append(myBranchUrl, relativePath));
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:24,代碼來源:ElementWithBranchComparer.java

示例4: loadBackwards

import org.tmatesoft.svn.core.SVNURL; //導入方法依賴的package包/類
private void loadBackwards(SVNURL svnurl) throws SVNException, VcsException {
  // this method is called when svnurl does not exist in latest repository revision - thus concrete old revision is used for "info"
  // command to get repository url
  Info info = myVcs.getInfo(svnurl, myPeg, myPeg);
  final SVNURL rootURL = info != null ? info.getRepositoryRootURL() : null;
  final String root = rootURL != null ? rootURL.toString() : "";
  String relativeUrl = myUrl;
  if (myUrl.startsWith(root)) {
    relativeUrl = myUrl.substring(root.length());
  }

  final RepositoryLogEntryHandler repositoryLogEntryHandler =
      new RepositoryLogEntryHandler(myVcs, myUrl, SVNRevision.UNDEFINED, relativeUrl,
                                    new ThrowableConsumer<VcsFileRevision, SVNException>() {
                                      @Override
                                      public void consume(VcsFileRevision revision) throws SVNException {
                                        myConsumer.consume(revision);
                                      }
                                    }, rootURL);
  repositoryLogEntryHandler.setThrowCancelOnMeetPathCreation(true);

  SvnTarget target = SvnTarget.fromURL(rootURL, myFrom);
  myVcs.getFactory(target).createHistoryClient()
    .doLog(target, myFrom, myTo == null ? SVNRevision.create(1) : myTo, false, true, myShowMergeSources && mySupport15, 1, null,
           repositoryLogEntryHandler);
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:27,代碼來源:SvnHistoryProvider.java

示例5: getCopyFromURL

import org.tmatesoft.svn.core.SVNURL; //導入方法依賴的package包/類
/**
 * Gets the URL (repository location) of the ancestor from which the item
 * was copied. That is when the item is added with history.
 *
 * @return the item ancestor's URL
 */
@Override
public String getCopyFromURL() {
  if (! isCopied()) return null;
  final Info info = initInfo();
  if (info == null) return null;
  SVNURL url = initInfo().getCopyFromURL();
  return url == null ? null : url.toString();
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:15,代碼來源:PortableStatus.java

示例6: SvnRepositoryLocationGroup

import org.tmatesoft.svn.core.SVNURL; //導入方法依賴的package包/類
public SvnRepositoryLocationGroup(@NotNull final SVNURL url, final Collection<RepositoryLocation> locations) {
  super(url.toString());
  myUrl = url;
  for (RepositoryLocation location : locations) {
    add(location);
  }
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:8,代碼來源:SvnRepositoryLocationGroup.java

示例7: createRevision

import org.tmatesoft.svn.core.SVNURL; //導入方法依賴的package包/類
protected SvnFileRevision createRevision(final LogEntry logEntry, final String copyPath, LogEntryPath entryPath) throws SVNException {
      Date date = logEntry.getDate();
      String author = logEntry.getAuthor();
      String message = logEntry.getMessage();
      SVNRevision rev = SVNRevision.create(logEntry.getRevision());
      final SVNURL url = myRepositoryRoot.appendPath(myLastPath, true);
//      final SVNURL url = entryPath != null ? myRepositoryRoot.appendPath(entryPath.getPath(), true) :
//                         myRepositoryRoot.appendPath(myLastPathCorrector.getBefore(), false);
      return new SvnFileRevision(myVcs, myPegRevision, rev, url.toString(), author, date, message, copyPath);
    }
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:11,代碼來源:SvnHistoryProvider.java

示例8: getSelectedURL

import org.tmatesoft.svn.core.SVNURL; //導入方法依賴的package包/類
@Nullable
public String getSelectedURL() {
  SVNURL selectedUrl = getSelectedSVNURL();
  return selectedUrl == null ? null : selectedUrl.toString();
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:6,代碼來源:RepositoryBrowserComponent.java


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