当前位置: 首页>>代码示例>>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;未经允许,请勿转载。