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


Java Info.getRepositoryRootURL方法代碼示例

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


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

示例1: get

import org.jetbrains.idea.svn.info.Info; //導入方法依賴的package包/類
@Nullable
@Override
public Repository get() {
  Repository result;

  if (myTarget.isURL()) {
    // TODO: Also could still execute info when target is url - either to use info for authentication or to just get correct repository
    // TODO: url in case of "read" operations are allowed anonymously.
    result = new Repository(myTarget.getURL());
  }
  else {
    Info info = myVcs.getInfo(myTarget.getFile());
    result = info != null ? new Repository(info.getRepositoryRootURL()) : null;
  }

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

示例2: loadBackwards

import org.jetbrains.idea.svn.info.Info; //導入方法依賴的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

示例3: fillMapping

import org.jetbrains.idea.svn.info.Info; //導入方法依賴的package包/類
private void fillMapping(final SvnMapping mapping, final List<SvnCopyRootSimple> list) {
  final LocalFileSystem lfs = LocalFileSystem.getInstance();

  for (SvnCopyRootSimple simple : list) {
    final VirtualFile copyRoot = lfs.findFileByIoFile(new File(simple.myCopyRoot));
    final VirtualFile vcsRoot = lfs.findFileByIoFile(new File(simple.myVcsRoot));

    if (copyRoot == null || vcsRoot == null) continue;

    final SvnVcs vcs = SvnVcs.getInstance(myProject);
    final Info svnInfo = vcs.getInfo(copyRoot);
    if ((svnInfo == null) || (svnInfo.getRepositoryRootURL() == null)) continue;

    Node node = new Node(copyRoot, svnInfo.getURL(), svnInfo.getRepositoryRootURL());
    final RootUrlInfo info = new RootUrlInfo(node, SvnFormatSelector.findRootAndGetFormat(svnInfo.getFile()), vcsRoot);

    mapping.add(info);
  }
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:20,代碼來源:SvnFileUrlMappingImpl.java

示例4: getRepositoryRootURL

import org.jetbrains.idea.svn.info.Info; //導入方法依賴的package包/類
@Override
public SVNURL getRepositoryRootURL() {
  SVNURL url = super.getRepositoryRootURL();

  if (url == null) {
    Info info = initInfo();
    url = info != null ? info.getRepositoryRootURL() : url;
  }

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

示例5: getRepositoryRoot

import org.jetbrains.idea.svn.info.Info; //導入方法依賴的package包/類
@Nullable
public static SVNURL getRepositoryRoot(final SvnVcs vcs, final File file) {
  final Info info = vcs.getInfo(file);
  return info != null ? info.getRepositoryRootURL() : null;
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:6,代碼來源:SvnUtil.java


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