Author: brane
Date: Sun May 10 09:01:53 2026
New Revision: 1934037
Log:
On the javahl-1.15 branch: Upgrade the native implementation to use
svn_client_diff(_peg)7.
* BRANCH-README: Update TODO and DONE lists.
[in subversion/bindings/javahl/native/]
* DiffOptions.h
(DiffOptions::formatMergeinfo): New flag accessor method.
(DiffOptions::FORMAT_MERGEINFO): New flag value.
* SVNClient.cpp (SVNClient::diff): Use the new DiffOptions flag to call
svn_client_diff7() and svn_client_diff_peg7().
[in subversion/bindings/javahl/src/org/apache/subversion/javahl/types/]
* DiffOptions.java:
(DiffOptions.Flag): Rewrite enumeration values in hexadecimal so that they
match the values in DiffOptions.h. Should be easier to spot differences.
(DiffOptions.Flag.FormatMergeinfo): New enumeration value.
(DiffOptions.getFormatMergeinfo): New flag accessor method.
Modified:
subversion/branches/javahl-1.15/BRANCH-README
subversion/branches/javahl-1.15/subversion/bindings/javahl/native/DiffOptions.h
subversion/branches/javahl-1.15/subversion/bindings/javahl/native/SVNClient.cpp
subversion/branches/javahl-1.15/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/DiffOptions.java
Modified: subversion/branches/javahl-1.15/BRANCH-README
==============================================================================
--- subversion/branches/javahl-1.15/BRANCH-README Sun May 10 08:47:18 2026 (r1934036)
+++ subversion/branches/javahl-1.15/BRANCH-README Sun May 10 09:01:53 2026 (r1934037)
@@ -4,11 +4,7 @@
This is a temporary working branch to update JavaHL for 1.15.0.
TODO:
- * Update use of deprecated Subversion APIs:
- - svn_client_diff6 -> svn_client_diff7
- - svn_client_diff_peg6 -> svn_client_diff_peg7
- * Add Java wrappers for some new functionality
- * Update use of deprecated JavaHL APIs
+ * Update SVNClient.diff to capture stderr.
* Fix Java warnings where possible without breaking the JRE ABI
DONE:
@@ -16,12 +12,14 @@ DONE:
- svn_client_checkout3 -> svn_client_checkout4
- svn_client_upgrade -> svn_client_upgrade2
- svn_client_revert3 -> svn_client_revert4
+ - svn_client_diff6 -> svn_client_diff7
+ - svn_client_diff_peg6 -> svn_client_diff_peg7
* Add Java wrappers for some new functionality
- .types.VersionNumber extends Version (package scope)
- .types.Version::getInstance(int major, int minor, int patch)
- SVNClient.defaultWcVersion()
- SVNClient.oldestWcVersion()
- SVNClient.latestWcVersion()
- * Update use of deprecated JavaHL APIs:
+ * Use updated JavaHL APIs (in tests):
- SVNClient.checkout
- SVNClient.list, .callback.ListCallback
Modified: subversion/branches/javahl-1.15/subversion/bindings/javahl/native/DiffOptions.h
==============================================================================
--- subversion/branches/javahl-1.15/subversion/bindings/javahl/native/DiffOptions.h Sun May 10 08:47:18 2026 (r1934036)
+++ subversion/branches/javahl-1.15/subversion/bindings/javahl/native/DiffOptions.h Sun May 10 09:01:53 2026 (r1934037)
@@ -46,12 +46,18 @@ class DiffOptions
return (flags & USE_GIT_DIFF_FORMAT ? TRUE : FALSE);
}
+ svn_boolean_t formatMergeinfo() const
+ {
+ return (flags & FORMAT_MERGEINFO ? TRUE : FALSE);
+ }
+
private:
static const jint IGNORE_ALL_SPACE = 0x01;
static const jint IGNORE_SPACE_CHANGE = 0x02;
static const jint IGNORE_EOL_STYLE = 0x04;
static const jint SHOW_C_FUNCTION = 0x08;
static const jint USE_GIT_DIFF_FORMAT = 0x10;
+ static const jint FORMAT_MERGEINFO = 0x20;
const jint flags;
};
Modified: subversion/branches/javahl-1.15/subversion/bindings/javahl/native/SVNClient.cpp
==============================================================================
--- subversion/branches/javahl-1.15/subversion/bindings/javahl/native/SVNClient.cpp Sun May 10 08:47:18 2026 (r1934036)
+++ subversion/branches/javahl-1.15/subversion/bindings/javahl/native/SVNClient.cpp Sun May 10 09:01:53 2026 (r1934037)
@@ -1045,7 +1045,7 @@ void SVNClient::diff(const char *target1
if (pegRevision)
{
- SVN_JNI_ERR(svn_client_diff_peg6(diffOptions,
+ SVN_JNI_ERR(svn_client_diff_peg7(diffOptions,
path1.c_str(),
pegRevision->revision(),
revision1.revision(),
@@ -1060,6 +1060,7 @@ void SVNClient::diff(const char *target1
ignoreProps,
propsOnly,
options.useGitDiffFormat(),
+ options.formatMergeinfo(),
SVN_APR_LOCALE_CHARSET,
outputStream.getStream(subPool),
// Discard stderr; TODO: Update JavaHL API
@@ -1075,7 +1076,7 @@ void SVNClient::diff(const char *target1
Path path2(target2, subPool);
SVN_JNI_ERR(path2.error_occurred(), );
- SVN_JNI_ERR(svn_client_diff6(diffOptions,
+ SVN_JNI_ERR(svn_client_diff7(diffOptions,
path1.c_str(),
revision1.revision(),
path2.c_str(),
@@ -1090,6 +1091,7 @@ void SVNClient::diff(const char *target1
ignoreProps,
propsOnly,
options.useGitDiffFormat(),
+ options.formatMergeinfo(),
SVN_APR_LOCALE_CHARSET,
outputStream.getStream(subPool),
// Discard stderr; TODO: Update JavaHL API
Modified: subversion/branches/javahl-1.15/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/DiffOptions.java
==============================================================================
--- subversion/branches/javahl-1.15/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/DiffOptions.java Sun May 10 08:47:18 2026 (r1934036)
+++ subversion/branches/javahl-1.15/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/DiffOptions.java Sun May 10 09:01:53 2026 (r1934037)
@@ -30,19 +30,22 @@ public class DiffOptions
public enum Flag
{
/** Ignore all white space */
- IgnoreWhitespace (1),
+ IgnoreWhitespace (0x01),
/** Ignore changes in amount of white space */
- IgnoreSpaceChange (2),
+ IgnoreSpaceChange (0x02),
/** Ignore changes in EOL style */
- IgnoreEOLStyle (4),
+ IgnoreEOLStyle (0x04),
/** Show C function name */
- ShowFunction (8),
+ ShowFunction (0x08),
/** Use git's extended diff format */
- GitFormat (16);
+ GitFormat (0x10),
+
+ /** Show 'svn:mergeinfo' in human-readable form */
+ FormatMergeinfo (0x20);
final int value;
@@ -95,5 +98,11 @@ public class DiffOptions
return (0 != (flags & Flag.GitFormat.value));
}
+ /** @return whether FormatMergeinfo is enabled */
+ public boolean getFormatMergeinfo()
+ {
+ return (0 != (flags & Flag.FormatMergeinfo.value));
+ }
+
private final int flags;
}
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.