本文整理汇总了Java中org.tmatesoft.svn.core.wc.SVNRevision.UNDEFINED属性的典型用法代码示例。如果您正苦于以下问题:Java SVNRevision.UNDEFINED属性的具体用法?Java SVNRevision.UNDEFINED怎么用?Java SVNRevision.UNDEFINED使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.tmatesoft.svn.core.wc.SVNRevision
的用法示例。
在下文中一共展示了SVNRevision.UNDEFINED属性的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: loadBackwards
private void loadBackwards(SVNURL svnurl) throws SVNException, VcsException {
// this method is called when svnurl does not exist in latest repository revision - thus concrete old revision is used for "info"
// command to get repository url
Info info = myVcs.getInfo(svnurl, myPeg, myPeg);
final SVNURL rootURL = info != null ? info.getRepositoryRootURL() : null;
final String root = rootURL != null ? rootURL.toString() : "";
String relativeUrl = myUrl;
if (myUrl.startsWith(root)) {
relativeUrl = myUrl.substring(root.length());
}
final RepositoryLogEntryHandler repositoryLogEntryHandler =
new RepositoryLogEntryHandler(myVcs, myUrl, SVNRevision.UNDEFINED, relativeUrl,
new ThrowableConsumer<VcsFileRevision, SVNException>() {
@Override
public void consume(VcsFileRevision revision) throws SVNException {
myConsumer.consume(revision);
}
}, rootURL);
repositoryLogEntryHandler.setThrowCancelOnMeetPathCreation(true);
SvnTarget target = SvnTarget.fromURL(rootURL, myFrom);
myVcs.getFactory(target).createHistoryClient()
.doLog(target, myFrom, myTo == null ? SVNRevision.create(1) : myTo, false, true, myShowMergeSources && mySupport15, 1, null,
repositoryLogEntryHandler);
}
示例3: Status
public Status(SVNURL url,
File file,
@NotNull NodeKind kind,
@Nullable SVNRevision revision,
@Nullable SVNRevision committedRevision,
StatusType contentsStatus,
StatusType propertiesStatus,
StatusType remoteContentsStatus,
StatusType remotePropertiesStatus,
boolean isLocked,
boolean isCopied,
boolean isSwitched,
String copyFromURL,
@Nullable Lock remoteLock,
@Nullable Lock localLock,
String changelistName,
@Nullable TreeConflictDescription treeConflict) {
myURL = url;
myFile = file;
myKind = kind;
myRevision = revision == null ? SVNRevision.UNDEFINED : revision;
myCommittedRevision = committedRevision == null ? SVNRevision.UNDEFINED : committedRevision;
myContentsStatus = contentsStatus == null ? StatusType.STATUS_NONE : contentsStatus;
myPropertiesStatus = propertiesStatus == null ? StatusType.STATUS_NONE : propertiesStatus;
myRemoteContentsStatus = remoteContentsStatus == null ? StatusType.STATUS_NONE : remoteContentsStatus;
myRemotePropertiesStatus = remotePropertiesStatus == null ? StatusType.STATUS_NONE : remotePropertiesStatus;
myRemoteNodeStatus = StatusType.STATUS_NONE;
myIsLocked = isLocked;
myIsCopied = isCopied;
myIsSwitched = isSwitched;
myCopyFromURL = copyFromURL;
myRemoteLock = remoteLock;
myLocalLock = localLock;
myChangelistName = changelistName;
myTreeConflict = treeConflict;
myRemoteRevision = SVNRevision.UNDEFINED;
}
示例4: getRevision
public SVNRevision getRevision() {
if (myWorkingCopyRadioButton.isSelected()) {
return SVNRevision.WORKING;
}
else {
try {
return myRevisionPanel.getRevision();
}
catch (ConfigurationException e) {
return SVNRevision.UNDEFINED;
}
}
}
示例5: isOKActionEnabled
public boolean isOKActionEnabled() {
myErrorLabel.setText(" ");
if (myURL == null) {
return false;
}
if (myBranchOrTagRadioButton.isSelected() && myBranchTagBaseComboBox.getComboBox().getSelectedItem() == null) {
myErrorLabel.setText(SvnBundle.message("create.branch.no.base.location.error"));
return false;
}
String url = getToURL();
if (url != null && url.trim().length() > 0) {
if (myRepositoryRadioButton.isSelected()) {
SVNRevision revision;
try {
revision = myRevisionPanel.getRevision();
}
catch (ConfigurationException e) {
revision = SVNRevision.UNDEFINED;
}
if (!revision.isValid() || revision.isLocal()) {
myErrorLabel.setText(SvnBundle.message("create.branch.invalid.revision.error", myRevisionPanel.getRevisionText()));
return false;
}
return true;
}
else if (myWorkingCopyRadioButton.isSelected()) {
Info info = SvnVcs.getInstance(myProject).getInfo(mySrcFile);
String srcUrl = info != null && info.getURL() != null ? info.getURL().toString() : null;
if (srcUrl == null) {
myErrorLabel.setText(SvnBundle.message("create.branch.no.working.copy.error", myWorkingCopyField.getText()));
return false;
}
return true;
}
}
return false;
}
示例6: copy
@Override
public void copy(@NotNull File src, @NotNull File dst, boolean makeParents, boolean isMove) throws VcsException {
final SVNCopySource copySource = new SVNCopySource(isMove ? SVNRevision.UNDEFINED : SVNRevision.WORKING, SVNRevision.WORKING, src);
try {
myVcs.getSvnKitManager().createCopyClient().doCopy(new SVNCopySource[]{copySource}, dst, isMove, makeParents, true);
}
catch (SVNException e) {
throw new VcsException(e);
}
}
示例7: createRevision
@Override
protected SvnFileRevision createRevision(final LogEntry logEntry, final String copyPath, LogEntryPath entryPath)
throws SVNException {
final SVNURL url = entryPath == null ? myRepositoryRoot.appendPath(myLastPathCorrector.getBefore(), false) :
myRepositoryRoot.appendPath(entryPath.getPath(), true);
return new SvnFileRevision(myVcs, SVNRevision.UNDEFINED, logEntry, url.toString(), copyPath);
}
示例8: notNullize
@NotNull
protected static SVNRevision notNullize(@Nullable SVNRevision revision) {
return revision != null ? revision : SVNRevision.UNDEFINED;
}