From 91e4f02089a883ac0d915b40084314f4fc29a6bb Mon Sep 17 00:00:00 2001 From: Alexander Fedorov Date: Tue, 12 Nov 2024 21:12:41 +0300 Subject: [PATCH] [#31] Implement `listHistoryLog` method Fixes #31 --- .../svnkit1_10/SvnKit1_10Connector.java | 22 +++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/bundles/ru.arsysop.svn.connector.svnkit1_10/src/ru/arsysop/svn/connector/internal/svnkit1_10/SvnKit1_10Connector.java b/bundles/ru.arsysop.svn.connector.svnkit1_10/src/ru/arsysop/svn/connector/internal/svnkit1_10/SvnKit1_10Connector.java index cc8c73e..9fbc037 100644 --- a/bundles/ru.arsysop.svn.connector.svnkit1_10/src/ru/arsysop/svn/connector/internal/svnkit1_10/SvnKit1_10Connector.java +++ b/bundles/ru.arsysop.svn.connector.svnkit1_10/src/ru/arsysop/svn/connector/internal/svnkit1_10/SvnKit1_10Connector.java @@ -27,6 +27,7 @@ import java.util.Collections; import java.util.Date; import java.util.HashMap; +import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Optional; @@ -486,8 +487,25 @@ public void removeRemote(String[] path, String message, long options, Map revPro public void listHistoryLog(SVNEntryReference reference, SVNRevisionRange[] revisionRanges, String[] revProps, long limit, long options, ISVNLogEntryCallback cb, ISVNProgressMonitor monitor) throws SVNConnectorException { - System.out.println("SvnKit1_10Connector.listHistoryLog()"); - //TODO + Map parameters = new HashMap<>(); + parameters.put("reference", reference); //$NON-NLS-1$ + parameters.put("revisionRanges", revisionRanges); //$NON-NLS-1$ + parameters.put("revProps", revProps); //$NON-NLS-1$ + parameters.put("limit", Long.valueOf(limit)); //$NON-NLS-1$ + parameters.put("options", Long.valueOf(options)); //$NON-NLS-1$ + parameters.put("cb", cb); //$NON-NLS-1$ + parameters.put("monitor", monitor); //$NON-NLS-1$ + watch.commandLong(ISVNCallListener.LIST_HISTORY_LOG, parameters, callback(monitor), // + p -> client.logMessages(// + reference.path, // + new RevisionAdapter(reference.pegRevision).adapt(), // + Arrays.asList(ConversionUtility.convert(revisionRanges)), // + (options & Options.STOP_ON_COPY) != 0, // + (options & Options.DISCOVER_PATHS) != 0, // + (options & Options.INCLUDE_MERGED_REVISIONS) != 0, // + new HashSet<>(Arrays.asList(revProps)), // + limit, // + ConversionUtility.convert(cb))); } @Override