• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java SVNInfo类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



SVNInfo类属于org.tmatesoft.svn.core.wc包,在下文中一共展示了SVNInfo类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:21,代码来源:Info.java


示例2: getInfo

import org.tmatesoft.svn.core.wc.SVNInfo; //导入依赖的package包/类
/**
 * Returns an ArrayLIst with Info for all files found in file.
 * 
 * @param file
 * @return
 */
public java.util.List<SVNInfo> getInfo(final File file) {
    final java.util.List<SVNInfo> ret = new ArrayList<SVNInfo>();
    try {
        getWCClient().doInfo(file, SVNRevision.UNDEFINED, SVNRevision.WORKING, SVNDepth.getInfinityOrEmptyDepth(true), null, new ISVNInfoHandler() {

            @Override
            public void handleInfo(final SVNInfo info) {
                ret.add(info);
            }

        });
    } catch (final SVNException e) {
        e.printStackTrace();
    }
    return ret;

}
 
开发者ID:friedlwo,项目名称:AppWoksUtils,代码行数:24,代码来源:Subversion.java


示例3: getRevision

import org.tmatesoft.svn.core.wc.SVNInfo; //导入依赖的package包/类
public long getRevision(final File resource) throws SVNException {
    final long[] ret = new long[] { -1 };

    getWCClient().doInfo(resource, SVNRevision.UNDEFINED, SVNRevision.WORKING, SVNDepth.EMPTY, null, new ISVNInfoHandler() {

        @Override
        public void handleInfo(final SVNInfo info) {
            final long rev = info.getCommittedRevision().getNumber();
            if (rev > ret[0]) {
                ret[0] = rev;
            }

        }

    });
    return ret[0];
}
 
开发者ID:friedlwo,项目名称:AppWoksUtils,代码行数:18,代码来源:Subversion.java


示例4: checkAncestry

import org.tmatesoft.svn.core.wc.SVNInfo; //导入依赖的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


示例5: 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 = "";
  }

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


示例6: 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;
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:27,代码来源:BranchInfo.java


示例7: convert

import org.tmatesoft.svn.core.wc.SVNInfo; //导入依赖的package包/类
public static SVNStatus convert(final String path, Status status, final Convertor<String, SVNInfo> infoGetter) throws SVNException {
    // no locks
  return new PortableStatus(createUrl(status.getUrl()), new File(path), NodeKindConvertor.convert(status.getNodeKind()),
                            RevisionConvertor.convert(status.getRevision()), RevisionConvertor.convert(status.getLastChangedRevision()),
                            status.getLastChangedDate(), status.getLastCommitAuthor(), convert(status.getTextStatus()),
                            convert(status.getPropStatus()), convert(status.getRepositoryTextStatus()),
                            convert(status.getRepositoryPropStatus()), status.isLocked(), status.isCopied(), status.isSwitched(),
                            status.isFileExternal(), null, null, null, status.getChangelist(), WorkingCopyFormat.ONE_DOT_SEVEN.getFormat(),
                            status.isConflicted(),
                            new Getter<SVNInfo>() {
                              @Override
                              public SVNInfo get() {
                                return infoGetter.convert(path);
                              }
                            });
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:17,代码来源:StatusCallbackConvertor.java


示例8: 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;
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:17,代码来源:IntegratedSelectedOptionsDialog.java


示例9: detectStartRevision

import org.tmatesoft.svn.core.wc.SVNInfo; //导入依赖的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


示例10: 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);
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:19,代码来源:SvnFileUrlMappingImpl.java


示例11: getInfo

import org.tmatesoft.svn.core.wc.SVNInfo; //导入依赖的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


示例12: remoteUrlExist

import org.tmatesoft.svn.core.wc.SVNInfo; //导入依赖的package包/类
public boolean remoteUrlExist( ScmProviderRepository repository, CommandParameters parameters )
    throws ScmException
{
    SvnJavaScmProviderRepository javaRepo = (SvnJavaScmProviderRepository) repository;

    String url = ( (SvnScmProviderRepository) repository ).getUrl();

    try
    {

        javaRepo.getClientManager().getWCClient().doInfo( SVNURL.parseURIEncoded( url ), SVNRevision.HEAD,
                                                          SVNRevision.HEAD, SVNDepth.EMPTY, new ISVNInfoHandler()
        {
            public void handleInfo( SVNInfo svnInfo )
                throws SVNException
            {
                svnInfo.getAuthor();
            }
        } );
    }
    catch ( SVNException e )
    {
        if ( e.getMessage().indexOf( "E170000" ) > -1 )
        {
            return false;
        }
        throw new ScmException( e.getMessage(), e );
    }
    return true;
}
 
开发者ID:olamy,项目名称:maven-scm-provider-svnjava,代码行数:31,代码来源:SvnJavaRemoteInfoCommand.java


示例13: getSVNReposForRevision

import org.tmatesoft.svn.core.wc.SVNInfo; //导入依赖的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


示例14: 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;
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:15,代码来源:AbstractSvnUpdatePanel.java


示例15: 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;
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:16,代码来源:SvnUpdateEnvironment.java


示例16: 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);
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:29,代码来源:BranchInfo.java


示例17: getInfo

import org.tmatesoft.svn.core.wc.SVNInfo; //导入依赖的package包/类
private SVNInfo getInfo(final File pathFile) {
  try {
    return myClient.doInfo(pathFile, SVNRevision.UNDEFINED);
  } catch (SVNException e) {
    //
  }
  return null;
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:9,代码来源:BranchInfo.java


示例18: newPending

import org.tmatesoft.svn.core.wc.SVNInfo; //导入依赖的package包/类
private void newPending(final Convertor<File, SVNInfo> infoGetter) {
  final PortableStatus status = new PortableStatus();
  myPending = status;
  status.setInfoGetter(new Getter<SVNInfo>() {
    @Override
    public SVNInfo get() {
      return infoGetter.convert(status.getFile());
    }
  });
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:11,代码来源:SvnStatusHandler.java


示例19: SvnInfoHandler

import org.tmatesoft.svn.core.wc.SVNInfo; //导入依赖的package包/类
public SvnInfoHandler(File base, final Consumer<SVNInfo> infoConsumer) {
  myBase = base;
  myInfoConsumer = infoConsumer;
  myPending = new SvnInfoStructure();
  myElementsMap = new HashMap<String, Getter<ElementHandlerBase>>();
  fillElements();
  myParseStack = new ArrayList<ElementHandlerBase>();
  myParseStack.add(new Fake());
  myResultsMap = new HashMap<File, SVNInfo>();
  mySb = new StringBuilder();
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:12,代码来源:SvnInfoHandler.java


示例20: switchPending

import org.tmatesoft.svn.core.wc.SVNInfo; //导入依赖的package包/类
private void switchPending() throws SAXException {
  final SVNInfo info;
  try {
    info = myPending.convert();
  }
  catch (SVNException e) {
    throw new SAXException(e);
  }
  if (myInfoConsumer != null) {
    myInfoConsumer.consume(info);
  }
  myResultsMap.put(info.getFile(), info);
  myPending = new SvnInfoStructure();
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:15,代码来源:SvnInfoHandler.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java Mongeez类代码示例发布时间:2022-05-22
下一篇:
Java Logging类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap