本文整理汇总了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;
}
示例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);
}
示例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);
}
}
示例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;
}
示例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;
}