本文整理汇总了Java中org.tigris.subversion.svnclientadapter.ISVNMergeinfoLogKind类的典型用法代码示例。如果您正苦于以下问题:Java ISVNMergeinfoLogKind类的具体用法?Java ISVNMergeinfoLogKind怎么用?Java ISVNMergeinfoLogKind使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ISVNMergeinfoLogKind类属于org.tigris.subversion.svnclientadapter包,在下文中一共展示了ISVNMergeinfoLogKind类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: run
import org.tigris.subversion.svnclientadapter.ISVNMergeinfoLogKind; //导入依赖的package包/类
public void run(IProgressMonitor aMonitor) throws SVNException {
logEntries = null;
IProgressMonitor monitor = Policy.monitorFor(aMonitor);
int taskLength;
if (settings.getBoolean(MergeWizard.LAST_RETRIEVE_ELIGIBLE_REVISIONS_SEPARATELY)) {
taskLength = standardPage.getUrls().length;
} else {
taskLength = IProgressMonitor.UNKNOWN;
}
monitor.beginTask(Messages.MergeWizardRevisionsPage_retrievingLogEntries, taskLength);
ISVNLogMessage[] logMessages = null;
ISVNClientAdapter client = null;
try {
client = remoteResource.getRepository().getSVNClient();
SVNProviderPlugin.disableConsoleLogging();
if (resources.length > 1 && settings.getBoolean(MergeWizard.LAST_RETRIEVE_ELIGIBLE_REVISIONS_SEPARATELY)) {
logMessages = getCombinedLogMessages(client,monitor);
} else {
String commonRoot = ((MergeWizard)getWizard()).getCommonRoot();
SVNUrl rootUrl = new SVNUrl(commonRoot);
logMessages = client.getMergeinfoLog(ISVNMergeinfoLogKind.eligible, rootUrl, SVNRevision.HEAD, remoteResource.getUrl(), SVNRevision.HEAD, !SVNProviderPlugin.getPlugin().getSVNClientManager().isFetchChangePathOnDemand());
}
if (remoteResource.isFolder()) {
logEntries = LogEntry.createLogEntriesFrom((ISVNRemoteFolder) remoteResource, logMessages, getTags(logMessages));
} else {
logEntries = LogEntry.createLogEntriesFrom((ISVNRemoteFile) remoteResource, logMessages, getTags(logMessages), getUrls(logMessages));
}
} catch (Exception e) {
throw SVNException.wrapException(e);
} finally {
SVNProviderPlugin.enableConsoleLogging();
remoteResource.getRepository().returnSVNClient(client);
monitor.done();
}
}
示例2: getCombinedLogMessages
import org.tigris.subversion.svnclientadapter.ISVNMergeinfoLogKind; //导入依赖的package包/类
private ISVNLogMessage[] getCombinedLogMessages(ISVNClientAdapter client, IProgressMonitor monitor) throws Exception {
List<SVNRevision.Number> revisions = new ArrayList<SVNRevision.Number>();
List<ISVNLogMessage> logMessages = new ArrayList<ISVNLogMessage>();
SVNUrl[] urls = standardPage.getUrls();
for (int i = 0; i < resources.length; i++) {
IResource resource = resources[i];
monitor.subTask(resource.getName());
SVNUrl remoteUrl = urls[i];
ISVNLocalResource svnResource = SVNWorkspaceRoot.getSVNResourceFor(resource);
SVNUrl url = svnResource.getUrl();
ISVNLogMessage[] resourceLogMessages = null;
try {
resourceLogMessages = client.getMergeinfoLog(ISVNMergeinfoLogKind.eligible, url, SVNRevision.HEAD, remoteUrl, SVNRevision.HEAD, !SVNProviderPlugin.getPlugin().getSVNClientManager().isFetchChangePathOnDemand());
} catch (Exception e) {
Activator.handleError(e);
}
if (resourceLogMessages != null) {
for (ISVNLogMessage logMessage : resourceLogMessages) {
if (!revisions.contains(logMessage.getRevision())) {
revisions.add(logMessage.getRevision());
logMessages.add(logMessage);
}
List<IResource> lst = revisionToResource.get(logMessage.getRevision());
if (lst == null)
{
lst = new ArrayList<IResource>(resources.length);
revisionToResource.put(logMessage.getRevision(),lst);
}
lst.add(resource);
}
}
monitor.worked(1);
}
ISVNLogMessage[] logMessageArray = new ISVNLogMessage[logMessages.size()];
logMessages.toArray(logMessageArray);
return logMessageArray;
}
示例3: getMergeinfoLog
import org.tigris.subversion.svnclientadapter.ISVNMergeinfoLogKind; //导入依赖的package包/类
private ISVNLogMessage[] getMergeinfoLog(int kind, String target,
SVNRevision pegRevision, SVNUrl mergeSourceUrl,
SVNRevision srcPegRevision, boolean discoverChangedPaths)
throws SVNClientException {
try {
notificationHandler.setCommand(
ISVNNotifyListener.Command.MERGEINFO);
String show = "";
org.apache.subversion.javahl.types.Mergeinfo.LogKind mergeKind = org.apache.subversion.javahl.types.Mergeinfo.LogKind.eligible;
if (kind == ISVNMergeinfoLogKind.eligible)
show = show + " --show-revs eligible ";
if (kind == ISVNMergeinfoLogKind.merged) {
show = show + " --show-revs merged ";
mergeKind = org.apache.subversion.javahl.types.Mergeinfo.LogKind.merged;
}
notificationHandler.logCommandLine(
"mergeinfo "
+ show
+ mergeSourceUrl.toString()
+ " "
+ target);
SVNLogMessageCallback worker = new SVNLogMessageCallback();
JhlLogMessageCallback callback = new JhlLogMessageCallback(worker);
Set<String> revProps = new HashSet<String>();
revProps.add("svn:author");
revProps.add("svn:date");
revProps.add("svn:log");
svnClient.getMergeinfoLog(mergeKind, target, JhlConverter.convert(pegRevision),
mergeSourceUrl.toString(), JhlConverter.convert(srcPegRevision),
discoverChangedPaths, Depth.infinity, revProps, callback);
return worker.getLogMessages();
} catch (ClientException e) {
if (e.getAprError() == ErrorCodes.unsupportedFeature) {
return this.getLogMessages(mergeSourceUrl, srcPegRevision, new SVNRevision.Number(0), SVNRevision.HEAD, true, discoverChangedPaths, 0, false);
}
notificationHandler.logException(e);
throw new SVNClientException(e);
}
}
示例4: getMergeinfoLog
import org.tigris.subversion.svnclientadapter.ISVNMergeinfoLogKind; //导入依赖的package包/类
private ISVNLogMessage[] getMergeinfoLog(int kind, String target,
SVNRevision pegRevision, SVNUrl mergeSourceUrl,
SVNRevision srcPegRevision, boolean discoverChangedPaths)
throws SVNClientException {
try {
notificationHandler
.setCommand(ISVNNotifyListener.Command.MERGEINFO);
String show = "";
org.apache.subversion.javahl.types.Mergeinfo.LogKind mergeKind = org.apache.subversion.javahl.types.Mergeinfo.LogKind.eligible;
if (kind == ISVNMergeinfoLogKind.eligible)
show = show + " --show-revs eligible ";
if (kind == ISVNMergeinfoLogKind.merged) {
show = show + " --show-revs merged ";
mergeKind = org.apache.subversion.javahl.types.Mergeinfo.LogKind.merged;
}
notificationHandler.logCommandLine("mergeinfo " + show
+ mergeSourceUrl.toString() + " " + target);
SVNLogMessageCallback worker = new SVNLogMessageCallback();
JhlLogMessageCallback callback = new JhlLogMessageCallback(worker);
Set<String> revProps = new HashSet<String>();
revProps.add("svn:author");
revProps.add("svn:date");
revProps.add("svn:log");
svnClient.getMergeinfoLog(mergeKind, target,
JhlConverter.convert(pegRevision),
mergeSourceUrl.toString(),
JhlConverter.convert(srcPegRevision), discoverChangedPaths,
Depth.infinity, revProps, callback);
return worker.getLogMessages();
} catch (ClientException e) {
if (e.getAprError() == ErrorCodes.unsupportedFeature) {
return this.getLogMessages(mergeSourceUrl, srcPegRevision,
new SVNRevision.Number(0), SVNRevision.HEAD, true,
discoverChangedPaths, 0, false);
}
notificationHandler.logException(e);
throw new SVNClientException(e);
}
}