当前位置: 首页>>代码示例>>Java>>正文


Java SVNWCClient.doInfo方法代码示例

本文整理汇总了Java中org.tmatesoft.svn.core.wc.SVNWCClient.doInfo方法的典型用法代码示例。如果您正苦于以下问题:Java SVNWCClient.doInfo方法的具体用法?Java SVNWCClient.doInfo怎么用?Java SVNWCClient.doInfo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.tmatesoft.svn.core.wc.SVNWCClient的用法示例。


在下文中一共展示了SVNWCClient.doInfo方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: checkAncestry

import org.tmatesoft.svn.core.wc.SVNWCClient; //导入方法依赖的package包/类
private boolean checkAncestry(final File sourceFile, final SVNURL targetUrl, final SVNRevision targetRevision) throws SVNException {
  final SVNWCClient client = myVcs.createWCClient();
  final SVNInfo sourceSvnInfo = client.doInfo(sourceFile, SVNRevision.UNDEFINED);
  final SVNInfo targetSvnInfo = client.doInfo(targetUrl, SVNRevision.UNDEFINED, targetRevision);

  if (sourceSvnInfo == null || targetSvnInfo == null) {
    // cannot check
    return true;
  }

  final SVNURL copyFromTarget = targetSvnInfo.getCopyFromURL();
  final SVNURL copyFromSource = sourceSvnInfo.getCopyFromURL();

  if ((copyFromSource != null) || (copyFromTarget != null)) {
    if (sourceSvnInfo.getURL().equals(copyFromTarget) || targetUrl.equals(copyFromSource)) {
      return true;
    }
  }

  final int result = Messages.showYesNoDialog(myVcs.getProject(), SvnBundle.message("switch.target.not.copy.current"),
                                              SvnBundle.message("switch.target.problem.title"), Messages.getWarningIcon());
  return (DialogWrapper.OK_EXIT_CODE == result);
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:24,代码来源:SvnUpdateEnvironment.java

示例2: UpdateRootInfo

import org.tmatesoft.svn.core.wc.SVNWCClient; //导入方法依赖的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 = "";
  }

}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:18,代码来源:UpdateRootInfo.java

示例3: realTargetUrl

import org.tmatesoft.svn.core.wc.SVNWCClient; //导入方法依赖的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;
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:17,代码来源:IntegratedSelectedOptionsDialog.java

示例4: detectStartRevision

import org.tmatesoft.svn.core.wc.SVNWCClient; //导入方法依赖的package包/类
private boolean detectStartRevision() {
  if (! myStartExistsKnown) {
    final SvnFileUrlMapping mapping = myVcs.getSvnFileUrlMapping();
    final RootUrlInfo rootUrlInfo = mapping.getWcRootForUrl(myUrl.toString());
    if (rootUrlInfo == null) return true;
    final VirtualFile vf = rootUrlInfo.getVirtualFile();
    if (vf == null) {
      return true;
    }
    final SVNWCClient client = myVcs.createWCClient();
    try {
      final SVNInfo info = client.doInfo(new File(vf.getPath()), SVNRevision.UNDEFINED);
      if ((info == null) || (info.getRevision() == null)) {
        return false;
      }
      myStartNumber = info.getRevision().getNumber();
      myStartExistsKnown = true;
    }
    catch (SVNException e) {
      return false;
    }
  }
  return true;
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:25,代码来源:LatestExistentSearcher.java

示例5: getInfo

import org.tmatesoft.svn.core.wc.SVNWCClient; //导入方法依赖的package包/类
private SVNInfo getInfo () throws SVNException {
	if (rootInfo == null) {
		final SVNWCClient client = new SVNWCClient (null, null);

		rootInfo = client.doInfo(getProject().getBaseDir(),
		                         SVNRevision.WORKING);
	}

	return rootInfo;
}
 
开发者ID:fstltna,项目名称:ThudNG2,代码行数:11,代码来源:MySVNInfo.java

示例6: getSVNReposForRevision

import org.tmatesoft.svn.core.wc.SVNWCClient; //导入方法依赖的package包/类
private SVNRepository getSVNReposForRevision(final SVNRepository repository, final long revision) throws SVNException {
  SVNClientManager manager = SVNClientManager.newInstance(SVNWCUtil.createDefaultOptions(true), repository.getAuthenticationManager());
  try {
    SVNWCClient client = manager.getWCClient();
    SVNInfo info1 = client.doInfo(repository.getLocation(), SVNRevision.HEAD, SVNRevision.create(revision));

    SVNRepository reposForRev = SVNRepositoryFactory.create(info1.getURL());
    reposForRev.setAuthenticationManager(repository.getAuthenticationManager());

    return reposForRev;
  }
  finally {
    manager.dispose();
  }
}
 
开发者ID:CoreFiling,项目名称:reviki,代码行数:16,代码来源:RepositoryBasicSVNOperations.java

示例7: getUrlFor

import org.tmatesoft.svn.core.wc.SVNWCClient; //导入方法依赖的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;
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:15,代码来源:AbstractSvnUpdatePanel.java

示例8: getSourceUrl

import org.tmatesoft.svn.core.wc.SVNWCClient; //导入方法依赖的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;
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:16,代码来源:SvnUpdateEnvironment.java

示例9: BranchRootSearcher

import org.tmatesoft.svn.core.wc.SVNWCClient; //导入方法依赖的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();
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:8,代码来源:SvnBranchConfigurationNew.java

示例10: init

import org.tmatesoft.svn.core.wc.SVNWCClient; //导入方法依赖的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);
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:28,代码来源:CreateBranchOrTagDialog.java

示例11: getCurrentCommittedRevision

import org.tmatesoft.svn.core.wc.SVNWCClient; //导入方法依赖的package包/类
public static VcsRevisionNumber getCurrentCommittedRevision(final SvnVcs vcs, final File file) {
  try {
    SVNWCClient wcClient = vcs.createWCClient();
    SVNInfo info = wcClient.doInfo(file, SVNRevision.UNDEFINED);
    if (info != null) {
      return new SvnRevisionNumber(info.getCommittedRevision());
    }
    else {
      return null;
    }
  }
  catch (SVNException e) {
    return null;
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:16,代码来源:SvnHistorySession.java


注:本文中的org.tmatesoft.svn.core.wc.SVNWCClient.doInfo方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。