本文整理汇总了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;
}
}
示例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;
}
示例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);
}
}
示例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;
}
示例5: resolveSourceLatestRevision
@NotNull
public SVNRevision resolveSourceLatestRevision() {
SVNRevision result = SVNRevision.HEAD;
try {
result = SvnUtil.getHeadRevision(myVcs, mySourceUrl);
}
catch (SvnBindException e) {
LOG.info(e);
}
return result;
}
示例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()));
}
示例7: convert
private SVNCopySource convert(SVNURL url) {
return new SVNCopySource(SVNRevision.HEAD, SVNRevision.HEAD, url);
}
示例8: UpdateRootInfo
public UpdateRootInfo(File file, SvnVcs vcs) {
myRevision = SVNRevision.HEAD;
Info info = vcs.getInfo(file);
myUrl = info != null ? info.getURL() : null;
}
示例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);
}