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


Java SVNRevision.HEAD属性代码示例

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


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

示例1: getSelectedVcsFile

@Nullable
public VirtualFile getSelectedVcsFile() {
  final RepositoryTreeNode node = getSelectedNode();
  if (node == null) return null;

  DirectoryEntry entry = node.getSVNDirEntry();
  if (entry == null || !entry.isFile()) {
    return null;
  }

  String name = entry.getName();
  FileTypeManager manager = FileTypeManager.getInstance();

  if (entry.getName().lastIndexOf('.') > 0 && !manager.getFileTypeByFileName(name).isBinary()) {
    SVNURL url = node.getURL();
    final SvnFileRevision revision = new SvnFileRevision(myVCS, SVNRevision.UNDEFINED, SVNRevision.HEAD, url.toString(),
            entry.getAuthor(), entry.getDate(), null, null);

    return new VcsVirtualFile(node.getSVNDirEntry().getName(), revision, VcsFileSystem.getInstance());
  } else {
    return null;
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:23,代码来源:RepositoryBrowserComponent.java

示例2: getRevision

@NotNull
public SVNRevision getRevision() throws ConfigurationException {

  if (myHead.isSelected()) return SVNRevision.HEAD;

  final SVNRevision result = SVNRevision.parse(myRevisionField.getText());
  if (!result.isValid()) {
    throw new ConfigurationException(SvnBundle.message("invalid.svn.revision.error.message", myRevisionField.getText()));
  }

  return result;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:12,代码来源:SvnRevisionPanel.java

示例3: setRevision

public void setRevision(final SVNRevision revision) {
  if (revision == SVNRevision.HEAD) {
    myHead.setSelected(true);
    myRevisionField.setEnabled(false);
  } else {
    myRevisionField.setText(String.valueOf(revision.getNumber()));
    mySpecified.setSelected(true);
    myRevisionField.setEnabled(true);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:SvnRevisionPanel.java

示例4: MergeRootInfo

public MergeRootInfo(File file, SvnVcs vcs) {
  myRevision1 = SVNRevision.HEAD;
  myRevision2 = SVNRevision.HEAD;

  Info info = vcs.getInfo(file);
  myUrl1 = info != null && info.getURL() != null ? info.getURL().toString() : "";
  myUrl2 = myUrl1;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:8,代码来源:MergeRootInfo.java

示例5: resolveSourceLatestRevision

@NotNull
public SVNRevision resolveSourceLatestRevision() {
  SVNRevision result = SVNRevision.HEAD;

  try {
    result = SvnUtil.getHeadRevision(myVcs, mySourceUrl);
  }
  catch (SvnBindException e) {
    LOG.info(e);
  }

  return result;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:13,代码来源:BranchMerger.java

示例6: calcCurrentRevisionNumber

@Nullable
public VcsRevisionNumber calcCurrentRevisionNumber() {
  if (myCommittedPath == null) {
    return null;
  }
  if (myCommittedPath.isNonLocal()) {
    // technically, it does not make sense, since there's no "current" revision for non-local history (if look how it's used)
    // but ok, lets keep it for now
    return new SvnRevisionNumber(SVNRevision.HEAD);
  }
  return getCurrentCommittedRevision(myVcs, new File(myCommittedPath.getPath()));
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:12,代码来源:SvnHistorySession.java

示例7: convert

private SVNCopySource convert(SVNURL url) {
	return new SVNCopySource(SVNRevision.HEAD, SVNRevision.HEAD, url);
}
 
开发者ID:callakrsos,项目名称:Gargoyle,代码行数:3,代码来源:SVNCopy.java

示例8: UpdateRootInfo

public UpdateRootInfo(File file, SvnVcs vcs) {
  myRevision = SVNRevision.HEAD;

  Info info = vcs.getInfo(file);
  myUrl = info != null ? info.getURL() : null;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:6,代码来源:UpdateRootInfo.java

示例9: createStubInfo

private Info createStubInfo(final String basePath, final String baseUrl) throws SVNException {
  return new Info(basePath, SVNURL.parseURIEncoded(baseUrl), SVNRevision.HEAD, NodeKind.FILE, "",
                         SVNURL.parseURIEncoded("http://a.b.c"), 1, new Date(), "me", null, Depth.EMPTY);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:SvnParseCommandLineParseTest.java


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