Modified: subversion/branches/swig-py3/subversion/bindings/javahl/native/RemoteSessionContext.h URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/bindings/javahl/native/RemoteSessionContext.h?rev=1862754&r1=1862753&r2=1862754&view=diff ============================================================================== --- subversion/branches/swig-py3/subversion/bindings/javahl/native/RemoteSessionContext.h (original) +++ subversion/branches/swig-py3/subversion/bindings/javahl/native/RemoteSessionContext.h Mon Jul 8 15:19:03 2019 @@ -30,6 +30,7 @@ #include "svn_ra.h" #include "OperationContext.h" +#include "CxxCompat.hpp" class RemoteSessionContext : public OperationContext { @@ -37,7 +38,7 @@ class RemoteSessionContext : public Oper RemoteSessionContext(SVN::Pool &pool, const char* jconfigDirectory, const char* jusername, const char* jpassword, - std::auto_ptr<Prompter> prompter, + JavaHL::cxx::owned_ptr<Prompter> prompter, jobject jcfgcb, jobject jtunnelcb); virtual ~RemoteSessionContext(); void activate(jobject jremoteSession, jobject jprogress);
Modified: subversion/branches/swig-py3/subversion/bindings/javahl/native/SVNClient.cpp URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/bindings/javahl/native/SVNClient.cpp?rev=1862754&r1=1862753&r2=1862754&view=diff ============================================================================== --- subversion/branches/swig-py3/subversion/bindings/javahl/native/SVNClient.cpp (original) +++ subversion/branches/swig-py3/subversion/bindings/javahl/native/SVNClient.cpp Mon Jul 8 15:19:03 2019 @@ -1284,7 +1284,9 @@ void SVNClient::blame(const char *path, if (ctx == NULL) return; - SVN_JNI_ERR(svn_client_blame5( + SVN_JNI_ERR(svn_client_blame6( + callback->get_start_revnum_p(), + callback->get_end_revnum_p(), intPath.c_str(), pegRevision.revision(), revisionStart.revision(), revisionEnd.revision(), options.fileOptions(subPool), ignoreMimeType, Modified: subversion/branches/swig-py3/subversion/bindings/javahl/native/StateReporter.cpp URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/bindings/javahl/native/StateReporter.cpp?rev=1862754&r1=1862753&r2=1862754&view=diff ============================================================================== --- subversion/branches/swig-py3/subversion/bindings/javahl/native/StateReporter.cpp (original) +++ subversion/branches/swig-py3/subversion/bindings/javahl/native/StateReporter.cpp Mon Jul 8 15:19:03 2019 @@ -38,7 +38,7 @@ StateReporter::StateReporter() : m_valid(false), m_raw_reporter(NULL), m_report_baton(NULL), - m_editor(NULL), + m_editor(), m_target_revision(SVN_INVALID_REVNUM) {} @@ -182,7 +182,7 @@ StateReporter::set_reporter_data(const s { //DEBUG:fprintf(stderr, " (n) StateReporter::set_reporter_data()\n"); - m_editor = editor; + m_editor = JavaHL::cxx::move(editor); m_raw_reporter = raw_reporter; m_report_baton = report_baton; m_valid = true; Modified: subversion/branches/swig-py3/subversion/bindings/javahl/native/jniwrapper/jni_class_cache.cpp URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/bindings/javahl/native/jniwrapper/jni_class_cache.cpp?rev=1862754&r1=1862753&r2=1862754&view=diff ============================================================================== --- subversion/branches/swig-py3/subversion/bindings/javahl/native/jniwrapper/jni_class_cache.cpp (original) +++ subversion/branches/swig-py3/subversion/bindings/javahl/native/jniwrapper/jni_class_cache.cpp Mon Jul 8 15:19:03 2019 @@ -42,10 +42,11 @@ #include "../Credential.hpp" #include "../ExternalItem.hpp" #include "../EditorCallbacks.hpp" +#include "../CxxCompat.hpp" namespace { -/* This class behaves like a dumbed-down std:auto_ptr, but it +/* This class behaves like a dumbed-down std:unique_ptr, but it implements atomic access and modification of the wrapped pointer. */ class ClassImplPtr @@ -132,11 +133,11 @@ class ClassCacheImpl // The statically initialized calss wrappers are always defined and // therefore do not need atomic access. -#define JNIWRAPPER_DEFINE_CACHED_CLASS(M, C) \ - std::auto_ptr<Object::ClassImpl> m_impl_##M; \ - const Object::ClassImpl* get_##M(Env) \ - { \ - return m_impl_##M.get(); \ +#define JNIWRAPPER_DEFINE_CACHED_CLASS(M, C) \ + JavaHL::cxx::owned_ptr<Object::ClassImpl> m_impl_##M; \ + const Object::ClassImpl* get_##M(Env) \ + { \ + return m_impl_##M.get(); \ } JNIWRAPPER_DEFINE_CACHED_CLASS(object, Object) @@ -153,7 +154,7 @@ class ClassCacheImpl Object::ClassImpl* pimpl = m_impl_##M.get(); \ if (!pimpl) \ { \ - std::auto_ptr<Object::ClassImpl> tmp( \ + JavaHL::cxx::owned_ptr<Object::ClassImpl> tmp( \ new C::ClassImpl( \ env, env.FindClass(C::m_class_name))); \ pimpl = m_impl_##M.test_and_set(tmp.get()); \ Modified: subversion/branches/swig-py3/subversion/bindings/javahl/native/jniwrapper/jni_io_stream.cpp URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/bindings/javahl/native/jniwrapper/jni_io_stream.cpp?rev=1862754&r1=1862753&r2=1862754&view=diff ============================================================================== --- subversion/branches/swig-py3/subversion/bindings/javahl/native/jniwrapper/jni_io_stream.cpp (original) +++ subversion/branches/swig-py3/subversion/bindings/javahl/native/jniwrapper/jni_io_stream.cpp Mon Jul 8 15:19:03 2019 @@ -27,6 +27,8 @@ #include "svn_private_config.h" +#include "../CxxCompat.hpp" + // Stream-wrapper-specific mark object type struct svn_stream_mark_t { @@ -197,7 +199,7 @@ InputStream::get_global_stream(Env env, const bool has_mark = InputStream(env, jstream).mark_supported(); - std::auto_ptr<GlobalObject> baton(new GlobalObject(env, jstream)); + JavaHL::cxx::owned_ptr<GlobalObject> baton(new GlobalObject(env, jstream)); svn_stream_t* const stream = svn_stream_create(baton.get(), pool.getPool()); svn_stream_set_read2(stream, global_stream_read, @@ -268,7 +270,7 @@ OutputStream::get_global_stream(Env env, if (!jstream) return NULL; - std::auto_ptr<GlobalObject> baton(new GlobalObject(env, jstream)); + JavaHL::cxx::owned_ptr<GlobalObject> baton(new GlobalObject(env, jstream)); svn_stream_t* const stream = svn_stream_create(baton.get(), pool.getPool()); svn_stream_set_write(stream, global_stream_write); Modified: subversion/branches/swig-py3/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp?rev=1862754&r1=1862753&r2=1862754&view=diff ============================================================================== --- subversion/branches/swig-py3/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp (original) +++ subversion/branches/swig-py3/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp Mon Jul 8 15:19:03 2019 @@ -280,7 +280,7 @@ Java_org_apache_subversion_javahl_SVNCli if (JNIUtil::isExceptionThrown()) return; - cl->getClientContext().setPrompt(prompter); + cl->getClientContext().setPrompt(JavaHL::cxx::move(prompter)); } JNIEXPORT void JNICALL @@ -298,7 +298,7 @@ Java_org_apache_subversion_javahl_SVNCli if (JNIUtil::isExceptionThrown()) return; - cl->getClientContext().setPrompt(prompter); + cl->getClientContext().setPrompt(JavaHL::cxx::move(prompter)); } JNIEXPORT void JNICALL @@ -1656,10 +1656,11 @@ Java_org_apache_subversion_javahl_SVNCli JNIEXPORT void JNICALL Java_org_apache_subversion_javahl_SVNClient_blame -(JNIEnv *env, jobject jthis, jstring jpath, jobject jpegRevision, +(JNIEnv *env, jobject jthis, + jstring jpath, jobject jpegRevision, jobject jrevisionStart, jobject jrevisionEnd, jboolean jignoreMimeType, - jboolean jincludeMergedRevisions, jobject jblameCallback, - jobject jdiffOptions) + jboolean jincludeMergedRevisions, jobject jdiffOptions, + jobject jrangeCallback, jobject jlineCallback) { JNIEntry(SVNClient, blame); SVNClient *cl = SVNClient::getCppObject(jthis); @@ -1688,7 +1689,7 @@ Java_org_apache_subversion_javahl_SVNCli if (JNIUtil::isExceptionThrown()) return; - BlameCallback callback(jblameCallback); + BlameCallback callback(jrangeCallback, jlineCallback); cl->blame(path, pegRevision, revisionStart, revisionEnd, jignoreMimeType ? true : false, jincludeMergedRevisions ? true : false, &callback, Modified: subversion/branches/swig-py3/subversion/bindings/javahl/native/org_apache_subversion_javahl_remote_RemoteSession.cpp URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/bindings/javahl/native/org_apache_subversion_javahl_remote_RemoteSession.cpp?rev=1862754&r1=1862753&r2=1862754&view=diff ============================================================================== --- subversion/branches/swig-py3/subversion/bindings/javahl/native/org_apache_subversion_javahl_remote_RemoteSession.cpp (original) +++ subversion/branches/swig-py3/subversion/bindings/javahl/native/org_apache_subversion_javahl_remote_RemoteSession.cpp Mon Jul 8 15:19:03 2019 @@ -157,13 +157,13 @@ Java_org_apache_subversion_javahl_remote JNIEXPORT void JNICALL Java_org_apache_subversion_javahl_remote_RemoteSession_nativeChangeRevisionProperty( JNIEnv *env, jobject jthis, jlong jrevision, jstring jname, - jbyteArray jold_value, jbyteArray jvalue) + jbyteArray jold_propval, jbyteArray jpropval) { JNIEntry(RemoteSession, nativeChangeRevisionProperty); RemoteSession *ras = RemoteSession::getCppObject(jthis); CPPADDR_NULL_PTR(ras, ); - return ras->changeRevisionProperty(jrevision, jname, jold_value, jvalue); + return ras->changeRevisionProperty(jrevision, jname, jold_propval, jpropval); } JNIEXPORT jobject JNICALL Modified: subversion/branches/swig-py3/subversion/bindings/javahl/native/org_apache_subversion_javahl_util_ConfigImpl_Category.cpp URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/bindings/javahl/native/org_apache_subversion_javahl_util_ConfigImpl_Category.cpp?rev=1862754&r1=1862753&r2=1862754&view=diff ============================================================================== --- subversion/branches/swig-py3/subversion/bindings/javahl/native/org_apache_subversion_javahl_util_ConfigImpl_Category.cpp (original) +++ subversion/branches/swig-py3/subversion/bindings/javahl/native/org_apache_subversion_javahl_util_ConfigImpl_Category.cpp Mon Jul 8 15:19:03 2019 @@ -185,12 +185,12 @@ Java_org_apache_subversion_javahl_util_C JNIEXPORT void JNICALL Java_org_apache_subversion_javahl_util_ConfigImpl_00024Category_set_1str( JNIEnv* env, jobject jthis, jstring jcategory, jlong jcontext, - jstring jsection, jstring joption, jstring jvalue) + jstring jsection, jstring joption, jstring jconfigval) { JNIEntry(ConfigImpl$Category, set_str); const ImplContext ctx(env, jthis, jcategory, jcontext, jsection, joption); - JNIStringHolder value(jvalue); + JNIStringHolder value(jconfigval); if (JNIUtil::isJavaExceptionThrown()) return; @@ -202,27 +202,27 @@ Java_org_apache_subversion_javahl_util_C JNIEXPORT void JNICALL Java_org_apache_subversion_javahl_util_ConfigImpl_00024Category_set_1bool( JNIEnv* env, jobject jthis, jstring jcategory, jlong jcontext, - jstring jsection, jstring joption, jboolean jvalue) + jstring jsection, jstring joption, jboolean jconfigval) { JNIEntry(ConfigImpl$Category, set_bool); const ImplContext ctx(env, jthis, jcategory, jcontext, jsection, joption); svn_config_set_bool(ctx.m_config, ctx.m_section.c_str(), ctx.m_option.c_str(), - bool(jvalue)); + bool(jconfigval)); } JNIEXPORT void JNICALL Java_org_apache_subversion_javahl_util_ConfigImpl_00024Category_set_1long( JNIEnv* env, jobject jthis, jstring jcategory, jlong jcontext, - jstring jsection, jstring joption, jlong jvalue) + jstring jsection, jstring joption, jlong jconfigval) { JNIEntry(ConfigImpl$Category, set_long); const ImplContext ctx(env, jthis, jcategory, jcontext, jsection, joption); svn_config_set_int64(ctx.m_config, ctx.m_section.c_str(), ctx.m_option.c_str(), - apr_int64_t(jvalue)); + apr_int64_t(jconfigval)); } JNIEXPORT jobject JNICALL @@ -287,16 +287,16 @@ Java_org_apache_subversion_javahl_util_C jstring jname = JNIUtil::makeJString(name); if (JNIUtil::isJavaExceptionThrown()) return false; - jstring jvalue = JNIUtil::makeJString(value); + jstring jconfigval = JNIUtil::makeJString(value); if (JNIUtil::isJavaExceptionThrown()) return false; - e->CallVoidMethod(jh, mid, jname, jvalue); + e->CallVoidMethod(jh, mid, jname, jconfigval); if (JNIUtil::isJavaExceptionThrown()) return false; e->DeleteLocalRef(jname); - e->DeleteLocalRef(jvalue); + e->DeleteLocalRef(jconfigval); return true; } Modified: subversion/branches/swig-py3/subversion/bindings/javahl/native/org_apache_subversion_javahl_util_PropLib.cpp URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/bindings/javahl/native/org_apache_subversion_javahl_util_PropLib.cpp?rev=1862754&r1=1862753&r2=1862754&view=diff ============================================================================== --- subversion/branches/swig-py3/subversion/bindings/javahl/native/org_apache_subversion_javahl_util_PropLib.cpp (original) +++ subversion/branches/swig-py3/subversion/bindings/javahl/native/org_apache_subversion_javahl_util_PropLib.cpp Mon Jul 8 15:19:03 2019 @@ -216,7 +216,7 @@ private: JNIEXPORT jbyteArray JNICALL Java_org_apache_subversion_javahl_util_PropLib_checkNodeProp( JNIEnv* jenv, jobject jthis, - jstring jname, jbyteArray jvalue, jstring jpath, jobject jkind, + jstring jname, jbyteArray jpropval, jstring jpath, jobject jkind, jstring jmime_type, jobject jfile_contents, jboolean jskip_some_checks) { @@ -228,7 +228,7 @@ Java_org_apache_subversion_javahl_util_P SVN_JAVAHL_OLDSTYLE_EXCEPTION_CHECK(env); const Java::String name_str(env, jname); - const Java::ByteArray value(env, jvalue); + const Java::ByteArray value(env, jpropval); const Java::String path_str(env, jpath); const Java::String mime_type_str(env, jmime_type); Java::InputStream file_contents(env, jfile_contents); Modified: subversion/branches/swig-py3/subversion/bindings/javahl/native/org_apache_subversion_javahl_util_SubstLib.cpp URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/bindings/javahl/native/org_apache_subversion_javahl_util_SubstLib.cpp?rev=1862754&r1=1862753&r2=1862754&view=diff ============================================================================== --- subversion/branches/swig-py3/subversion/bindings/javahl/native/org_apache_subversion_javahl_util_SubstLib.cpp (original) +++ subversion/branches/swig-py3/subversion/bindings/javahl/native/org_apache_subversion_javahl_util_SubstLib.cpp Mon Jul 8 15:19:03 2019 @@ -37,6 +37,7 @@ #include "JNIUtil.h" #include "NativeStream.hpp" #include "Utility.hpp" +#include "CxxCompat.hpp" #include <apr_hash.h> @@ -165,7 +166,7 @@ Java_org_apache_subversion_javahl_util_S const Java::Env env(jenv); // We'll allocate the stream in the bound object's pool. - std::auto_ptr<JavaHL::NativeInputStream> + JavaHL::cxx::owned_ptr<JavaHL::NativeInputStream> translated(new JavaHL::NativeInputStream()); svn_stream_t* source = Java::InputStream::get_global_stream( env, jsource, translated->get_pool()); @@ -199,7 +200,7 @@ Java_org_apache_subversion_javahl_util_S const Java::Env env(jenv); // We'll allocate the stream in the bound object's pool. - std::auto_ptr<JavaHL::NativeOutputStream> + JavaHL::cxx::owned_ptr<JavaHL::NativeOutputStream> translated(new JavaHL::NativeOutputStream()); svn_stream_t* destination = Java::OutputStream::get_global_stream( env, jdestination, translated->get_pool()); Modified: subversion/branches/swig-py3/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java?rev=1862754&r1=1862753&r2=1862754&view=diff ============================================================================== --- subversion/branches/swig-py3/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java (original) +++ subversion/branches/swig-py3/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java Mon Jul 8 15:19:03 2019 @@ -1386,7 +1386,7 @@ public interface ISVNClient /** * Retrieve the content together with the author, the revision and the date - * of the last change of each line + * of the last change of each line. * @param path the path * @param pegRevision the revision to interpret the path * @param revisionStart the first revision to show @@ -1394,17 +1394,37 @@ public interface ISVNClient * @param ignoreMimeType whether or not to ignore the mime-type * @param includeMergedRevisions whether or not to include extra merge * information - * @param callback callback to receive the file content and the other - * information * @param options additional options for controlling the output + * @param rangeCallback receives the resolved revision range; called + * exactly once before #lineCallback + * @param lineCallback callback to receive the file content and the other + * information for every line in the file * @throws ClientException - * @since 1.9 + * @since 1.12 + */ + void blame(String path, Revision pegRevision, Revision revisionStart, + Revision revisionEnd, boolean ignoreMimeType, + boolean includeMergedRevisions, DiffOptions options, + BlameRangeCallback rangeCallback, + BlameLineCallback lineCallback) + throws ClientException; + + /** + * Retrieve the content together with the author, the revision and the date + * of the last change of each line + * <p> + * Behaves like the 1.12 version but uses BlameCallback instead of + * BlameLineCallback. The former expects that file contents can be + * converted from UTF-8 to a String, which is not true in general + * and may throw exceptions. + * @deprecated Use the 1.12 version with BlameLineCallback */ + @Deprecated void blame(String path, Revision pegRevision, Revision revisionStart, Revision revisionEnd, boolean ignoreMimeType, boolean includeMergedRevisions, BlameCallback callback, DiffOptions options) - throws ClientException; + throws ClientException; /** * Retrieve the content together with the author, the revision and the date @@ -1412,12 +1432,14 @@ public interface ISVNClient * <p> * Behaves like the 1.9 version with <code>options</code> set to * their default values. + * @deprecated Use the 1.12 version with BlameLineCallback */ + @Deprecated void blame(String path, Revision pegRevision, Revision revisionStart, Revision revisionEnd, boolean ignoreMimeType, boolean includeMergedRevisions, BlameCallback callback) - throws ClientException; + throws ClientException; /** * Set directory for the configuration information, taking the Modified: subversion/branches/swig-py3/subversion/bindings/javahl/src/org/apache/subversion/javahl/NativeResources.java URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/bindings/javahl/src/org/apache/subversion/javahl/NativeResources.java?rev=1862754&r1=1862753&r2=1862754&view=diff ============================================================================== --- subversion/branches/swig-py3/subversion/bindings/javahl/src/org/apache/subversion/javahl/NativeResources.java (original) +++ subversion/branches/swig-py3/subversion/bindings/javahl/src/org/apache/subversion/javahl/NativeResources.java Mon Jul 8 15:19:03 2019 @@ -142,7 +142,7 @@ public class NativeResources private static final void init() { final int SVN_VER_MAJOR = 1; - final int SVN_VER_MINOR = 12; + final int SVN_VER_MINOR = 13; initNativeLibrary(); version = new Version(); if (!version.isAtLeast(SVN_VER_MAJOR, SVN_VER_MINOR, 0)) Modified: subversion/branches/swig-py3/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java?rev=1862754&r1=1862753&r2=1862754&view=diff ============================================================================== --- subversion/branches/swig-py3/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java (original) +++ subversion/branches/swig-py3/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java Mon Jul 8 15:19:03 2019 @@ -30,6 +30,7 @@ import java.io.OutputStream; import java.io.FileOutputStream; import java.io.FileNotFoundException; import java.io.ByteArrayOutputStream; +import java.io.UnsupportedEncodingException; import java.util.Collection; import java.util.Collections; @@ -705,6 +706,7 @@ public class SVNClient implements ISVNCl boolean ignoreExternals) throws ClientException; + @Deprecated public void blame(String path, Revision pegRevision, Revision revisionStart, Revision revisionEnd, boolean ignoreMimeType, @@ -716,13 +718,28 @@ public class SVNClient implements ISVNCl includeMergedRevisions, callback, null); } + @Deprecated + public void blame(String path, Revision pegRevision, + Revision revisionStart, + Revision revisionEnd, boolean ignoreMimeType, + boolean includeMergedRevisions, + BlameCallback callback, + DiffOptions options) + throws ClientException + { + blame(path, pegRevision, revisionStart, revisionEnd, + ignoreMimeType, includeMergedRevisions, options, + null, new BlameCallbackAdapter(callback)); + } + public native void blame(String path, Revision pegRevision, Revision revisionStart, Revision revisionEnd, boolean ignoreMimeType, boolean includeMergedRevisions, - BlameCallback callback, - DiffOptions options) - throws ClientException; + DiffOptions options, + BlameRangeCallback rangeCallback, + BlameLineCallback lineCallback) + throws ClientException; public native void setConfigDirectory(String configDir) throws ClientException; @@ -897,4 +914,42 @@ public class SVNClient implements ISVNCl null); } } + + /** + * A private class that adapts from BlameLineCallback to BlameCallback. + */ + @Deprecated + private class BlameCallbackAdapter implements BlameLineCallback + { + private BlameCallback wrappedCallback = null; + + public BlameCallbackAdapter(BlameCallback callback) + { + wrappedCallback = callback; + } + + // Implementation of BlameLineCallback + public void singleLine(long lineNum, long revision, + Map<String, byte[]> revProps, long mergedRevision, + Map<String, byte[]> mergedRevProps, + String mergedPath, boolean localChange, + byte[] line) + throws ClientException + { + if (wrappedCallback == null) + return; + + String convertedLine = null; + try { + convertedLine = new String(line, "UTF-8"); + } + catch (UnsupportedEncodingException ex) { + throw ClientException.fromException(ex); + } + + wrappedCallback.singleLine(lineNum, revision, + revProps, mergedRevision, mergedRevProps, + mergedPath, convertedLine, localChange); + } + } } Modified: subversion/branches/swig-py3/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/BlameCallback.java URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/BlameCallback.java?rev=1862754&r1=1862753&r2=1862754&view=diff ============================================================================== --- subversion/branches/swig-py3/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/BlameCallback.java (original) +++ subversion/branches/swig-py3/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/BlameCallback.java Mon Jul 8 15:19:03 2019 @@ -31,7 +31,9 @@ import org.apache.subversion.javahl.ISVN /** * This interface is used to receive every single line for a file on a * the {@link ISVNClient#blame} call. + * @deprecated use {@link BlameLineCallback} instead. */ +@Deprecated public interface BlameCallback { /** Modified: subversion/branches/swig-py3/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/RevisionRange.java URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/RevisionRange.java?rev=1862754&r1=1862753&r2=1862754&view=diff ============================================================================== --- subversion/branches/swig-py3/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/RevisionRange.java (original) +++ subversion/branches/swig-py3/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/RevisionRange.java Mon Jul 8 15:19:03 2019 @@ -160,7 +160,7 @@ public class RevisionRange implements Co { val = ((Revision.Number) rev).getNumber(); } - return new Long(val); + return Long.valueOf(val); } public int hashCode() Modified: subversion/branches/swig-py3/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java?rev=1862754&r1=1862753&r2=1862754&view=diff ============================================================================== --- subversion/branches/swig-py3/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java (original) +++ subversion/branches/swig-py3/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java Mon Jul 8 15:19:03 2019 @@ -22,6 +22,8 @@ */ package org.apache.subversion.javahl; +import static org.junit.Assert.*; + import org.apache.subversion.javahl.callback.*; import org.apache.subversion.javahl.types.*; @@ -2736,7 +2738,7 @@ public class BasicTests extends SVNTests public void singleMessage(Set<ChangePath> changedPaths, long revision, Map<String, byte[]> revprops, boolean hasChildren) - { revList.add(new Long(revision)); } + { revList.add(Long.valueOf(revision)); } }); long[] revisions = new long[revList.size()]; @@ -4093,6 +4095,7 @@ public class BasicTests extends SVNTests * @throws Throwable * @since 1.5 */ + @SuppressWarnings("deprecation") public void testBasicBlame() throws Throwable { OneTest thisTest = new OneTest(); @@ -4122,6 +4125,7 @@ public class BasicTests extends SVNTests * Test blame with diff options. * @since 1.9 */ + @SuppressWarnings("deprecation") public void testBlameWithDiffOptions() throws Throwable { OneTest thisTest = new OneTest(); @@ -4155,6 +4159,49 @@ public class BasicTests extends SVNTests } /** + * Test the new 1.12 blame interface on a file with null bytes. + * @throws Throwable + * @since 1.12 + */ + public void testBinaryBlame() throws Throwable + { + final byte[] lineIn = {0x0, 0x0, 0x0, 0xa}; + final byte[] lineOut = {0x0, 0x0, 0x0}; + + OneTest thisTest = new OneTest(); + // Modify the file iota, adding null bytes. + File iota = new File(thisTest.getWorkingCopy(), "iota"); + FileOutputStream stream = new FileOutputStream(iota, false); + stream.write(lineIn); + stream.close(); + Set<String> srcPaths = new HashSet<String>(1); + srcPaths.add(thisTest.getWCPath()); + try { + client.username("rayjandom"); + client.commit(srcPaths, Depth.infinity, false, false, null, null, + new ConstMsg("NUL bytes written to /iota"), null); + } finally { + client.username("jrandom"); + } + + // Test the current interface + BlameRangeCallbackImpl rangeCallback = new BlameRangeCallbackImpl(); + BlameLineCallbackImpl lineCallback = new BlameLineCallbackImpl(); + client.blame(thisTest.getWCPath() + "/iota", Revision.HEAD, + Revision.getInstance(0), Revision.HEAD, + false, false, null, rangeCallback, lineCallback); + assertEquals(0, rangeCallback.startRevnum); + assertEquals(2, rangeCallback.endRevnum); + assertEquals(1, lineCallback.numberOfLines()); + + BlameLineCallbackImpl.BlameLine line = lineCallback.getBlameLine(0); + assertNotNull(line); + assertEquals(2, line.getRevision()); + assertEquals("rayjandom", line.getAuthor()); + assertArrayEquals(lineOut, line.getLine()); + } + + /** * Test commit of arbitrary revprops. * @throws Throwable * @since 1.5 @@ -4679,6 +4726,7 @@ public class BasicTests extends SVNTests return callback.getMessages(); } + @SuppressWarnings("deprecation") private byte[] collectBlameLines(String path, Revision pegRevision, Revision revisionStart, Revision revisionEnd, @@ -4766,6 +4814,7 @@ public class BasicTests extends SVNTests } /* A blame callback implementation. */ + @SuppressWarnings("deprecation") protected class BlameCallbackImpl implements BlameCallback { @@ -4978,6 +5027,158 @@ public class BasicTests extends SVNTests } } } + + /* A blame range callback implementation. */ + protected class BlameRangeCallbackImpl implements BlameRangeCallback + { + public long startRevnum = -1; + public long endRevnum = -1; + public void setRange(long start, long end) + { + startRevnum = start; + endRevnum = end; + } + } + + /* A blame line callback implementation. */ + protected class BlameLineCallbackImpl implements BlameLineCallback + { + + /** list of blame records (lines) */ + private List<BlameLine> lines = new ArrayList<BlameLine>(); + + public void singleLine(long lineNum, long rev, + Map<String, byte[]> revProps, + long mergedRevision, + Map<String, byte[]> mergedRevProps, + String mergedPath, boolean localChange, + byte[] line) + throws ClientException + { + DateFormat df = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS"); + + try { + insertLine( + df.parse(new String(revProps.get("svn:date"))), + rev, + new String(revProps.get("svn:author")), + mergedRevProps == null ? null + : df.parse(new String(mergedRevProps.get("svn:date"))), + mergedRevision, + mergedRevProps == null ? null + : new String(mergedRevProps.get("svn:author")), + mergedPath, line); + } catch (ParseException e) { + throw ClientException.fromException(e); + } + } + + private Date getDate(Date date, Date merged_date) { + return (merged_date == null ? date : merged_date); + } + + private String getAuthor(String author, String merged_author) { + return (merged_author == null ? author : merged_author); + } + + private long getRevision(long revision, long merged_revision) { + return (merged_revision == -1 ? revision : merged_revision); + } + + private void insertLine(Date date, long revision, String author, + Date merged_date, long merged_revision, + String merged_author, String merged_path, + byte[] line) + { + this.lines.add(new BlameLine(getRevision(revision, merged_revision), + getAuthor(author, merged_author), + getDate(date, merged_date), + line)); + } + + /** + * Retrieve the number of line of blame information + * @return number of lines of blame information + */ + public int numberOfLines() + { + return this.lines.size(); + } + + /** + * Retrieve blame information for specified line number + * @param i the line number to retrieve blame information about + * @return Returns object with blame information for line + */ + public BlameLine getBlameLine(int i) + { + if (i >= this.lines.size()) + { + return null; + } + return this.lines.get(i); + } + + /** + * Class represeting one line of the lines, i.e. a blame record + */ + public final class BlameLine + { + private long revision; + private String author; + private Date changed; + private byte[] line; + + /** + * Constructor + * + * @param revision + * @param author + * @param changed + * @param line + */ + public BlameLine(long revision, String author, + Date changed, byte[] line) + { + this.revision = revision; + this.author = author; + this.changed = changed; + this.line = line; + } + + /** + * @return Returns the author. + */ + public String getAuthor() + { + return author; + } + + /** + * @return Returns the date changed. + */ + public Date getChanged() + { + return changed; + } + + /** + * @return Returns the source line content. + */ + public byte[] getLine() + { + return line; + } + + /** + * @return Returns the revision. + */ + public long getRevision() + { + return revision; + } + } + } /** A helper which calls update with a bunch of default args. */ private long update(OneTest thisTest) Modified: subversion/branches/swig-py3/subversion/bindings/javahl/tests/org/apache/subversion/javahl/ExceptionTests.java URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/bindings/javahl/tests/org/apache/subversion/javahl/ExceptionTests.java?rev=1862754&r1=1862753&r2=1862754&view=diff ============================================================================== --- subversion/branches/swig-py3/subversion/bindings/javahl/tests/org/apache/subversion/javahl/ExceptionTests.java (original) +++ subversion/branches/swig-py3/subversion/bindings/javahl/tests/org/apache/subversion/javahl/ExceptionTests.java Mon Jul 8 15:19:03 2019 @@ -206,18 +206,17 @@ public class ExceptionTests extends SVNT { client.blame(thisTest.getWorkingCopy() + "/iota", Revision.getInstance(1), Revision.getInstance(1), - Revision.getInstance(1), false, false, - new BlameCallback() - { - public void singleLine(long lineNum, long revision, - Map<String, byte[]> revProps, long mergedRevision, - Map<String, byte[]> mergedRevProps, - String mergedPath, String line, - boolean localChange) - { - throw new TestException("inner", theException); - } - }); + Revision.getInstance(1), false, false, null, null, + new BlameLineCallback() { + public void singleLine(long lineNum, long revision, + Map<String, byte[]> revProps, long mergedRevision, + Map<String, byte[]> mergedRevProps, + String mergedPath, boolean localChange, + byte[] line) + { + throw new TestException("inner", theException); + } + }); } catch (ClientException e) { Modified: subversion/branches/swig-py3/subversion/bindings/javahl/tests/org/apache/subversion/javahl/SVNRemoteTests.java URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/bindings/javahl/tests/org/apache/subversion/javahl/SVNRemoteTests.java?rev=1862754&r1=1862753&r2=1862754&view=diff ============================================================================== --- subversion/branches/swig-py3/subversion/bindings/javahl/tests/org/apache/subversion/javahl/SVNRemoteTests.java (original) +++ subversion/branches/swig-py3/subversion/bindings/javahl/tests/org/apache/subversion/javahl/SVNRemoteTests.java Mon Jul 8 15:19:03 2019 @@ -1383,9 +1383,9 @@ public class SVNRemoteTests extends SVNT { ISVNRemote session = getSession(); - Long expected = new Long(1L); + Long expected = Long.valueOf(1L); ArrayList<Long> revs = new ArrayList<Long>(3); - revs.add(new Long(0L)); + revs.add(Long.valueOf(0L)); revs.add(expected); Map<Long, String> locs = session.getLocations("A", 1, revs); Modified: subversion/branches/swig-py3/subversion/bindings/swig/core.i URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/bindings/swig/core.i?rev=1862754&r1=1862753&r2=1862754&view=diff ============================================================================== --- subversion/branches/swig-py3/subversion/bindings/swig/core.i (original) +++ subversion/branches/swig-py3/subversion/bindings/swig/core.i Mon Jul 8 15:19:03 2019 @@ -829,6 +829,7 @@ core_set_current_pool (apr_pool_t *pool) %include svn_error_codes_h.swg %include svn_time_h.swg +%include svn_types_impl_h.swg %include svn_types_h.swg %include svn_pools_h.swg %include svn_version_h.swg @@ -840,6 +841,7 @@ core_set_current_pool (apr_pool_t *pool) %include svn_props_h.swg #pragma SWIG nowarn=+305 +%include svn_opt_impl_h.swg %include svn_opt_h.swg %include svn_cmdline_h.swg %include svn_auth_h.swg Modified: subversion/branches/swig-py3/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c?rev=1862754&r1=1862753&r2=1862754&view=diff ============================================================================== --- subversion/branches/swig-py3/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c (original) +++ subversion/branches/swig-py3/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c Mon Jul 8 15:19:03 2019 @@ -47,7 +47,7 @@ #include "svn_mergeinfo.h" #include "svn_types.h" -#include "svn_private_config.h" /* for SVN_APR_INT64_T_PYCFMT */ +#include "svn_private_config.h" #include "swig_python_external_runtime.swg" #include "swigutil_py.h" @@ -3778,12 +3778,12 @@ svn_error_t *svn_swig_py_client_blame_re if ((result = PyObject_CallFunction(receiver, (char *) #if IS_PY3 - (SVN_APR_INT64_T_PYCFMT "lyyyO&"), + "LlyyyO&", #else - (SVN_APR_INT64_T_PYCFMT "lsssO&"), + "LlsssO&", #endif - line_no, revision, author, date, line, - make_ob_pool, pool)) == NULL) + (PY_LONG_LONG)line_no, revision, author, + date, line, make_ob_pool, pool)) == NULL) { err = callback_exception_error(); } Modified: subversion/branches/swig-py3/subversion/bindings/swig/python/svn/core.py URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/bindings/swig/python/svn/core.py?rev=1862754&r1=1862753&r2=1862754&view=diff ============================================================================== --- subversion/branches/swig-py3/subversion/bindings/swig/python/svn/core.py (original) +++ subversion/branches/swig-py3/subversion/bindings/swig/python/svn/core.py Mon Jul 8 15:19:03 2019 @@ -331,7 +331,7 @@ def run_app(func, *args, **kw): # 'apr_pool_clear' 'apr_pool_destroy' 'apr_pool_t' # 'apr_time_ansi_put' # 'run_app' -# 'svn_relpath__internal_style' 'svn_uri__is_ancestor' +# 'svn_uri__is_ancestor' # 'svn_tristate__from_word' 'svn_tristate__to_word' __all__ = [s for s in _as_list(locals()) if (s.startswith('svn_') Modified: subversion/branches/swig-py3/subversion/bindings/swig/ruby/test/test_delta.rb URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/bindings/swig/ruby/test/test_delta.rb?rev=1862754&r1=1862753&r2=1862754&view=diff ============================================================================== --- subversion/branches/swig-py3/subversion/bindings/swig/ruby/test/test_delta.rb (original) +++ subversion/branches/swig-py3/subversion/bindings/swig/ruby/test/test_delta.rb Mon Jul 8 15:19:03 2019 @@ -211,29 +211,32 @@ class SvnDeltaTest < Test::Unit::TestCas assert_equal(target_text, data) end - def test_path_driver - editor = Svn::Delta::BaseEditor.new - sorted_paths = [] - callback = Proc.new do |parent_baton, path| - sorted_paths << path - end - - targets = [ - "/", - "/file1", - "/dir1", - "/dir2/file2", - "/dir2/dir3/file3", - "/dir2/dir3/file4" - ] - 10.times do - x = rand(targets.size) - y = rand(targets.size) - targets[x], targets[y] = targets[y], targets[x] - end - Svn::Delta.path_driver(editor, 0, targets, &callback) - assert_equal(targets.sort, sorted_paths) - end +# Fails since r1852536: "delta path editor binding broken for root path" +# https://issues.apache.org/jira/browse/SVN-4805 +# +# def test_path_driver +# editor = Svn::Delta::BaseEditor.new +# sorted_paths = [] +# callback = Proc.new do |parent_baton, path| +# sorted_paths << path +# end +# +# targets = [ +# "/", +# "/file1", +# "/dir1", +# "/dir2/file2", +# "/dir2/dir3/file3", +# "/dir2/dir3/file4" +# ] +# 10.times do +# x = rand(targets.size) +# y = rand(targets.size) +# targets[x], targets[y] = targets[y], targets[x] +# end +# Svn::Delta.path_driver(editor, 0, targets, &callback) +# assert_equal(targets.sort, sorted_paths) +# end def test_changed dir = "changed_dir" Modified: subversion/branches/swig-py3/subversion/include/private/svn_client_mtcc.h URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/include/private/svn_client_mtcc.h?rev=1862754&r1=1862753&r2=1862754&view=diff ============================================================================== --- subversion/branches/swig-py3/subversion/include/private/svn_client_mtcc.h (original) +++ subversion/branches/swig-py3/subversion/include/private/svn_client_mtcc.h Mon Jul 8 15:19:03 2019 @@ -207,6 +207,17 @@ svn_client__mtcc_check_path(svn_node_kin /** Commits all operations stored in @a mtcc as a new revision and destroys * @a mtcc. * + * A log message is obtained from the log message callback in the client + * context in @a mtcc. + * + * @a revprop_table (if non-NULL) supplies additional revision properties; + * it may not supply any "svn:*" revision properties. + * + * As with svn_ra_get_commit_editor3(), after the commit has succeeded, + * it will invoke @a commit_callback (if non-NULL) with filled-in + * #svn_commit_info_t *, @a commit_baton, and @a scratch_pool or some subpool + * thereof as arguments. + * * @since New in 1.9. */ svn_error_t * Modified: subversion/branches/swig-py3/subversion/include/private/svn_client_private.h URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/include/private/svn_client_private.h?rev=1862754&r1=1862753&r2=1862754&view=diff ============================================================================== --- subversion/branches/swig-py3/subversion/include/private/svn_client_private.h (original) +++ subversion/branches/swig-py3/subversion/include/private/svn_client_private.h Mon Jul 8 15:19:03 2019 @@ -374,13 +374,6 @@ svn_client__shelf_diff(svn_client__shelf /* Set *DIFF_PROCESSOR to a diff processor that will report a diff summary to SUMMARIZE_FUNC. - P_ROOT_RELPATH will return a pointer to a string that must be set, - before the processor is called, to a prefix that will be found on - every DIFF_PROCESSOR relpath, that will be removed before passing - the path to SUMMARIZE_FUNC. - - ORIGINAL_TARGET is not used. - SUMMARIZE_FUNC is called with SUMMARIZE_BATON as parameter by the created callbacks for each changed item. */ @@ -392,16 +385,16 @@ svn_client__get_diff_summarize_callbacks apr_pool_t *result_pool, apr_pool_t *scratch_pool); -/* Copy a directory tree or a file (according to KIND) from SRC_URL @ SRC_REV, - * to DST_ABSPATH in a WC. +/** Copy a directory tree or a file (according to @a kind) from @a src_url at + * @a src_rev, to @a dst_abspath in a WC. * - * The caller should be holding a WC write lock that allows DST_ABSPATH to - * be created, such as on the parent of DST_ABSPATH. + * The caller should be holding a WC write lock that allows @a dst_abspath to + * be created, such as on the parent of @a dst_abspath. * * If not same repositories, then remove any svn:mergeinfo property. * - * Use RA_SESSION to fetch the data. The session may point to a different - * URL after returning. + * Use @a ra_session to fetch the data. The session may point to any URL + * within the source repository. * * This API does not process any externals definitions that may be present * on copied directories. @@ -416,15 +409,15 @@ svn_client__repos_to_wc_copy_internal(sv svn_client_ctx_t *ctx, apr_pool_t *scratch_pool); -/* Copy a directory tree or a file (according to KIND) from SRC_URL @ SRC_REV, - * to DST_ABSPATH in a WC. +/** Copy a directory tree or a file (according to @a kind) from @a src_url at + * @a src_rev, to @a dst_abspath in a WC. * - * The caller should be holding a WC write lock that allows DST_ABSPATH to - * be created, such as on the parent of DST_ABSPATH. + * The caller should be holding a WC write lock that allows @a dst_abspath to + * be created, such as on the parent of @a dst_abspath. * * If not same repositories, then remove any svn:mergeinfo property. * - * Use RA_SESSION to fetch the data. The session may point to a different + * Use @a ra_session to fetch the data. The session may point to a different * URL after returning. * * This API does not process any externals definitions that may be present @@ -445,11 +438,19 @@ svn_client__repos_to_wc_copy_by_editor(s * Return an editor in @a *editor_p, @a *edit_baton_p that will apply * local modifications to the WC subdirectory at @a dst_abspath. * + * The @a path arguments to the editor methods shall be local WC paths, + * relative to @a dst_abspath. The @a copyfrom_path arguments to the + * editor methods shall be URLs. + * * Send notifications via @a notify_func / @a notify_baton. + * ### INCOMPLETE * - * RA_SESSION is used to fetch the original content for copies. + * @a ra_session is used to fetch the original content for copies. * * Ignore changes to non-regular property (entry-props, DAV/WC-props). + * + * Acquire the WC write lock in 'open_root' and release it in + * 'close_edit', in 'abort_edit', or when @a result_pool is cleared. */ svn_error_t * svn_client__wc_editor(const svn_delta_editor_t **editor_p, @@ -471,6 +472,10 @@ svn_client__wc_editor(const svn_delta_ed * * If @a ignore_mergeinfo_changes is true, ignore any incoming changes * to the 'svn:mergeinfo' property. + * + * If @a manage_wc_write_lock is true, acquire the WC write lock in + * 'open_root' and release it in 'close_edit', in 'abort_edit', or + * when @a result_pool is cleared. */ svn_error_t * svn_client__wc_editor_internal(const svn_delta_editor_t **editor_p, @@ -478,6 +483,7 @@ svn_client__wc_editor_internal(const svn const char *dst_abspath, svn_boolean_t root_dir_add, svn_boolean_t ignore_mergeinfo_changes, + svn_boolean_t manage_wc_write_lock, svn_wc_notify_func2_t notify_func, void *notify_baton, svn_ra_session_t *ra_session, @@ -488,7 +494,17 @@ svn_client__wc_editor_internal(const svn * * Committable changes are found in TARGETS:DEPTH:CHANGELISTS. * - * Send the changes to EDITOR:EDIT_BATON. + * Send the changes to @a editor:@a edit_baton. The @a path arguments + * to the editor methods are URL-paths relative to the URL of + * @a src_wc_abspath. + * + * ### We will presumably need to change this so that the @a path + * arguments to the editor will be local WC relpaths, in order + * to handle switched paths. + * + * The @a copyfrom_path arguments to the editor methods are URLs. As the + * WC does not store copied-from-foreign-repository metadata, the URL will + * be in the same repository as the URL of its parent path. * * Compared with svn_client__do_commit(), this (like svn_client_commit6) * handles: @@ -506,14 +522,35 @@ svn_client__wc_editor_internal(const svn * - removing locks and changelists in WC */ svn_error_t * -svn_client__wc_replay(const apr_array_header_t *targets, +svn_client__wc_replay(const char *src_wc_abspath, + const apr_array_header_t *targets, svn_depth_t depth, const apr_array_header_t *changelists, const svn_delta_editor_t *editor, void *edit_baton, + svn_wc_notify_func2_t notify_func, + void *notify_baton, svn_client_ctx_t *ctx, apr_pool_t *scratch_pool); +/** Copy local modifications from one WC subtree to another. + * + * Find local modifications under @a src_wc_abspath, in the same way as + * for a commit. + * + * Edit the WC at @a dst_wc_abspath, applying those modifications to the + * current working state to produce a new working state. + * + * The source and destination may be in the same WC or in different WCs. + */ +svn_error_t * +svn_client__wc_copy_mods(const char *src_wc_abspath, + const char *dst_wc_abspath, + svn_wc_notify_func2_t notify_func, + void *notify_baton, + svn_client_ctx_t *ctx, + apr_pool_t *scratch_pool); + #ifdef __cplusplus } #endif /* __cplusplus */ Modified: subversion/branches/swig-py3/subversion/include/private/svn_fs_fs_private.h URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/include/private/svn_fs_fs_private.h?rev=1862754&r1=1862753&r2=1862754&view=diff ============================================================================== --- subversion/branches/swig-py3/subversion/include/private/svn_fs_fs_private.h (original) +++ subversion/branches/swig-py3/subversion/include/private/svn_fs_fs_private.h Mon Jul 8 15:19:03 2019 @@ -255,22 +255,6 @@ typedef struct svn_fs_fs__stats_t apr_hash_t *by_extension; } svn_fs_fs__stats_t; - -/* Scan all contents of the repository FS and return statistics in *STATS, - * allocated in RESULT_POOL. Report progress through PROGRESS_FUNC with - * PROGRESS_BATON, if PROGRESS_FUNC is not NULL. - * Use SCRATCH_POOL for temporary allocations. - */ -svn_error_t * -svn_fs_fs__get_stats(svn_fs_fs__stats_t **stats, - svn_fs_t *fs, - svn_fs_progress_notify_func_t progress_func, - void *progress_baton, - svn_cancel_func_t cancel_func, - void *cancel_baton, - apr_pool_t *result_pool, - apr_pool_t *scratch_pool); - /* A node-revision ID in FSFS consists of 3 sub-IDs ("parts") that consist * of a creation REVISION number and some revision- / transaction-local * counter value (NUMBER). Old-style ID parts use global counter values. @@ -325,33 +309,49 @@ typedef svn_error_t * void *baton, apr_pool_t *scratch_pool); -/* Read the P2L index for the rev / pack file containing REVISION in FS. - * For each index entry, invoke CALLBACK_FUNC with CALLBACK_BATON. - * If not NULL, call CANCEL_FUNC with CANCEL_BATON from time to time. - * Use SCRATCH_POOL for temporary allocations. - */ -svn_error_t * -svn_fs_fs__dump_index(svn_fs_t *fs, - svn_revnum_t revision, - svn_fs_fs__dump_index_func_t callback_func, - void *callback_baton, - svn_cancel_func_t cancel_func, - void *cancel_baton, - apr_pool_t *scratch_pool); +typedef struct svn_fs_fs__ioctl_get_stats_input_t +{ + svn_fs_progress_notify_func_t progress_func; + void *progress_baton; +} svn_fs_fs__ioctl_get_stats_input_t; +typedef struct svn_fs_fs__ioctl_get_stats_output_t +{ + svn_fs_fs__stats_t *stats; +} svn_fs_fs__ioctl_get_stats_output_t; -/* Rewrite the respective index information of the rev / pack file in FS - * containing REVISION and use the svn_fs_fs__p2l_entry_t * array ENTRIES - * as the new index contents. Allocate temporaries from SCRATCH_POOL. - * - * Note that this becomes a no-op if ENTRIES is empty. You may use a zero- - * sized empty entry instead. - */ -svn_error_t * -svn_fs_fs__load_index(svn_fs_t *fs, - svn_revnum_t revision, - apr_array_header_t *entries, - apr_pool_t *scratch_pool); +SVN_FS_DECLARE_IOCTL_CODE(SVN_FS_FS__IOCTL_GET_STATS, SVN_FS_TYPE_FSFS, 1000); + +typedef struct svn_fs_fs__ioctl_dump_index_input_t +{ + svn_revnum_t revision; + svn_fs_fs__dump_index_func_t callback_func; + void *callback_baton; +} svn_fs_fs__ioctl_dump_index_input_t; + +SVN_FS_DECLARE_IOCTL_CODE(SVN_FS_FS__IOCTL_DUMP_INDEX, SVN_FS_TYPE_FSFS, 1001); + +typedef struct svn_fs_fs__ioctl_load_index_input_t +{ + svn_revnum_t revision; + /* Array of svn_fs_fs__p2l_entry_t * entries. */ + apr_array_header_t *entries; +} svn_fs_fs__ioctl_load_index_input_t; + +SVN_FS_DECLARE_IOCTL_CODE(SVN_FS_FS__IOCTL_LOAD_INDEX, SVN_FS_TYPE_FSFS, 1002); + +typedef struct svn_fs_fs__ioctl_revision_size_input_t +{ + svn_revnum_t revision; +} svn_fs_fs__ioctl_revision_size_input_t; + +typedef struct svn_fs_fs__ioctl_revision_size_output_t +{ + apr_off_t rev_size; +} svn_fs_fs__ioctl_revision_size_output_t; + +/* See svn_fs_fs__revision_size(). */ +SVN_FS_DECLARE_IOCTL_CODE(SVN_FS_FS__IOCTL_REVISION_SIZE, SVN_FS_TYPE_FSFS, 1003); #ifdef __cplusplus } Modified: subversion/branches/swig-py3/subversion/include/private/svn_wc_private.h URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/include/private/svn_wc_private.h?rev=1862754&r1=1862753&r2=1862754&view=diff ============================================================================== --- subversion/branches/swig-py3/subversion/include/private/svn_wc_private.h (original) +++ subversion/branches/swig-py3/subversion/include/private/svn_wc_private.h Mon Jul 8 15:19:03 2019 @@ -348,9 +348,9 @@ svn_wc__get_wcroot(const char **wcroot_a apr_pool_t *result_pool, apr_pool_t *scratch_pool); -/** Set @a *dir to the abspath of the directory in which shelved patches - * are stored, which is inside the WC's administrative directory, and ensure - * the directory exists. +/** Set @a *dir to the abspath of the directory in which administrative + * data for experimental features may be stored. This directory is inside + * the WC's administrative directory. Ensure the directory exists. * * @a local_abspath is any path in the WC, and is used to find the WC root. * @@ -358,11 +358,11 @@ svn_wc__get_wcroot(const char **wcroot_a */ SVN_EXPERIMENTAL svn_error_t * -svn_wc__get_shelves_dir(char **dir, - svn_wc_context_t *wc_ctx, - const char *local_abspath, - apr_pool_t *result_pool, - apr_pool_t *scratch_pool); +svn_wc__get_experimental_dir(char **dir, + svn_wc_context_t *wc_ctx, + const char *local_abspath, + apr_pool_t *result_pool, + apr_pool_t *scratch_pool); /** * The following are temporary APIs to aid in the transition from wc-1 to @@ -635,6 +635,24 @@ svn_wc__find_working_nodes_with_basename apr_pool_t *result_pool, apr_pool_t *scratch_pool); +/* Return an array of const char * elements, which represent local absolute + * paths for nodes, within the working copy indicated by WRI_ABSPATH, which + * are copies of REPOS_RELPATH and have node kind KIND. + * If no such nodes exist, return an empty array. + * + * This function returns only paths to nodes which are present in the highest + * layer of the WC. In other words, paths to deleted and/or excluded nodes are + * never returned. + */ +svn_error_t * +svn_wc__find_copies_of_repos_path(apr_array_header_t **abspaths, + const char *wri_abspath, + const char *repos_relpath, + svn_node_kind_t kind, + svn_wc_context_t *wc_ctx, + apr_pool_t *result_pool, + apr_pool_t *scratch_pool); + /* Get the working revision of @a local_abspath using @a wc_ctx. If @a * local_abspath is not in the working copy, return @c * SVN_ERR_WC_PATH_NOT_FOUND. Modified: subversion/branches/swig-py3/subversion/include/svn_client.h URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/include/svn_client.h?rev=1862754&r1=1862753&r2=1862754&view=diff ============================================================================== --- subversion/branches/swig-py3/subversion/include/svn_client.h (original) +++ subversion/branches/swig-py3/subversion/include/svn_client.h Mon Jul 8 15:19:03 2019 @@ -736,16 +736,11 @@ typedef svn_error_t *(*svn_client_get_co * @{ */ -/** Callback type used by svn_client_blame5() to notify the caller +/** Callback type used by svn_client_blame6() to notify the caller * that line @a line_no of the blamed file was last changed in @a revision * which has the revision properties @a rev_props, and that the contents were * @a line. * - * @a start_revnum and @a end_revnum contain the start and end revision - * number of the entire blame operation, as determined from the repository - * inside svn_client_blame5(). This can be useful for the blame receiver - * to format the blame output. - * * If svn_client_blame5() was called with @a include_merged_revisions set to * TRUE, @a merged_revision, @a merged_rev_props and @a merged_path will be * set, otherwise they will be NULL. @a merged_path will be set to the @@ -758,6 +753,49 @@ typedef svn_error_t *(*svn_client_get_co * will be true if the reason there is no blame information is that the line * was modified locally. In all other cases @a local_change will be false. * + * Character Encoding and Line Splitting: + * + * It is up to the client to determine the character encoding. The @a line + * content is delivered without any encoding conversion. The line splitting + * is designed to work with ASCII-compatible encodings including UTF-8. Any + * of the byte sequences LF ("\n"), CR ("\n"), CR LF ("\r\n") ends a line + * and is not included in @a line. The @a line content can include all other + * byte values including zero (ASCII NUL). + * + * @note That is how line splitting is done on the final file content, from + * which this callback is driven. It is not entirely clear whether the line + * splitting used to calculate diffs between each revision and assign a + * revision number to each line is exactly compatible with this in all cases. + * + * Blaming files that have <tt>svn:mime-type</tt> set to something other + * than <tt>text/...</tt> requires the @a ignore_mime_type flag to be set to + * true when calling the svn_client_blame6 function. + * + * @since New in 1.12. + */ +typedef svn_error_t *(*svn_client_blame_receiver4_t)( + void *baton, + apr_int64_t line_no, + svn_revnum_t revision, + apr_hash_t *rev_props, + svn_revnum_t merged_revision, + apr_hash_t *merged_rev_props, + const char *merged_path, + const svn_string_t *line, + svn_boolean_t local_change, + apr_pool_t *pool); + +/** + * Similar to #svn_client_blame_receiver4_t, but with the @a line parameter + * as a (const char*) instead of an svn_string_t, and the parameters + * @a start_revnum and @a end_revnum contain the start and end revision + * number of the entire blame operation, as resolved from the repository + * inside svn_client_blame6(). + * + * @deprecated Provided for backward compatibility with the 1.11 API. + * To replace @a start_revnum and @a end_revnum, see the corresponding + * output parameters in svn_client_blame6(). + * * @since New in 1.7. */ typedef svn_error_t *(*svn_client_blame_receiver3_t)( @@ -2920,6 +2958,12 @@ svn_client_log(const apr_array_header_t * #SVN_RA_CAPABILITY_GET_FILE_REVS_REVERSE) and the client is 1.9.0 or * newer. * + * Before the first call to @a receiver, set @a *start_revnum_p and + * @a *end_revnum_p to the start and end revision number of the entire + * blame operation, as resolved from the repository. This can be useful + * for the blame receiver to format the blame output. Any or both of these + * arguments may be @c NULL. + * * Use @a diff_options to determine how to compare different revisions of the * target. * @@ -2928,8 +2972,33 @@ svn_client_log(const apr_array_header_t * * Use @a pool for any temporary allocation. * + * @since New in 1.12. + */ +svn_error_t * +svn_client_blame6(svn_revnum_t *start_revnum_p, + svn_revnum_t *end_revnum_p, + const char *path_or_url, + const svn_opt_revision_t *peg_revision, + const svn_opt_revision_t *start, + const svn_opt_revision_t *end, + const svn_diff_file_options_t *diff_options, + svn_boolean_t ignore_mime_type, + svn_boolean_t include_merged_revisions, + svn_client_blame_receiver4_t receiver, + void *receiver_baton, + svn_client_ctx_t *ctx, + apr_pool_t *pool); + + +/** + * Similar to svn_client_blame6(), but with #svn_client_blame_receiver3_t + * as the receiver. + * + * @deprecated Provided for backwards compatibility with the 1.11 API. + * * @since New in 1.7. */ +SVN_DEPRECATED svn_error_t * svn_client_blame5(const char *path_or_url, const svn_opt_revision_t *peg_revision, @@ -2943,9 +3012,8 @@ svn_client_blame5(const char *path_or_ur svn_client_ctx_t *ctx, apr_pool_t *pool); - /** - * Similar to svn_client_blame5(), but with #svn_client_blame_receiver3_t + * Similar to svn_client_blame5(), but with #svn_client_blame_receiver2_t * as the receiver. * * @deprecated Provided for backwards compatibility with the 1.6 API. @@ -4566,8 +4634,10 @@ typedef enum svn_client_conflict_option_ svn_client_conflict_option_sibling_move_dir_merge, /**< @since New in 1.11. */ /* Options for local move vs incoming move on merge. */ - svn_client_conflict_option_both_moved_file_merge, /*< since New in 1.12 */ - svn_client_conflict_option_both_moved_file_move_merge, /*< since New in 1.12 */ + svn_client_conflict_option_both_moved_file_merge, /*< @since New in 1.12 */ + svn_client_conflict_option_both_moved_file_move_merge, /*< @since New in 1.12 */ + svn_client_conflict_option_both_moved_dir_merge, /*< @since New in 1.12 */ + svn_client_conflict_option_both_moved_dir_move_merge, /*< @since New in 1.12 */ } svn_client_conflict_option_id_t; /** @@ -7029,6 +7099,20 @@ svn_client__shelf_delete(const char *nam svn_client_ctx_t *ctx, apr_pool_t *scratch_pool); +/** Get an editor that, when driven, will store changes in @a shelf_version. + * + * @warning EXPERIMENTAL. + */ +SVN_EXPERIMENTAL +svn_error_t * +svn_client__shelf_mods_editor(const svn_delta_editor_t **editor_p, + void **edit_baton_p, + svn_client__shelf_version_t *shelf_version, + svn_wc_notify_func2_t notify_func, + void *notify_baton, + svn_client_ctx_t *ctx, + apr_pool_t *result_pool); + /** Save the local modifications found by @a paths, @a depth, * @a changelists as a new version of @a shelf. * @@ -7072,7 +7156,7 @@ svn_client__shelf_save_new_version3(svn_ * * Leave the shelf's log message and other revprops unchanged. * - * Any #svn_client_shelf_version_t object that refers to a deleted version + * Any #svn_client__shelf_version_t object that refers to a deleted version * will become invalid: attempting to use it will give undefined behaviour. * The given @a shelf_version will remain valid. * @@ -7112,7 +7196,7 @@ svn_client__shelf_get_newest_version(svn apr_pool_t *result_pool, apr_pool_t *scratch_pool); -/** Return in @a versions_p an array of (#svn_client_shelf_version_t *) +/** Return in @a versions_p an array of (#svn_client__shelf_version_t *) * containing all versions of @a shelf. * * The versions will be in chronological order, oldest to newest. @@ -7182,6 +7266,23 @@ svn_client__shelf_unapply(svn_client__sh svn_boolean_t dry_run, apr_pool_t *scratch_pool); +/** Send committable changes found in a shelf to a delta-editor. + * + * Push changes from the @a shelf_version subtree at @a top_relpath + * to @a editor : @a edit_baton. + * + * @warning EXPERIMENTAL. + */ +SVN_EXPERIMENTAL +svn_error_t * +svn_client__shelf_replay(svn_client__shelf_version_t *shelf_version, + const char *top_relpath, + const svn_delta_editor_t *editor, + void *edit_baton, + svn_wc_notify_func2_t notify_func, + void *notify_baton, + apr_pool_t *scratch_pool); + /** Set @a *affected_paths to a hash with one entry for each path affected * by the @a shelf_version. * Modified: subversion/branches/swig-py3/subversion/include/svn_delta.h URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/include/svn_delta.h?rev=1862754&r1=1862753&r2=1862754&view=diff ============================================================================== --- subversion/branches/swig-py3/subversion/include/svn_delta.h (original) +++ subversion/branches/swig-py3/subversion/include/svn_delta.h Mon Jul 8 15:19:03 2019 @@ -495,6 +495,10 @@ svn_txdelta_send_contents(const unsigned * since there's nothing else in the delta application's context to * supply a path for error messages.) * + * The @a source stream will NOT be closed. The @a target stream will be + * closed when the window handler is given a null window to signal the + * end of the delta. + * * @note To avoid lifetime issues, @a error_info is copied into * @a pool or a subpool thereof. */ @@ -859,7 +863,7 @@ svn_txdelta_skip_svndiff_window(apr_file * @c apply_textdelta / @c apply_textdelta_stream and @c close_file * should not refer to a parent directory baton UNLESS the editor has * taken precautions to allocate it in a pool of the appropriate - * lifetime (the @a dir_pool passed to @c open_directory and + * lifetime (the @a result_pool passed to @c open_directory and * @c add_directory definitely does not have the proper lifetime). * In general, it is recommended to simply avoid keeping a parent * directory baton in a file baton. @@ -1285,24 +1289,47 @@ svn_delta_depth_filter_editor(const svn_ /** Callback function type for svn_delta_path_driver(). * * The handler of this callback is given the callback baton @a - * callback_baton, @a path which is a relpath relative to the + * callback_baton, @a editor and @a edit_baton which represent the + * editor being driven, @a relpath which is a relpath relative to the * root of the edit, and the @a parent_baton which represents - * path's parent directory as created by the editor passed to - * svn_delta_path_driver(). + * @a relpath's parent directory as created by the editor. * - * If @a path represents a directory, the handler must return a @a - * *dir_baton for @a path, generated from the same editor (so that the - * driver can later close that directory). - * - * If, however, @a path represents a file, the handler should NOT - * return any file batons. It can close any opened or added files - * immediately, or delay that close until the end of the edit when - * svn_delta_path_driver() returns. + * If the handler deletes the node at @a relpath (and does not replace it + * with an added directory) it must set @a *dir_baton to null or leave + * it unchanged. + * + * If the handler opens (or adds) a directory at @a relpath, it must set + * @a *dir_baton to the directory baton for @a relpath, generated from + * the same editor. The driver will close the directory later. + * + * If the handler opens (or adds) a file at @a relpath, the handler must + * set @a *dir_baton to null or leave it unchanged. The handler must + * either close the file immediately, or delay that close until the end + * of the edit when svn_delta_path_driver() returns. * * Finally, if @a parent_baton is @c NULL, then the root of the edit * is also one of the paths passed to svn_delta_path_driver(). The * handler of this callback must call the editor's open_root() * function and return the top-level root dir baton in @a *dir_baton. + * + * @since New in 1.12. + */ +typedef svn_error_t *(*svn_delta_path_driver_cb_func2_t)( + void **dir_baton, + const svn_delta_editor_t *editor, + void *edit_baton, + void *parent_baton, + void *callback_baton, + const char *relpath, + apr_pool_t *pool); + +/** Like #svn_delta_path_driver_cb_func2_t but without the @a editor and + * @a edit_baton parameters. The user must arrange for the editor to be + * passed through @a callback_baton (if required, which it usually is). + * And @a path could possibly have a '/' prefix instead of being a relpath; + * see the note on svn_delta_path_driver2(). + * + * @deprecated Provided for backward compatibility with the 1.11 API. */ typedef svn_error_t *(*svn_delta_path_driver_cb_func_t)( void **dir_baton, @@ -1312,23 +1339,50 @@ typedef svn_error_t *(*svn_delta_path_dr apr_pool_t *pool); -/** Drive @a editor (with its @a edit_baton) to visit each path in @a paths. +/** Drive @a editor (with its @a edit_baton) to visit each path in @a relpaths. + * * As each path is hit as part of the editor drive, use * @a callback_func and @a callback_baton to allow the caller to handle * the portion of the editor drive related to that path. * - * Each path in @a paths is a (const char *) relpath, relative - * to the root path of the @a edit. The editor drive will be - * performed in the same order as @a paths. The paths should be sorted - * using something like svn_sort_compare_paths to ensure that a depth-first - * pattern is observed for directory/file baton creation. If @a sort_paths + * Each path in @a relpaths is a (const char *) relpath, relative + * to the root path of the edit. The editor drive will be + * performed in the same order as @a relpaths. The paths should be sorted + * using something like svn_sort_compare_paths() to ensure that each + * directory in the depth-first walk is visited only once. If @a sort_paths * is set, the function will sort the paths for you. Some callers may need * further customization of the order (ie. libsvn_delta/compat.c). * + * If the first target path (after any requested sorting) is @c "" (the + * root of the edit), the callback function will be responsible for + * calling the editor's @c open_root method; otherwise, this function + * will call @c open_root. + * * Use @a scratch_pool for all necessary allocations. * - * @since New in 1.8. + * @since New in 1.12. + */ +svn_error_t * +svn_delta_path_driver3(const svn_delta_editor_t *editor, + void *edit_baton, + const apr_array_header_t *relpaths, + svn_boolean_t sort_paths, + svn_delta_path_driver_cb_func2_t callback_func, + void *callback_baton, + apr_pool_t *pool); + +/** Like svn_delta_path_driver3() but with a different callback function + * signature. + * + * Optionally, paths in @a paths could have a '/' prefix instead of being + * relpaths. If any of them do, then (since 1.12) ALL paths sent to the + * callback will have a '/' prefix. + * + * @deprecated Provided for backward compatibility with the 1.11 API. + * @since New in 1.8. Before 1.12, paths sent to the callback were the + * exact paths passed in @a paths. */ +SVN_DEPRECATED svn_error_t * svn_delta_path_driver2(const svn_delta_editor_t *editor, void *edit_baton, @@ -1358,6 +1412,80 @@ svn_delta_path_driver(const svn_delta_ed void *callback_baton, apr_pool_t *scratch_pool); + +/** A state object for the path driver that is obtained from + * svn_delta_path_driver_start() and driven by + * svn_delta_path_driver_step() and svn_delta_path_driver_finish(). + * + * @since New in 1.12. + */ +typedef struct svn_delta_path_driver_state_t svn_delta_path_driver_state_t; + +/** Return a path driver object that can drive @a editor (with its + * @a edit_baton) to visit a series of paths. + * + * As each path is hit as part of the editor drive, the path driver will + * call @a callback_func and @a callback_baton to allow the caller to handle + * the portion of the editor drive related to that path. + * + * This will not call the editor's open_root method; for that, see + * svn_delta_path_driver_step(). + * + * @since New in 1.12. + */ +svn_error_t * +svn_delta_path_driver_start(svn_delta_path_driver_state_t **state_p, + const svn_delta_editor_t *editor, + void *edit_baton, + svn_delta_path_driver_cb_func2_t callback_func, + void *callback_baton, + apr_pool_t *result_pool); + +/** Visit @a relpath. + * + * @a state is the object returned by svn_delta_path_driver_start(). + * + * @a relpath is a relpath relative to the root path of the edit. + * + * This function uses the editor and the callback that were originally + * supplied to svn_delta_path_driver_start(). + * + * This drives the editor in a depth-first order, closing and then opening + * directories if necessary to move from the last visited path to the new + * path, as required by the editor driving rules. + * + * This then calls the callback to allow the caller to handle + * the portion of the editor drive related to that path. + * + * If the first path to visit is @c "" (the root of the edit), the + * callback function will be responsible for calling the editor's + * @c open_root method; otherwise, this function will call @c open_root. + * + * The order of paths to visit should in general be sorted using something + * like svn_sort_compare_paths() to ensure that each directory in the + * depth-first walk is visited only once. Some editors may rely on such a + * restriction. + * + * @since New in 1.12. + */ +svn_error_t * +svn_delta_path_driver_step(svn_delta_path_driver_state_t *state, + const char *relpath, + apr_pool_t *scratch_pool); + +/** Finish driving the editor. + * + * @a state is the object returned by svn_delta_path_driver_start(). + * + * This drives the editor to close any open directories and then calls + * the editor's @c close_edit method. + * + * @since New in 1.12. + */ +svn_error_t * +svn_delta_path_driver_finish(svn_delta_path_driver_state_t *state, + apr_pool_t *scratch_pool); + /** @} */ Modified: subversion/branches/swig-py3/subversion/include/svn_dirent_uri.h URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/include/svn_dirent_uri.h?rev=1862754&r1=1862753&r2=1862754&view=diff ============================================================================== --- subversion/branches/swig-py3/subversion/include/svn_dirent_uri.h (original) +++ subversion/branches/swig-py3/subversion/include/svn_dirent_uri.h Mon Jul 8 15:19:03 2019 @@ -66,7 +66,6 @@ * - @c svn_relpath_canonicalize() * - @c svn_relpath_canonicalize_safe() * - @c svn_relpath_is_canonical() - * - @c svn_relpath__internal_style() * - @c svn_uri_canonicalize() * - @c svn_uri_canonicalize_safe() * - @c svn_uri_is_canonical() @@ -200,18 +199,6 @@ const char * svn_dirent_local_style(const char *dirent, apr_pool_t *result_pool); -/** Convert @a relpath from the local style to the canonical internal style. - * "Local style" means native path separators and "." for the empty path. - * - * Allocate the result in @a result_pool. - * - * @since New in 1.7. - */ -const char * -svn_relpath__internal_style(const char *relpath, - apr_pool_t *result_pool); - - /** Join a base dirent (@a base) with a component (@a component). * * If either @a base or @a component is the empty string, then the other Modified: subversion/branches/swig-py3/subversion/include/svn_error_codes.h URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/include/svn_error_codes.h?rev=1862754&r1=1862753&r2=1862754&view=diff ============================================================================== --- subversion/branches/swig-py3/subversion/include/svn_error_codes.h (original) +++ subversion/branches/swig-py3/subversion/include/svn_error_codes.h Mon Jul 8 15:19:03 2019 @@ -888,6 +888,11 @@ SVN_ERROR_START SVN_ERR_FS_CATEGORY_START + 67, "Content checksums supposedly match but content does not.") + /** @since New in 1.13. */ + SVN_ERRDEF(SVN_ERR_FS_UNRECOGNIZED_IOCTL_CODE, + SVN_ERR_FS_CATEGORY_START + 68, + "Unrecognized filesystem I/O control code") + /* repos errors */ SVN_ERRDEF(SVN_ERR_REPOS_LOCKED, Modified: subversion/branches/swig-py3/subversion/include/svn_fs.h URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/include/svn_fs.h?rev=1862754&r1=1862753&r2=1862754&view=diff ============================================================================== --- subversion/branches/swig-py3/subversion/include/svn_fs.h (original) +++ subversion/branches/swig-py3/subversion/include/svn_fs.h Mon Jul 8 15:19:03 2019 @@ -3503,6 +3503,54 @@ svn_fs_info_dup(const void *info, apr_pool_t *result_pool, apr_pool_t *scratch_pool); +/** + * A structure specifying the filesystem-specific input/output operation. + * + * @see svn_fs_ioctl() + * + * @since New in 1.13. + */ +typedef struct svn_fs_ioctl_code_t +{ + const char *fs_type; + int code; +} svn_fs_ioctl_code_t; + +/** + * A convenience macro to declare #svn_fs_ioctl_code_t codes. + * + * @since New in 1.13. + */ +#define SVN_FS_DECLARE_IOCTL_CODE(name, fs_type, code) \ + static const svn_fs_ioctl_code_t name = { fs_type, code } + +/** + * Issue a filesystem-specific input/output operation defined by @a ctlcode + * (usually, a low-level operation which cannot be expressed by other + * filesystem APIs). If @a fs is @c NULL, issue a global operation. + * If @a fs is not @c NULL, issue an operation that is specific to this + * filesystem instance. + * + * If the filesystem cannot handle this ioctl code, return the + * #SVN_ERR_FS_UNRECOGNIZED_IOCTL_CODE error. + * + * Allocate the result in @a result_pool, use @a scratch_pool for temporary + * allocations. + * + * @see #svn_fs_ioctl_code_t + * + * @since New in 1.13. + */ +svn_error_t * +svn_fs_ioctl(svn_fs_t *fs, + svn_fs_ioctl_code_t ctlcode, + void *input, + void **output_p, + svn_cancel_func_t cancel_func, + void *cancel_baton, + apr_pool_t *result_pool, + apr_pool_t *scratch_pool); + /** @} */ #ifdef __cplusplus Modified: subversion/branches/swig-py3/subversion/include/svn_opt.h URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/include/svn_opt.h?rev=1862754&r1=1862753&r2=1862754&view=diff ============================================================================== --- subversion/branches/swig-py3/subversion/include/svn_opt.h (original) +++ subversion/branches/swig-py3/subversion/include/svn_opt.h Mon Jul 8 15:19:03 2019 @@ -27,6 +27,8 @@ #ifndef SVN_OPT_H #define SVN_OPT_H +#include "svn_opt_impl.h" + #include <apr.h> #include <apr_pools.h> #include <apr_getopt.h> @@ -443,43 +445,7 @@ svn_opt_subcommand_help(const char *subc /* Parsing revision and date options. */ - -/** - * Various ways of specifying revisions. - * - * @note - * In contexts where local mods are relevant, the `working' kind - * refers to the uncommitted "working" revision, which may be modified - * with respect to its base revision. In other contexts, `working' - * should behave the same as `committed' or `current'. - */ -enum svn_opt_revision_kind { - /** No revision information given. */ - svn_opt_revision_unspecified, - - /** revision given as number */ - svn_opt_revision_number, - - /** revision given as date */ - svn_opt_revision_date, - - /** rev of most recent change */ - svn_opt_revision_committed, - - /** (rev of most recent change) - 1 */ - svn_opt_revision_previous, - - /** .svn/entries current revision */ - svn_opt_revision_base, - - /** current, plus local mods */ - svn_opt_revision_working, - - /** repository youngest */ - svn_opt_revision_head - - /* please update svn_opt__revision_to_string() when extending this enum */ -}; +/* NOTE: svn_opt_revision_kind is defined in svn_opt_impl.h */ /** * A revision value, which can be specified as a number or a date.
