本文整理汇总了Java中org.tmatesoft.svn.core.wc.SVNRevision.WORKING属性的典型用法代码示例。如果您正苦于以下问题:Java SVNRevision.WORKING属性的具体用法?Java SVNRevision.WORKING怎么用?Java SVNRevision.WORKING使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.tmatesoft.svn.core.wc.SVNRevision
的用法示例。
在下文中一共展示了SVNRevision.WORKING属性的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createPropertyRevision
@Nullable
private ContentRevision createPropertyRevision(@NotNull Change change, @NotNull File file, boolean isBeforeRevision)
throws SVNException {
FilePath path = ChangesUtil.getFilePath(change);
ContentRevision contentRevision = isBeforeRevision ? change.getBeforeRevision() : change.getAfterRevision();
SVNRevision revision = isBeforeRevision ? SVNRevision.BASE : SVNRevision.WORKING;
return new SimplePropertyRevision(getProperties(file, revision), path, getRevisionNumber(contentRevision));
}
示例2: getAfterRevisionValue
protected SVNRevision getAfterRevisionValue(final Change change, final SvnVcs vcs) throws SVNException {
final ContentRevision afterRevision = change.getAfterRevision();
if (afterRevision != null) {
// CurrentContentRevision will be here, for instance, if invoked from changes dialog for "Compare with Branch" action
return afterRevision instanceof CurrentContentRevision
? SVNRevision.WORKING
: ((SvnRevisionNumber)afterRevision.getRevisionNumber()).getRevision();
} else {
return SVNRevision.create(((SvnRevisionNumber) change.getBeforeRevision().getRevisionNumber()).getRevision().getNumber() + 1);
}
}
示例3: getRevision
public SVNRevision getRevision() {
if (myWorkingCopyRadioButton.isSelected()) {
return SVNRevision.WORKING;
}
else {
try {
return myRevisionPanel.getRevision();
}
catch (ConfigurationException e) {
return SVNRevision.UNDEFINED;
}
}
}
示例4: 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);
}
}
示例5: getAfterRevisionValue
@Nullable
protected SVNRevision getAfterRevisionValue(final Change change, final SvnVcs vcs) throws SVNException {
return SVNRevision.WORKING;
}
示例6: checkPathGoingUp
@NotNull
private SvnMergeInfoCache.MergeCheckResult checkPathGoingUp(final long revisionAsked,
final long targetRevision,
@NotNull String branchRootPath,
@NotNull String path,
final String trunkUrl,
final boolean self) throws VcsException, SVNException {
SvnMergeInfoCache.MergeCheckResult result;
final File pathFile = new File(path);
// we didn't find existing item on the path jet
// check whether we locally have path
if (targetRevision == -1 && !pathFile.exists()) {
result = goUp(revisionAsked, targetRevision, branchRootPath, path, trunkUrl);
}
else {
final Info svnInfo = myVcs.getInfo(pathFile);
if (svnInfo == null || svnInfo.getURL() == null) {
LOG.info("Svninfo for " + pathFile + " is null or not full.");
result = SvnMergeInfoCache.MergeCheckResult.NOT_MERGED;
}
else {
final long actualRevision = svnInfo.getRevision().getNumber();
final long targetRevisionCorrected = (targetRevision == -1) ? actualRevision : targetRevision;
// here we know local URL and revision
// check existing info
final String keyString = path + "@" + targetRevisionCorrected;
final Set<Long> selfInfo = self ? myNonInheritablePathMergedMap.get(keyString) : null;
final Set<Long> mergeInfo = myPathMergedMap.get(keyString);
if (mergeInfo != null || selfInfo != null) {
boolean merged = mergeInfo != null && mergeInfo.contains(revisionAsked) || selfInfo != null && selfInfo.contains(revisionAsked);
// take from self or first parent with info; do not go further
result = SvnMergeInfoCache.MergeCheckResult.getInstance(merged);
}
else {
if (actualRevision != targetRevisionCorrected) {
myMixedRevisionsFound = true;
}
SvnTarget target;
SVNRevision revision;
if (actualRevision == targetRevisionCorrected) {
// look in WC
target = SvnTarget.fromFile(pathFile, SVNRevision.WORKING);
revision = SVNRevision.WORKING;
}
else {
// in repo
target = SvnTarget.fromURL(svnInfo.getURL());
revision = SVNRevision.create(targetRevisionCorrected);
}
PropertyValue mergeinfoProperty =
myVcs.getFactory(target).createPropertyClient().getProperty(target, SvnPropertyKeys.MERGE_INFO, false, revision);
result = mergeinfoProperty == null
? goUp(revisionAsked, targetRevisionCorrected, branchRootPath, path, trunkUrl)
: processMergeinfoProperty(keyString, revisionAsked, mergeinfoProperty, trunkUrl, self);
}
}
}
return result;
}