本文整理汇总了Java中org.jetbrains.idea.svn.SvnVcs.getInfo方法的典型用法代码示例。如果您正苦于以下问题:Java SvnVcs.getInfo方法的具体用法?Java SvnVcs.getInfo怎么用?Java SvnVcs.getInfo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jetbrains.idea.svn.SvnVcs
的用法示例。
在下文中一共展示了SvnVcs.getInfo方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: init
import org.jetbrains.idea.svn.SvnVcs; //导入方法依赖的package包/类
protected void init() {
super.init();
SvnVcs vcs = SvnVcs.getInstance(myProject);
String revStr = "";
Info info = vcs.getInfo(mySrcFile);
if (info != null) {
mySrcURL = info.getURL() == null ? null : info.getURL().toString();
revStr = String.valueOf(info.getRevision());
myURL = mySrcURL;
}
if (myURL == null) {
return;
}
myWorkingCopyField.setText(mySrcFile.toString());
myRepositoryField.setText(mySrcURL);
myToURLText.setText(myURL);
myRevisionPanel.setRevisionText(revStr);
updateControls();
myWorkingCopyRadioButton.setSelected(true);
}
示例2: MergeRootInfo
import org.jetbrains.idea.svn.SvnVcs; //导入方法依赖的package包/类
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;
}
示例3: dirExists
import org.jetbrains.idea.svn.SvnVcs; //导入方法依赖的package包/类
private static boolean dirExists(@NotNull final SvnVcs vcs, @NotNull final SVNURL url) throws SvnBindException {
final Ref<SvnBindException> excRef = new Ref<SvnBindException>();
final Ref<Boolean> resultRef = new Ref<Boolean>(Boolean.TRUE);
final Runnable taskImpl = new Runnable() {
public void run() {
try {
vcs.getInfo(url, SVNRevision.HEAD);
}
catch (SvnBindException e) {
if (e.contains(SVNErrorCode.RA_ILLEGAL_URL)) {
resultRef.set(Boolean.FALSE);
}
else {
excRef.set(e);
}
}
}
};
final Application application = ApplicationManager.getApplication();
if (application.isDispatchThread()) {
ProgressManager.getInstance().runProcessWithProgressSynchronously(taskImpl, "Checking target folder", true, vcs.getProject());
}
else {
taskImpl.run();
}
if (!excRef.isNull()) throw excRef.get();
return resultRef.get();
}
示例4: realTargetUrl
import org.jetbrains.idea.svn.SvnVcs; //导入方法依赖的package包/类
@Nullable
private static SVNURL realTargetUrl(final SvnVcs vcs, final WorkingCopyInfo info, final String targetBranchUrl) {
final Info svnInfo = vcs.getInfo(info.getLocalPath());
final SVNURL svnurl = svnInfo != null ? svnInfo.getURL() : null;
return (svnurl != null) && (svnurl.toString().startsWith(targetBranchUrl)) ? svnurl : null;
}
示例5: UpdateRootInfo
import org.jetbrains.idea.svn.SvnVcs; //导入方法依赖的package包/类
public UpdateRootInfo(File file, SvnVcs vcs) {
myRevision = SVNRevision.HEAD;
Info info = vcs.getInfo(file);
myUrl = info != null ? info.getURL() : null;
}
示例6: loadRevisions
import org.jetbrains.idea.svn.SvnVcs; //导入方法依赖的package包/类
@NotNull
public MergeData loadRevisions(@NotNull final VirtualFile file) throws VcsException {
final MergeData data = new MergeData();
VcsRunnable runnable = new VcsRunnable() {
public void run() throws VcsException {
File oldFile = null;
File newFile = null;
File workingFile = null;
boolean mergeCase = false;
SvnVcs vcs = SvnVcs.getInstance(myProject);
Info info = vcs.getInfo(file);
if (info != null) {
oldFile = info.getConflictOldFile();
newFile = info.getConflictNewFile();
workingFile = info.getConflictWrkFile();
mergeCase = workingFile == null || workingFile.getName().contains("working");
// for debug
if (workingFile == null) {
LOG.info("Null working file when merging text conflict for " + file.getPath() + " old file: " + oldFile + " new file: " + newFile);
}
if (mergeCase) {
// this is merge case
oldFile = info.getConflictNewFile();
newFile = info.getConflictOldFile();
workingFile = info.getConflictWrkFile();
}
data.LAST_REVISION_NUMBER = new SvnRevisionNumber(info.getRevision());
} else {
throw new VcsException("Could not get info for " + file.getPath());
}
if (oldFile == null || newFile == null || workingFile == null) {
ByteArrayOutputStream bos = getBaseRevisionContents(vcs, file);
data.ORIGINAL = bos.toByteArray();
data.LAST = bos.toByteArray();
data.CURRENT = readFile(new File(file.getPath()));
}
else {
data.ORIGINAL = readFile(oldFile);
data.LAST = readFile(newFile);
data.CURRENT = readFile(workingFile);
}
if (mergeCase) {
final ByteArrayOutputStream contents = getBaseRevisionContents(vcs, file);
if (! Arrays.equals(contents.toByteArray(), data.ORIGINAL)) {
// swap base and server: another order of merge arguments
byte[] original = data.ORIGINAL;
data.ORIGINAL = data.LAST;
data.LAST = original;
}
}
}
};
VcsUtil.runVcsProcessWithProgress(runnable, VcsBundle.message("multiple.file.merge.loading.progress.title"), false, myProject);
return data;
}
示例7: BranchRootSearcher
import org.jetbrains.idea.svn.SvnVcs; //导入方法依赖的package包/类
private BranchRootSearcher(final SvnVcs vcs, final VirtualFile root) throws SVNException {
myRoot = root;
myBranchesUnder = new HashMap<String, String>();
final Info info = vcs.getInfo(myRoot.getPath());
myRootUrl = info != null ? info.getURL() : null;
}
示例8: getCurrentCommittedRevision
import org.jetbrains.idea.svn.SvnVcs; //导入方法依赖的package包/类
public static VcsRevisionNumber getCurrentCommittedRevision(final SvnVcs vcs, final File file) {
Info info = vcs.getInfo(file);
return info != null ? new SvnRevisionNumber(info.getCommittedRevision()) : null;
}