本文整理汇总了Java中org.tmatesoft.svn.core.wc.SVNInfo.getURL方法的典型用法代码示例。如果您正苦于以下问题:Java SVNInfo.getURL方法的具体用法?Java SVNInfo.getURL怎么用?Java SVNInfo.getURL使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.tmatesoft.svn.core.wc.SVNInfo
的用法示例。
在下文中一共展示了SVNInfo.getURL方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: create
import org.tmatesoft.svn.core.wc.SVNInfo; //导入方法依赖的package包/类
@NotNull
public static Info create(@NotNull SVNInfo info) {
Info result;
if (info.isRemote()) {
result = new Info(info.getPath(), info.getURL(), info.getRevision(), NodeKind.from(info.getKind()), info.getRepositoryUUID(),
info.getRepositoryRootURL(), info.getCommittedRevision().getNumber(), info.getCommittedDate(), info.getAuthor(),
Lock.create(info.getLock()), Depth.from(info.getDepth()));
}
else {
result =
new Info(info.getFile(), info.getURL(), info.getRepositoryRootURL(), info.getRevision().getNumber(), NodeKind.from(info.getKind()),
info.getRepositoryUUID(), info.getCommittedRevision().getNumber(), toString(info.getCommittedDate()), info.getAuthor(),
info.getSchedule(), info.getCopyFromURL(), info.getCopyFromRevision().getNumber(), getName(info.getConflictOldFile()),
getName(info.getConflictNewFile()), getName(info.getConflictWrkFile()), getName(info.getPropConflictFile()),
Lock.create(info.getLock()), Depth.from(info.getDepth()), TreeConflictDescription.create(info.getTreeConflict()));
}
return result;
}
示例2: UpdateRootInfo
import org.tmatesoft.svn.core.wc.SVNInfo; //导入方法依赖的package包/类
public UpdateRootInfo(File file, SvnVcs vcs) {
myRevision = SVNRevision.HEAD;
try {
SVNWCClient wcClient = vcs.createWCClient();
SVNInfo info = wcClient.doInfo(file, SVNRevision.UNDEFINED);
if (info != null) {
final SVNURL url = info.getURL();
myUrl = url.toString();
} else {
myUrl = "";
}
}
catch (SVNException e) {
myUrl = "";
}
}
示例3: checkAlive
import org.tmatesoft.svn.core.wc.SVNInfo; //导入方法依赖的package包/类
private SvnMergeInfoCache.MergeCheckResult checkAlive(final SvnChangeList list, final String branchPath) {
final SVNInfo info = getInfo(new File(branchPath));
if (info == null || info.getURL() == null || (! SVNPathUtil.isAncestor(myBranchUrl, info.getURL().toString()))) {
return SvnMergeInfoCache.MergeCheckResult.NOT_MERGED;
}
final String subPathUnderBranch = SVNPathUtil.getRelativePath(myBranchUrl, info.getURL().toString());
final MultiMap<SvnMergeInfoCache.MergeCheckResult, String> result = new MultiMap<SvnMergeInfoCache.MergeCheckResult, String>();
checkPaths(list.getNumber(), list.getAddedPaths(), branchPath, subPathUnderBranch, result);
if (result.containsKey(SvnMergeInfoCache.MergeCheckResult.NOT_EXISTS)) {
return SvnMergeInfoCache.MergeCheckResult.NOT_EXISTS;
}
checkPaths(list.getNumber(), list.getDeletedPaths(), branchPath, subPathUnderBranch, result);
if (result.containsKey(SvnMergeInfoCache.MergeCheckResult.NOT_EXISTS)) {
return SvnMergeInfoCache.MergeCheckResult.NOT_EXISTS;
}
checkPaths(list.getNumber(), list.getChangedPaths(), branchPath, subPathUnderBranch, result);
if (result.containsKey(SvnMergeInfoCache.MergeCheckResult.NOT_EXISTS)) {
return SvnMergeInfoCache.MergeCheckResult.NOT_EXISTS;
} else if (result.containsKey(SvnMergeInfoCache.MergeCheckResult.NOT_MERGED)) {
myPartlyMerged.put(list.getNumber(), result.get(SvnMergeInfoCache.MergeCheckResult.NOT_MERGED));
return SvnMergeInfoCache.MergeCheckResult.NOT_MERGED;
}
return SvnMergeInfoCache.MergeCheckResult.MERGED;
}
示例4: realTargetUrl
import org.tmatesoft.svn.core.wc.SVNInfo; //导入方法依赖的package包/类
@Nullable
private static SVNURL realTargetUrl(final SvnVcs vcs, final WorkingCopyInfo info, final String targetBranchUrl) {
final SVNWCClient client = vcs.createWCClient();
try {
final SVNInfo svnInfo = client.doInfo(new File(info.getLocalPath()), SVNRevision.UNDEFINED);
final SVNURL svnurl = svnInfo.getURL();
if ((svnurl != null) && (svnurl.toString().startsWith(targetBranchUrl))) {
return svnurl;
}
}
catch (SVNException e) {
// tracked by return value
}
return null;
}
示例5: fillMapping
import org.tmatesoft.svn.core.wc.SVNInfo; //导入方法依赖的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 SVNInfo svnInfo = vcs.getInfo(copyRoot);
if ((svnInfo == null) || (svnInfo.getRepositoryRootURL() == null)) continue;
final RootUrlInfo info = new RootUrlInfo(svnInfo.getRepositoryRootURL(), svnInfo.getURL(),
SvnFormatSelector.getWorkingCopyFormat(svnInfo.getFile()), copyRoot, vcsRoot);
mapping.add(info);
}
}
示例6: getUrlFor
import org.tmatesoft.svn.core.wc.SVNInfo; //导入方法依赖的package包/类
@Nullable
private SVNURL getUrlFor(@NotNull final FilePath root) {
try {
SVNWCClient wcClient = myVCS.createWCClient();
final SVNInfo info = wcClient.doInfo(root.getIOFile(), SVNRevision.UNDEFINED);
if (info != null) {
return info.getURL();
}
return null;
}
catch (SVNException e) {
return null;
}
}
示例7: getSourceUrl
import org.tmatesoft.svn.core.wc.SVNInfo; //导入方法依赖的package包/类
@Nullable
private static SVNURL getSourceUrl(final SvnVcs vcs, final File root) {
try {
SVNWCClient wcClient = vcs.createWCClient();
final SVNInfo svnInfo = wcClient.doInfo(root, SVNRevision.UNDEFINED);
if (svnInfo != null) {
return svnInfo.getURL();
} else {
return null;
}
}
catch (SVNException e) {
return null;
}
}
示例8: goUp
import org.tmatesoft.svn.core.wc.SVNInfo; //导入方法依赖的package包/类
private SvnMergeInfoCache.MergeCheckResult goUp(final long revisionAsked, final long targetRevision, final String branchRootPath,
final String path, final String trunkUrl) {
final String newTrunkUrl = SVNPathUtil.removeTail(trunkUrl).trim();
if (newTrunkUrl.length() == 0 || "/".equals(newTrunkUrl)) {
return SvnMergeInfoCache.MergeCheckResult.NOT_MERGED;
}
final String newPath = new File(path).getParent();
if (newPath.length() < branchRootPath.length()) {
// we are higher than WC root -> go into repo only
if (targetRevision == -1) {
// no paths in local copy
return SvnMergeInfoCache.MergeCheckResult.NOT_EXISTS;
}
final SVNInfo svnInfo = getInfo(new File(branchRootPath));
if (svnInfo == null || svnInfo.getRevision() == null || svnInfo.getURL() == null) {
return SvnMergeInfoCache.MergeCheckResult.NOT_MERGED;
}
try {
return goUpInRepo(revisionAsked, targetRevision, svnInfo.getURL().removePathTail(), newTrunkUrl);
}
catch (SVNException e) {
LOG.info(e);
return SvnMergeInfoCache.MergeCheckResult.NOT_MERGED;
}
}
return checkPathGoingUp(revisionAsked, targetRevision, branchRootPath, newPath, newTrunkUrl, false);
}
示例9: BranchRootSearcher
import org.tmatesoft.svn.core.wc.SVNInfo; //导入方法依赖的package包/类
private BranchRootSearcher(final SvnVcs vcs, final VirtualFile root) throws SVNException {
myRoot = root;
myBranchesUnder = new HashMap<String, String>();
final SVNWCClient client = vcs.createWCClient();
final SVNInfo info = client.doInfo(new File(myRoot.getPath()), SVNRevision.UNDEFINED);
myRootUrl = info.getURL();
}
示例10: init
import org.tmatesoft.svn.core.wc.SVNInfo; //导入方法依赖的package包/类
protected void init() {
super.init();
SvnVcs vcs = SvnVcs.getInstance(myProject);
String revStr = "";
try {
SVNWCClient client = vcs.createWCClient();
SVNInfo info = client.doInfo(mySrcFile, SVNRevision.UNDEFINED);
if (info != null) {
mySrcURL = info.getURL() == null ? null : info.getURL().toString();
revStr = String.valueOf(info.getRevision());
myURL = mySrcURL;
}
}
catch (SVNException e) {
//
}
if (myURL == null) {
return;
}
myWorkingCopyField.setText(mySrcFile.toString());
myRepositoryField.setText(mySrcURL);
myToURLText.setText(myURL);
myRevisionPanel.setRevisionText(revStr);
updateControls();
myWorkingCopyRadioButton.setSelected(true);
}
示例11: createReal
import org.tmatesoft.svn.core.wc.SVNInfo; //导入方法依赖的package包/类
@Nullable
public Real createReal(final VirtualFile file, final VirtualFile vcsRoot) {
final SVNInfo info = myVcs.getInfo(file);
if (info == null || info.getRepositoryRootURL() == null || info.getURL() == null) {
return null;
}
return new Real(file, info, vcsRoot);
}
示例12: getWCServerURL
import org.tmatesoft.svn.core.wc.SVNInfo; //导入方法依赖的package包/类
private static SVNURL getWCServerURL(File wcPath) throws SVNException {
SVNInfo info = ourClientManager.getWCClient().doInfo(wcPath, SVNRevision.WORKING);
return info.getURL();
}
示例13: checkPathGoingUp
import org.tmatesoft.svn.core.wc.SVNInfo; //导入方法依赖的package包/类
private SvnMergeInfoCache.MergeCheckResult checkPathGoingUp(final long revisionAsked, final long targetRevision, final String branchRootPath,
final String path, final String trunkUrl, final boolean self) {
final File pathFile = new File(path);
if (targetRevision == -1) {
// we didn't find existing item on the path jet
// check whether we locally have path
if (! pathFile.exists()) {
// go into parent
return goUp(revisionAsked, targetRevision, branchRootPath, path, trunkUrl);
}
}
final SVNInfo svnInfo = getInfo(pathFile);
if (svnInfo == null || svnInfo.getRevision() == null || svnInfo.getURL() == null) {
LOG.info("Svninfo for " + pathFile + " is null or not full.");
return SvnMergeInfoCache.MergeCheckResult.NOT_MERGED;
}
final long actualRevision = svnInfo.getRevision().getNumber();
final long targetRevisionCorrected = (targetRevision == -1) ? actualRevision : targetRevision;
// here we know local URL and revision
// check existing info
final String keyString = path + "@" + targetRevisionCorrected;
final Set<Long> selfInfo = self ? myNonInheritablePathMergedMap.get(keyString) : null;
final Set<Long> mergeInfo = myPathMergedMap.get(keyString);
if (mergeInfo != null || selfInfo != null) {
final boolean merged = ((mergeInfo != null) && mergeInfo.contains(revisionAsked)) ||
((selfInfo != null) && selfInfo.contains(revisionAsked));
// take from self or first parent with info; do not go further
return SvnMergeInfoCache.MergeCheckResult.getInstance(merged);
}
final SVNPropertyData mergeinfoProperty;
try {
if (actualRevision == targetRevisionCorrected) {
// look in WC
mergeinfoProperty = myClient.doGetProperty(pathFile, SVNProperty.MERGE_INFO, SVNRevision.WORKING, SVNRevision.WORKING);
} else {
// in repo
myMixedRevisionsFound = true;
mergeinfoProperty = myClient.doGetProperty(svnInfo.getURL(), SVNProperty.MERGE_INFO, SVNRevision.UNDEFINED, SVNRevision.create(targetRevisionCorrected));
}
}
catch (SVNException e) {
LOG.info(e);
return SvnMergeInfoCache.MergeCheckResult.NOT_MERGED;
}
if (mergeinfoProperty == null) {
// go up
return goUp(revisionAsked, targetRevisionCorrected, branchRootPath, path, trunkUrl);
}
// process
return processMergeinfoProperty(keyString, revisionAsked, mergeinfoProperty.getValue(), trunkUrl, self);
}
示例14: loadDefaultConfiguration
import org.tmatesoft.svn.core.wc.SVNInfo; //导入方法依赖的package包/类
@Nullable
public static SvnBranchConfigurationNew loadDefaultConfiguration(final Project project, final VirtualFile vcsRoot) {
try {
final SvnVcs vcs = SvnVcs.getInstance(project);
File rootFile = new File(vcsRoot.getPath());
final SVNInfo info = vcs.createWCClient().doInfo(rootFile, SVNRevision.UNDEFINED);
if (info == null || info.getURL() == null) {
LOG.info("Directory is not a working copy: " + vcsRoot.getPresentableUrl());
return null;
}
SVNURL baseUrl = info.getURL();
final SvnBranchConfigurationNew result = new SvnBranchConfigurationNew();
result.setTrunkUrl(baseUrl.toString());
while(true) {
final String s = SVNPathUtil.tail(baseUrl.getPath());
if (s.equalsIgnoreCase(DEFAULT_TRUNK_NAME) || s.equalsIgnoreCase(DEFAULT_BRANCHES_NAME) || s.equalsIgnoreCase(DEFAULT_TAGS_NAME)) {
final SVNURL rootPath = baseUrl.removePathTail();
SVNLogClient client = vcs.createLogClient();
client.doList(rootPath, SVNRevision.UNDEFINED, SVNRevision.HEAD, false, false, new ISVNDirEntryHandler() {
public void handleDirEntry(final SVNDirEntry dirEntry) throws SVNException {
if (("".equals(dirEntry.getRelativePath())) || (! SVNNodeKind.DIR.equals(dirEntry.getKind()))) {
// do not use itself or files
return;
}
if (dirEntry.getName().toLowerCase().endsWith(DEFAULT_TRUNK_NAME)) {
result.setTrunkUrl(rootPath.appendPath(dirEntry.getName(), false).toString());
}
else {
result.addBranches(rootPath.appendPath(dirEntry.getName(), false).toString(),
new InfoStorage<List<SvnBranchItem>>(new ArrayList<SvnBranchItem>(0), InfoReliability.defaultValues));
}
}
});
break;
}
if (SVNPathUtil.removeTail(baseUrl.getPath()).length() == 0) {
break;
}
baseUrl = baseUrl.removePathTail();
}
return result;
}
catch (SVNException e) {
LOG.info(e);
return null;
}
}
示例15: getSvnUrlByFileSystem
import org.tmatesoft.svn.core.wc.SVNInfo; //导入方法依赖的package包/类
/**
* SVN 서버에 연결된 루트 디렉토리에 속하는 로컬 파일시스템의 파일에 해당하는 SVN서버 경로를 리턴한다.
*
* @작성자 : KYJ
* @작성일 : 2016. 8. 1.
* @return
* @throws Exception
*/
public SVNURL getSvnUrlByFileSystem(File file, SVNRevision revision) throws Exception {
SVNClientManager svnManager2 = getSvnManager();
SVNInfo doInfo = svnManager2.getWCClient().doInfo(file, revision);
return doInfo.getURL();
}