svn/apache.git
7 years agoOn the 'dump-load-cross-check' branch: remove a done TODO in BRANCH-README,dump-load-cross-checkdump-load-cross-check
Julian Foad [Wed, 4 Feb 2015 15:50:59 +0000 (4 15:50 +0000)]
On the 'dump-load-cross-check' branch: remove a done TODO in BRANCH-README,
and downgrade another TODO item that can be done after reintegrating.

git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/dump-load-cross-check@1657295 13f79535-47bb-0310-9956-ffa450edef68

7 years agoOn the 'dump-load-cross-check' branch: undo intentional weakening of the
Julian Foad [Wed, 4 Feb 2015 15:47:27 +0000 (4 15:47 +0000)]
On the 'dump-load-cross-check' branch: undo intentional weakening of the
test suite's dumpfile parser.

Instead of not recording the number of blank lines between records, rather
at comparison time let the cross-check ignore these numbers selectively. By
default, including when some existing regression tests use the parser, do
not ignore them.

* subversion/tests/cmdline/svntest/sandbox.py
  (Sandbox.verify_repo): Where necessary, tell compare_dump_files() to ignore
    the number of blank lines between records.

* subversion/tests/cmdline/svntest/verify.py
  (DumpParser.parse_one_node): Store the number of blank lines.
  (compare_dump_files): Add a new option to ignore the number of blank lines
    between records.

git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/dump-load-cross-check@1657294 13f79535-47bb-0310-9956-ffa450edef68

7 years agoOn the 'dump-load-cross-check' branch: remove a done TODO in BRANCH-README.
Julian Foad [Wed, 4 Feb 2015 14:18:00 +0000 (4 14:18 +0000)]
On the 'dump-load-cross-check' branch: remove a done TODO in BRANCH-README.

git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/dump-load-cross-check@1657242 13f79535-47bb-0310-9956-ffa450edef68

7 years agoOn the dump-load-cross-check branch: Make the DAV auto tests work with
Branko Cibej [Tue, 3 Feb 2015 15:09:25 +0000 (3 15:09 +0000)]
On the dump-load-cross-check branch: Make the DAV auto tests work with
dump/load cross-checking enabled.

* subversion/tests/cmdline/davautocheck.sh:
   Create an htpasswd entry for the __dumpster__ user.

* subversion/tests/cmdline/svntest/sandbox.py
  (Sandbox.verify_repo): Use the special svnrdump authentication
   for the load phase of the cross-check, too.

git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/dump-load-cross-check@1656753 13f79535-47bb-0310-9956-ffa450edef68

7 years agoOn the dump-load-cross-check branch: Sync with trunk up to r1656714.
Branko Cibej [Tue, 3 Feb 2015 13:15:17 +0000 (3 13:15 +0000)]
On the dump-load-cross-check branch: Sync with trunk up to r1656714.

git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/dump-load-cross-check@1656719 13f79535-47bb-0310-9956-ffa450edef68

7 years agoRename library private type to match our codestyle.
Ivan Zhakov [Tue, 3 Feb 2015 12:54:37 +0000 (3 12:54 +0000)]
Rename library private type to match our codestyle.

* subversion/libsvn_subr/win32_xlate.c
* subversion/libsvn_subr/win32_xlate.h
  (svn_subr__win32_xlate_t): Rename from win32_xlate_t.
  (svn_subr__win32_xlate_open, svn_subr__win32_xlate_to_stringbuf): Update
   signature.

* subversion/libsvn_subr/utf.c
  (xlate_handle_t): Typedef as svn_subr__win32_xlate_t on Windows.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1656714 13f79535-47bb-0310-9956-ffa450edef68

7 years agoResolve a hang in svnserve<->libsvn_ra_svn communication when calling
Bert Huijben [Tue, 3 Feb 2015 12:50:10 +0000 (3 12:50 +0000)]
Resolve a hang in svnserve<->libsvn_ra_svn communication when calling
svn_ra_get_dir2() on a non existing target without obtaining its properties.

* subversion/svnserve/serve.c
  (get_dir): Fetch entries before starting the response, to allow sending
    errors that occured when fetching entries.

Found by: schabi

Reproducable by:
{
  apr_hash_t *tmp;

  SVN_ERR(svn_ra_get_dir2(ra_session, &tmp, NULL, NULL,
                          "non/existing/subdir", 1, SVN_DIRENT_KIND, pool));
}
which is not easy to integrate in our test suite.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1656713 13f79535-47bb-0310-9956-ffa450edef68

7 years agoRefactor code a bit to avoid pointer cast.
Ivan Zhakov [Tue, 3 Feb 2015 12:49:42 +0000 (3 12:49 +0000)]
Refactor code a bit to avoid pointer cast.

* subversion/libsvn_subr/utf.c
  (xlate_handle_t): Define local type that holds xlate handle on
   different platform: win32_xlate_t on Windows and apr_xlate_t on
   other platforms.
  (xlate_handle_node_t, xlate_alloc_handle, convert_to_stringbuf): Use
   new platform depended xlate_handle_t type instead of apr_xlate_t.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1656711 13f79535-47bb-0310-9956-ffa450edef68

7 years ago* subversion/svn/svn.c
Julian Foad [Tue, 3 Feb 2015 12:39:24 +0000 (3 12:39 +0000)]
* subversion/svn/svn.c
  (svn_cl__cmd_table): Refer the reader to 'svn help propset' for details of
    the svn:* special properties, from the help text of each other property
    command.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1656708 13f79535-47bb-0310-9956-ffa450edef68

7 years agoRename svn_ra_dup_session() (public api) to svn_ra__dup_session (private api).
Bert Huijben [Tue, 3 Feb 2015 11:49:13 +0000 (3 11:49 +0000)]
Rename svn_ra_dup_session() (public api) to svn_ra__dup_session (private api).

No functional changes.

* subversion/include/private/svn_ra_private.h
  (svn_ra__dup_session): New function.

* subversion/include/svn_ra.h
  (svn_ra_dup_session): Remove function

* subversion/libsvn_client/diff.c
  (includes): Add svn_ra_private.h.
  (diff_repos_repos): Update caller.

* subversion/libsvn_ra/ra_loader.c
  (svn_ra_dup_session): Rename to...
  (svn_ra__dup_session): ... this.
  (svn_ra_stat): Update caller (in svnserve fallback code).

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1656694 13f79535-47bb-0310-9956-ffa450edef68

7 years agoWhen duplicating an ra_session in ra_serf, properly reset the current
Bert Huijben [Tue, 3 Feb 2015 11:37:20 +0000 (3 11:37 +0000)]
When duplicating an ra_session in ra_serf, properly reset the current
connection to 0 (as initially there is only a single connection)

* subversion/libsvn_ra_serf/get_file.c
  (svn_ra_serf__get_file): Use the same connection for the PROPFIND
    and GET requests, even when there are multiple connections.

* subversion/libsvn_ra_serf/serf.c
  (ra_serf_dup_session): Set cur_connection to 0, to avoid problems when
    the original session used multiple connections.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1656689 13f79535-47bb-0310-9956-ffa450edef68

7 years agoRename a library-private struct to soothe the more pedantic types.
Branko Cibej [Mon, 2 Feb 2015 16:45:08 +0000 (2 16:45 +0000)]
Rename a library-private struct to soothe the more pedantic types.

* subversion/libsvn_client/client.h,
  subversion/libsvn_client/ctx.c,
  subversion/libsvn_client/ra.c
  (svn_client__private_ctx_t): Renamed from client_ctx_t.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1656516 13f79535-47bb-0310-9956-ffa450edef68

7 years agoIntroduce a private libsvn_client context structure that stores
Branko Cibej [Mon, 2 Feb 2015 15:24:16 +0000 (2 15:24 +0000)]
Introduce a private libsvn_client context structure that stores
context information that should not be part of the public API.

* subversion/include/svn_client.h
  (svn_client_ctx_t): Remove the 'progress' field, which should be private.

* subversion/libsvn_client/client.h
  (client_ctx_t): New; the private context struct.
   Contains the equivalent of the 'progress' field.
  (svn_client__get_private_ctx): New prototype.
* subversion/libsvn_client/ctx.c: Include stddef.h and client.h.
  (CLIENT_CTX_MAGIC): New; magic number for the private context.
  (svn_client__get_private_ctx): Implement.
  (svn_client_create_context2): Allocate and initialize the private
   context structure, with the public context embedded within it.
* subversion/libsvn_client/ra.c
  (progress_func): Use the total progress counter from the private context.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1656488 13f79535-47bb-0310-9956-ffa450edef68

7 years agoVarious comment and docstring fixes related to DAG caching.
Stefan Fuhrmann [Sat, 31 Jan 2015 10:27:33 +0000 (31 10:27 +0000)]
Various comment and docstring fixes related to DAG caching.
No functional change.

* subversion/libsvn_fs_fs/tree.c
  (dag_node_cache_get): Remove reference to FS parameter that had been
                        dropped a long time ago.  Fix comment indentation.
  (dag_node_cache_set): Remove outdated comment.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1656176 13f79535-47bb-0310-9956-ffa450edef68

7 years agoAdd a x509-parser command to the tools/dev directory.
Ben Reser [Fri, 30 Jan 2015 02:43:04 +0000 (30 02:43 +0000)]
Add a x509-parser command to the tools/dev directory.

Intended to make it easy to try our X.509 parser out on various certificates
in files or from stdin.

* build.conf
  (x509-parser): Add the command to the build.

* tools/dev/x509-parser.c: New file

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1655922 13f79535-47bb-0310-9956-ffa450edef68

7 years agoFix the X.509 parser to support multiple Relative Distinguished Names (RDN).
Ben Reser [Fri, 30 Jan 2015 02:39:24 +0000 (30 02:39 +0000)]
Fix the X.509 parser to support multiple Relative Distinguished Names (RDN).

Certificates of this nature can be somewhat questionable as to their validity,
but for our purposes it's irrelevant and sometimes people generate certificates
this way.  So simply accept them and ignore the minor semantic difference.

* subversion/libsvn_subr/x509parse.c
  (x509_get_attribute): New function.
  (x509_get_name): Remove the code that went into x509_get_attribute() and
    iterate over the members of the RDN set.  Adjust some variables and
    comments variables to be clearer in the process.

* subversion/tests/libsvn_subr/x509-test.c
  (cert_tests): Add the cert from Chromium's test suite for this.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1655919 13f79535-47bb-0310-9956-ffa450edef68

7 years agoTry to parse issuerUniqueID, subjectUniqueID and
Ben Reser [Fri, 30 Jan 2015 02:37:47 +0000 (30 02:37 +0000)]
Try to parse issuerUniqueID, subjectUniqueID and
extensions for every X.509 certificate version (v1, v2 and v3).

If they aren't present, we are fine, but we don't want to throw an error if
they are.  v1 and v2 certificates with the corresponding extra fields are
ill-formed per RFC 5280 s. 4.1, but we suspect they could exist in the real
world.  Other X.509 parsers (e.g., within OpenSSL or Microsoft CryptoAPI)
aren't picky about these certificates.  As long as we are only willing to
display the certificate data in the 'svn auth' command, we can also be less
strict about them.

* subversion/libsvn_subr/x509parse.c
  (svn_x509_parse_cert): Try to parse issuerUniqueID, subjectUniqueID and
   extensions for all known X.509 versions (v1, v2, v3).
  (x509parse_get_hostnames): Do not check CRT->DNSNAMES for null, because
   it is no longer necessary.

  subversion/tests/libsvn_subr/x509-test.c
  (cert_tests): Add a new test case.

Patch by: kotkov

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1655918 13f79535-47bb-0310-9956-ffa450edef68

7 years agoMerge the svn-auth-x509 branch to trunk.
Ben Reser [Fri, 30 Jan 2015 02:21:16 +0000 (30 02:21 +0000)]
Merge the svn-auth-x509 branch to trunk.

This adds an X.509 parser which we use to display certificates via the auth
command rather than storing the details provided by serf from a connection.

* LICENSE,
  NOTICE: Note that the X.509 parser is based on the parser from TropicSSL.

* build.conf
  (libsvn_subr): Add svn_x509.h header to msvc-export.
  (x509-test, __ALL_TESTS__): Add C tests for X.509 parser.

* subversion/include/private/svn_utf_private.h
  (svn_utf__encode_ucs4_string, svn_utf__utf16_to_utf8,
   svn_utf__utf32_to_utf8): New functions for converting various Unicode
     character encodings needed by the X.509 parser.

* subversion/include/svn_x509.h: New header.

* subversion/include/svn_error_codes.h
  (SVN_ERR_X509_CATEGORY_START): New category for errors from X.509 parser.
  (SVN_ERR_ASN1_OUT_OF_DATA, SVN_ERR_ASN1_UNEXPECTED_TAG,
   SVN_ERR_ASN1_INVALID_LENGTH, SVN_ERR_ASN1_LENGTH_MISMATCH,
   SVN_ERR_ASN1_INVALID_DATA, SVN_ERR_X509_FEATURE_UNAVAILABLE,
   SVN_ERR_X509_CERT_INVALID_PEM, SVN_ERR_X509_CERT_INVALID_FORMAT,
   SVN_ERR_X509_CERT_INVALID_VERSION, SVN_ERR_X509_CERT_INVALID_SERIAL,
   SVN_ERR_X509_CERT_INVALID_ALG, SVN_ERR_X509_CERT_INVALID_NAME,
   SVN_ERR_X509_CERT_INVALID_DATE, SVN_ERR_X509_CERT_INVALID_PUBKEY,
   SVN_ERR_X509_CERT_INVALID_SIGNATURE, SVN_ERR_X509_CERT_INVALID_EXTENSIONS,
   SVN_ERR_X509_CERT_UNKNOWN_VERSION, SVN_ERR_X509_CERT_UNKNOWN_PK_ALG,
   SVN_ERR_X509_CERT_SIG_MISMATCH, SVN_ERR_X509_CERT_VERIFY_FAILED):
    New error codes.

* subversion/include/svn_config.h
  (SVN_CONFIG_AUTHN_HOSTNAME_KEY, SVN_CONFIG_AUTHN_FINGERPRINT_KEY,
   SVN_CONFIG_AUTHN_VALID_FROM_KEY, SVN_CONFIG_AUTHN_VALID_UNTIL_KEY,
   SVN_CONFIG_AUTHN_ISSUER_DN_KEY): Remove constants used as keys for
    storing parsed certificate info in authn files.

* subversion/libsvn_subr/x509parse.c,
  subversion/libsvn_subr/x509info.c,
  subversion/include/x509.h: New files for implementing the X.509 parser.

* subversion/libsvn_subr/ssl_server_trust_providers.c
  (ssl_server_trust_file_first_credentials,
   ssl_server_trust_file_save_credentials): Don't store/retrive parsed
    details of X.509 certificates.

* subversion/libsvn_subr/utf.c
  (membuf_insert_ucs4, svn_utf__utf16_to_utf8, svn_utf__utf32_to_utf8):
    New functions to implement Unicode conversions.

* subversion/libsvn_subr/utf8proc.c
  (encode_ucs4_string): Convert to the private function ...
  (svn_utf__encode_ucs4_string): New function.
  (svn_utf__glob): Update caller.

* subversion/svn/auth-cmd.c
  (match_credential): Remove code to match the hostname/fingerprint since
    the data isn't stored.
  (show_cert): New function to drive the X.509 parser and then display
    the certificate to the user.
  (list_credential): Use show_cert().

* subversion/tests/libsvn_subr/utf-test.c
  (test_utf_conversions, test_funcs): Add tests for new unicode character
    set conversions.

* subversion/tests/libsvn_subr/x509-test.c: Add tests for X.509 parser.

[in subverison/bindings/javahl]
* native/jniwrapper/jni_base.cpp,
  native/jniwrapper/jni_exception.hpp:
    Add IllegalArgumentException exeption.

* native/AuthnCallback.cpp,
  native/AuthnCallback.hpp,
  src/org/apache/subversion/javahl/callback/AuthnCallback.java:
  (AuthnCallback::SSLServerCertInfo): Update the getters and constructor to
    reflect the info available from the X.509 parser.

* native/org_apache_subversion_javahl_util_ConfigLib.cpp
  (build_credential): Update to feed AuthnCallback::SSLServerCertInfo the info
    that is available.
  (Java_org_apache_subversion_javahl_util_ConfigLib_nativeSearchCredentials):
    Update the searching of the certificates to parse the certificate rather
    than depending on the stored data.

* src/org/apache/subversion/javahl/SVNUtil.java
  (SVNUtil.searchCredentials): Update hostnamePattern documentation.

* native/Promper.cpp
  (Prompter::dispatch_ssl_server_trust_prompt): Update to reflect changes
    to SSLServerCertInfo.

* src/org/apache/subversion/javahl/util/ConfigLib.java: Remove some commented
    out code.

* tests/org/apache/subversion/javahl/UtilTests.java
  (util_cred_ssl_server, testCredentials): Update tests as needed.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1655909 13f79535-47bb-0310-9956-ffa450edef68

7 years agoFollow up to r1651565: make sure that the JavaHL native library has an
Branko Cibej [Fri, 30 Jan 2015 01:51:16 +0000 (30 01:51 +0000)]
Follow up to r1651565: make sure that the JavaHL native library has an
embedded version string like the core libraries do.

* subversion/bindings/javahl/native/org_apache_subversion_javahl_types_Version.cpp
  (javahl_version): New local function. Embeds the version string.
  (Java_org_apache_subversion_javahl_types_Version_getMajor,
   Java_org_apache_subversion_javahl_types_Version_getMinor,
   Java_org_apache_subversion_javahl_types_Version_getPatch):
   Use the version info returned by javahl_version; basically, to make
   it more likely that the linker doesn't remove the static version info.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1655903 13f79535-47bb-0310-9956-ffa450edef68

7 years agoOn the svn-auth-x509 branch: Sync with trunk up to r1655899.svn-auth-x509svn-auth-x509
Ben Reser [Fri, 30 Jan 2015 01:16:23 +0000 (30 01:16 +0000)]
On the svn-auth-x509 branch: Sync with trunk up to r1655899.

git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/svn-auth-x509@1655900 13f79535-47bb-0310-9956-ffa450edef68

7 years agoUpdate JavaHL's ConflictDescriptor to the 1.9 API.
Branko Cibej [Thu, 29 Jan 2015 20:11:39 +0000 (29 20:11 +0000)]
Update JavaHL's ConflictDescriptor to the 1.9 API.

[in subversion/bindings/javahl]
* src/org/apache/subversion/javahl/ConflictDescriptor.java
  (ConflictDescriptor.propRejectAbspath,
   ConflictDescriptor.propValueBase,
   ConflictDescriptor.propValueWorking,
   ConflictDescriptor.propValueIncomingOld,
   ConflictDescriptor.propValueIncomingNew): New private fields.
  (ConflictDescriptor.ConflictDescriptor): New private constructor
   initializes these new fields. The old constructor is deprecated
   and forwards construction to the new one.
  (ConflictDescriptor.getPropRejectAbspath,
   ConflictDescriptor.getPropValueBase,
   ConflictDescriptor.getPropValueWorking,
   ConflictDescriptor.getPropValueIncomingOld,
   ConflictDescriptor.getPropValueIncomingNew): New accessor methods.

* javahl/native/CreateJ.cpp
  (CreateJ::ConflictDescriptor): Update implementation to call the
   new Java ConflictDescriptor constructor.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1655842 13f79535-47bb-0310-9956-ffa450edef68

7 years agoDistingush between permanent and temporary redirections to match the
Philip Martin [Thu, 29 Jan 2015 19:27:19 +0000 (29 19:27 +0000)]
Distingush between permanent and temporary redirections to match the
1.8 behaviour.

* subversion/libsvn_ra_serf/options.c
  (svn_ra_serf__exchange_capabilities): Permanent or temporary error.

* subversion/tests/cmdline/redirect_tests.py
  (redirected_copy): Extend with temporary redirect.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1655821 13f79535-47bb-0310-9956-ffa450edef68

7 years ago* subversion/libsvn_client/copy.c
Bert Huijben [Thu, 29 Jan 2015 19:05:32 +0000 (29 19:05 +0000)]
* subversion/libsvn_client/copy.c
  (wc_to_repos_copy): Following up on r1655796, avoid possible segfault.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1655802 13f79535-47bb-0310-9956-ffa450edef68

7 years ago* subversion/libsvn_client/copy.c
Bert Huijben [Thu, 29 Jan 2015 18:48:03 +0000 (29 18:48 +0000)]
* subversion/libsvn_client/copy.c
  (wc_to_repos_copy): Don't allocate list when we are not going to add
    anything.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1655796 13f79535-47bb-0310-9956-ffa450edef68

7 years agoRemove a helper function that is no longer used (and incomplete).
Bert Huijben [Thu, 29 Jan 2015 18:28:04 +0000 (29 18:28 +0000)]
Remove a helper function that is no longer used (and incomplete).

A better implementation exists in CreateJ::CommitItem, and should
be factored out in the unlikely case if we need this as separate function.

* subversion/bindings/javahl/native/EnumMapper.cpp
  (EnumMapper::mapCommitMessageStateFlags): Remove unused function.

* subversion/bindings/javahl/native/EnumMapper.h
  (EnumMapper::mapCommitMessageStateFlags): Remove unused function.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1655781 13f79535-47bb-0310-9956-ffa450edef68

7 years ago* subversion/bindings/swig/ruby/test/test_client.rb
Bert Huijben [Thu, 29 Jan 2015 17:50:43 +0000 (29 17:50 +0000)]
* subversion/bindings/swig/ruby/test/test_client.rb
  (test_log_msg_func_commit_items):
     Attempt to fix expectations after recent tweak to
     commit item initialization.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1655765 13f79535-47bb-0310-9956-ffa450edef68

7 years agoAdd another regression test for issue #4554: Wrong file length with PLAIN
Ivan Zhakov [Thu, 29 Jan 2015 17:23:19 +0000 (29 17:23 +0000)]
Add another regression test for issue #4554: Wrong file length with PLAIN
representations in FSFS.

* subversion/tests/libsvn_fs/fs-test.c
  (test_prop_and_text_rep_sharing_collision): New test.
  (test_funcs): Add test_prop_and_text_rep_sharing_collision test to the
   test list.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1655755 13f79535-47bb-0310-9956-ffa450edef68

7 years agoFollow up to r1655712 by making the original form of the external
Branko Cibej [Thu, 29 Jan 2015 16:53:26 +0000 (29 16:53 +0000)]
Follow up to r1655712 by making the original form of the external
reference URL available for constructing the error message.

Patch by: stsp

* subversion/libsvn_client/externals.c
  (switch_dir_external): Add new argument url_from_externals_definition.
  (handle_external_item_change): Update the only caller.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1655738 13f79535-47bb-0310-9956-ffa450edef68

7 years agoIn the wc->repos copy code pass the actual commit items to the log message
Bert Huijben [Thu, 29 Jan 2015 16:32:46 +0000 (29 16:32 +0000)]
In the wc->repos copy code pass the actual commit items to the log message
callback instead of fake items that only specify the roots of the copy
operations with limited details.

This allows previewing what is actually committed and simplifies code.

* subversion/libsvn_client/copy.c
  (wc_to_repos_copy): Remove a lot of stub code. Pass real items a bit later
    on.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1655729 13f79535-47bb-0310-9956-ffa450edef68

7 years agoFix an exception in JavaHL caused by an invalid enum value at different layers.
Bert Huijben [Thu, 29 Jan 2015 16:12:16 +0000 (29 16:12 +0000)]
Fix an exception in JavaHL caused by an invalid enum value at different layers.

* subversion/bindings/javahl/native/CommitMessage.cpp
  (CommitMessage::getCommitMessage):
      If constructing the item failed we should return.

* subversion/libsvn_client/copy.c
  (try_copy): Property initialize src_kind field.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1655723 13f79535-47bb-0310-9956-ffa450edef68

7 years agoImprove error message when an external is shadowed by a versioned path.
Stefan Sperling [Thu, 29 Jan 2015 15:45:50 +0000 (29 15:45 +0000)]
Improve error message when an external is shadowed by a versioned path.

Suggested by: brane

* subversion/libsvn_client/externals.c
  (switch_dir_external): Provide a custom error message since the default
   message 'The specified path has an unexpected status' is not very clear.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1655712 13f79535-47bb-0310-9956-ffa450edef68

7 years agoFix docstring; no functional change.
Branko Cibej [Thu, 29 Jan 2015 15:45:07 +0000 (29 15:45 +0000)]
Fix docstring; no functional change.

* subversion/libsvn_client/prop_commands.c
  (svn_client_revprop_set2): The docstring referred to parameters
   RA_LIB and SESSION, neither of which exist; mention RA_SESSION
   instead.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1655711 13f79535-47bb-0310-9956-ffa450edef68

7 years agoFollowing up on r1655637, fill even more svn_client_commit_item3_t fields
Bert Huijben [Thu, 29 Jan 2015 15:24:44 +0000 (29 15:24 +0000)]
Following up on r1655637, fill even more svn_client_commit_item3_t fields
and apply some updated expected results in JavaHL.

* subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java
  (testJNIError,
   testBasicMkdirUrl): Expect creation of directory when using mkdir URL.

* subversion/bindings/javahl/tests/org/apache/subversion/javahl/SVNTests.java
  (setUp): Expect import to provide a url and kind.
* subversion/bindings/javahl/tests/org/tigris/subversion/javahl/SVNTests.java
  (setUp): Expect import to provide a url and kind.

* subversion/libsvn_client/import.c
  (svn_client_import5): Provide kind an url in commit item.

* subversion/libsvn_client/util.c
  (svn_client_commit_item3_create): Use svn_node_unknown as default kind.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1655704 13f79535-47bb-0310-9956-ffa450edef68

7 years agoFix a JavaHL callback's exception handling. This fixes a JNI problem, and
Bert Huijben [Thu, 29 Jan 2015 14:25:34 +0000 (29 14:25 +0000)]
Fix a JavaHL callback's exception handling. This fixes a JNI problem, and
makes it possible to find where to apply fixes for behavior changes.

* subversion/bindings/javahl/native/CommitMessage.cpp
  (CommitMessage::getCommitMessage): Ensure valid output. Properly handle
    exceptions in the java callback, by popping exception state.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1655677 13f79535-47bb-0310-9956-ffa450edef68

7 years agoRevert r1655635: It broke Unix builds. The svn_fs_fs__write_current()
Ivan Zhakov [Thu, 29 Jan 2015 13:54:58 +0000 (29 13:54 +0000)]
Revert r1655635: It broke Unix builds. The svn_fs_fs__write_current()
function expects that CURRENT file is already exists. It will be used to
obtain file permissions on Unix platform.

* subversion/libsvn_fs_fs/fs_fs.c
  (svn_fs_fs__create_file_tree): Create empty CURRENT file before writing
   actual content to it.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1655664 13f79535-47bb-0310-9956-ffa450edef68

7 years agoRework the way FSFS L1 DAG cache (fs_fs_dag_cache_t) deals with the lifetime
Evgeny Kotkov [Thu, 29 Jan 2015 13:32:50 +0000 (29 13:32 +0000)]
Rework the way FSFS L1 DAG cache (fs_fs_dag_cache_t) deals with the lifetime
of the cached nodes.  Drop the existing approach that performs a non-trivial
reference counting for pools in favor of doing a couple of explicit dup()'s.

As a consequence, this patch restores a standard pool usage pattern for the
accessor functions to the cached DAG nodes â€” now these nodes are always
allocated in the passed-in pool, and this is a good thing to have.

* subversion/libsvn_fs_fs/tree.c
  (dag_node_cache_get): Ensure that the result is always allocated in the
   passed-in pool instead of (maybe) binding its lifetime to that pool.
   Achieve this by using the passed-in pool when getting the node from L2
   cache and by making a dup() into the L1 cache pool.  For the nodes that
   already are in L1, make a dup() before yielding the result.  After that,
   remove the needs_lock_cache argument and tweak the docstring.
  (get_dag): Update the calls to dag_node_cache_get().  After that, remove
   the unused needs_lock_cache argument and tweak the docstring.
  (svn_fs_fs__create_dag_cache): Do not register the unlock_cache() pool
   cleanup handler, as we don't lock the cache anymore.
  (auto_clear_dag_cache): Do not check whether the cache has locks when
   attempting to clear it.
  (cache_lock_t, lock_cache, unlock_cache, unregister_locks): Remove.
  (fs_fs_dag_cache_t): Remove the 'first_lock' field, tweak the docstring.
  (svn_fs_fs__node_id, svn_fs_fs__node_created_rev, fs_node_relation,
   fs_node_created_path, fs_node_prop, fs_node_proplist, fs_props_changed,
   fs_dir_entries, fs_copied_from, fs_file_length, fs_file_checksum,
   fs_file_contents, fs_try_process_file_contents, fs_contents_changed,
   fs_get_file_delta_stream, history_prev, crawl_directory_dag_for_mergeinfo,
   add_descendant_mergeinfo, open_path, get_root, make_path_mutable,
   copy_helper, get_copy_inheritance): Update the calls to get_dag().

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1655651 13f79535-47bb-0310-9956-ffa450edef68

7 years agoRevert the recent replacement for the FSFS DAG node cache locking scheme
Evgeny Kotkov [Thu, 29 Jan 2015 13:27:04 +0000 (29 13:27 +0000)]
Revert the recent replacement for the FSFS DAG node cache locking scheme
and the corresponding follow-ups [1], as we are now aware of a better way to
do this.

[1] r1653608, r1648612 r1648591, r1648542, r1648539, r1648538, r1648537

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1655649 13f79535-47bb-0310-9956-ffa450edef68

7 years agoMake svn_ra_open_session4() behave as documented during 1.7 development
Bert Huijben [Thu, 29 Jan 2015 13:25:26 +0000 (29 13:25 +0000)]
Make svn_ra_open_session4() behave as documented during 1.7 development
(but as it was never implemented before), by returning the documented
error when a repository should be opened in a different location.

* subversion/libsvn_ra/ra_loader.c
  (svn_ra_open4): Don't wrap SVN_ERR_RA_SESSION_URL_MISMATCH errors.

* subversion/libsvn_ra_serf/options.c
  (svn_ra_serf__exchange_capabilities): Always handle HTTP 3XX status values
    here.

* subversion/libsvn_ra_serf/util.c
  (svn_ra_serf__error_on_status): Remove bad advice.

* subversion/tests/cmdline/redirect_tests.py
  (redirected_copy): Update expected result.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1655648 13f79535-47bb-0310-9956-ffa450edef68

7 years agoFill svn_client_commit_item3_t's kind field in more cases to help api
Bert Huijben [Thu, 29 Jan 2015 12:56:31 +0000 (29 12:56 +0000)]
Fill svn_client_commit_item3_t's kind field in more cases to help api
users that process these values during commit processing.

* subversion/libsvn_client/copy.c
  (repos_to_repos_copy,
   wc_to_repos_copy): Fill kind field.

* subversion/libsvn_client/prop_commands.c
  (propset_on_url): Fill kind field.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1655637 13f79535-47bb-0310-9956-ffa450edef68

7 years agoFollow-up to r1629855: Remove duplicate code.
Ivan Zhakov [Thu, 29 Jan 2015 12:42:58 +0000 (29 12:42 +0000)]
Follow-up to r1629855: Remove duplicate code.

* subversion/libsvn_fs_fs/fs_fs.c
  (svn_fs_fs__create_file_tree): Do not write CURRENT file twice during
   repository creation.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1655635 13f79535-47bb-0310-9956-ffa450edef68

7 years ago* subversion/include/svn_client.h
Stefan Sperling [Thu, 29 Jan 2015 12:38:21 +0000 (29 12:38 +0000)]
* subversion/include/svn_client.h
  (svn_client_commit_item3_t): Document PATH quirk for WC->REPOS copies.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1655632 13f79535-47bb-0310-9956-ffa450edef68

7 years ago* subversion/include/svn_client.h
Bert Huijben [Thu, 29 Jan 2015 12:10:02 +0000 (29 12:10 +0000)]
* subversion/include/svn_client.h
  (svn_client_commit_item3_t): Extend documentation a bit.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1655603 13f79535-47bb-0310-9956-ffa450edef68

7 years ago* subversion/libsvn_ra/ra_loader.c
Philip Martin [Thu, 29 Jan 2015 00:07:12 +0000 (29 00:07 +0000)]
* subversion/libsvn_ra/ra_loader.c
  (svn_ra_open4): Put CORRECTED_URL return value in the correct pool.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1655502 13f79535-47bb-0310-9956-ffa450edef68

7 years agoFollowing up on r1655458, update expected results in redirect tests.
Bert Huijben [Wed, 28 Jan 2015 21:28:07 +0000 (28 21:28 +0000)]
Following up on r1655458, update expected results in redirect tests.
(This file was missing from that patch)

* subversion/tests/cmdline/redirect_tests.py
  (redirected_copy): Split test. Update expected result.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1655474 13f79535-47bb-0310-9956-ffa450edef68

7 years ago* subversion/libsvn_ra_serf/util.c
Bert Huijben [Wed, 28 Jan 2015 20:44:36 +0000 (28 20:44 +0000)]
* subversion/libsvn_ra_serf/util.c
  (response_done): Remove some (legacy) now unneeded checks that are
    handled in the function responsible for calling this function.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1655463 13f79535-47bb-0310-9956-ffa450edef68

7 years ago* subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java
Branko Cibej [Wed, 28 Jan 2015 20:37:03 +0000 (28 20:37 +0000)]
* subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java
  (BasicTests.testBlameWithDiffOptions): Fix test case; the original file
   contents had no end-of-line, so the new must have none, too.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1655461 13f79535-47bb-0310-9956-ffa450edef68

7 years agoIn the implementation of svn_ra_open4(), properly pass corrected_url as NULL
Bert Huijben [Wed, 28 Jan 2015 20:34:26 +0000 (28 20:34 +0000)]
In the implementation of svn_ra_open4(), properly pass corrected_url as NULL
to the ra implementations, to allow them to error out early when users don't
want to support redirects.

Before this patch we sometimes returned an RA session pointing to a location
that would only respond with redirect errors on individual ra operations.
(We would also assume that the repository was using our http 1.0 protocol)

* subversion/libsvn_ra/ra_loader.c
  (svn_ra_open4): Directly pass corrected_url_p to the implementations and
    move the code to fixup bad urls into serf. (Which should follow the
    Subversion API rules of always passing good urls anyway)

* subversion/libsvn_ra_serf/options.c
  (includes): Add svn_path.h.
  (svn_ra_serf__exchange_capabilities): Guarantee a proper redirect url.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1655458 13f79535-47bb-0310-9956-ffa450edef68

7 years agoIn ra_serf: Make the standard http status handling by default handle redirect
Bert Huijben [Wed, 28 Jan 2015 19:16:05 +0000 (28 19:16 +0000)]
In ra_serf: Make the standard http status handling by default handle redirect
status value as an error, instead of as a success result. In most cases this
was already caught properly but the xml body parser already explicitly ignores
this status range (assuming they will result in an error)

* subversion/libsvn_ra_serf/options.c
  (svn_ra_serf__exchange_capabilities): Set flag in handler to declare that we
    are interested in specialized handling of redirects, when requested.

* subversion/libsvn_ra_serf/ra_serf.h
  (svn_ra_serf__handler_t): Add no_fail_on_http_redirect_status flag. Update
    documentation to note that we no longer 'fail directly' (as that breaks
    pipelining).

* subversion/libsvn_ra_serf/util.c
  (response_done): Handle http status 300-399 unless
    no_fail_on_http_redirect_status is set.

* subversion/tests/cmdline/redirect_tests.py
  (redirected_copy): Remove XFail marker.

Found by: philip

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1655435 13f79535-47bb-0310-9956-ffa450edef68

7 years ago* subversion/tests/cmdline/redirect_tests.py
Philip Martin [Wed, 28 Jan 2015 18:42:39 +0000 (28 18:42 +0000)]
* subversion/tests/cmdline/redirect_tests.py
  (redirected_copy): New XFAIL test, redirect message missing after r1654751.
  (test_list): Add new test.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1655428 13f79535-47bb-0310-9956-ffa450edef68

7 years ago* subversion/tests/cmdline/blame_tests.py
Bert Huijben [Wed, 28 Jan 2015 16:00:20 +0000 (28 16:00 +0000)]
* subversion/tests/cmdline/blame_tests.py
  (blame_multiple_targets): Simplify test and reinstante old purpose of
    checking the internal error codes.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1655373 13f79535-47bb-0310-9956-ffa450edef68

7 years agoResolve issue #2295, by making mod_dav produce an svn specific error report
Bert Huijben [Wed, 28 Jan 2015 14:47:50 +0000 (28 14:47 +0000)]
Resolve issue #2295, by making mod_dav produce an svn specific error report
on MKCOL requests that hit an existing resource during commit.

* subversion/mod_dav_svn/repos.c
  (prep_working): When parsing for mkcol, break out early.

* subversion/tests/cmdline/commit_tests.py
  (mkdir_conflict_proper_error): New test.
  (test_list): Add mkdir_conflict_proper_error.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1655354 13f79535-47bb-0310-9956-ffa450edef68

7 years agoAdd a JavaHL test for ISVNClient.blame with diff options
Branko Cibej [Wed, 28 Jan 2015 13:52:45 +0000 (28 13:52 +0000)]
Add a JavaHL test for ISVNClient.blame with diff options
and remove the deprecation of the older blame method.

[in subversion/bindings/javahl]
* src/org/apache/subversion/javahl/ISVNClient.java
  (ISVNClient.blame): Remove deprecation.
* src/org/apache/subversion/javahl/SVNClient.java
  (SVNClient.blame): Likewise.

* tests/org/apache/subversion/javahl/BasicTests.java
  (BasicTests.testBasicBlame): Check the contents of the blame line.
  (BasicTests.testBlameWithDiffOptions): New test case.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1655322 13f79535-47bb-0310-9956-ffa450edef68

7 years ago* subversion/libsvn_client/mtcc.c
Bert Huijben [Wed, 28 Jan 2015 13:36:47 +0000 (28 13:36 +0000)]
* subversion/libsvn_client/mtcc.c
  (mtcc_verify_create): Fix comment, to remove reference to legacy mod_dav
    behaviour, which was fixed in ra-serf by passing the proper headers.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1655302 13f79535-47bb-0310-9956-ffa450edef68

7 years agoFollowing up on r1655279 and r1655288 apply some minor tweaks.
Bert Huijben [Wed, 28 Jan 2015 13:05:14 +0000 (28 13:05 +0000)]
Following up on r1655279 and r1655288 apply some minor tweaks.

* subversion/bindings/javahl/native/DiffOptions.cpp
  (DiffOptions::fileOptions): Support SHOW_C_FUNCTION flag, even
    though the only user ignores it.

* subversion/include/svn_diff.h
  (svn_diff_file_options_t): Add missing @since marker.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1655291 13f79535-47bb-0310-9956-ffa450edef68

7 years ago* subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java
Bert Huijben [Wed, 28 Jan 2015 12:55:53 +0000 (28 12:55 +0000)]
* subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java
  (blame): An attempt to fix the indentation after r1655279.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1655288 13f79535-47bb-0310-9956-ffa450edef68

7 years agoResolve issue #4475 "expose whitespace diff parameters for the javahl blame
Bert Huijben [Wed, 28 Jan 2015 12:30:49 +0000 (28 12:30 +0000)]
Resolve issue #4475 "expose whitespace diff parameters for the javahl blame
method"

I would welcome a testcase for the new features :-)

* subversion/bindings/javahl/native/DiffOptions.cpp
  (DiffOptions::optionsArray): Add comment.
  (DiffOptions::fileOptions): New function.

* subversion/bindings/javahl/native/DiffOptions.h
  (includes): Add svn_diff.h.
  (DiffOptions::fileOptions): New function.

* subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp
  (Java_org_apache_subversion_javahl_SVNClient_blame): Add argument.

* subversion/bindings/javahl/native/SVNClient.cpp
  (SVNClient::blame): Add argument.

* subversion/bindings/javahl/native/SVNClient.h
  (SVNClient::blame): Add argument.

* subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java
* subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java
  (blame): Rev function (the java way) by adding override with more arguments
    and deprecating the old function.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1655279 13f79535-47bb-0310-9956-ffa450edef68

7 years ago* subversion/bindings/swig/core.i
Bert Huijben [Wed, 28 Jan 2015 11:37:54 +0000 (28 11:37 +0000)]
* subversion/bindings/swig/core.i
  Use C style comments in a file that is processed like C, to avoid errors
  with newer swig versions that use stricter processing rules.

Found by: astieger

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1655262 13f79535-47bb-0310-9956-ffa450edef68

7 years ago* subversion/include/svn_version.h
Branko Cibej [Wed, 28 Jan 2015 08:56:12 +0000 (28 08:56 +0000)]
* subversion/include/svn_version.h
  (svn_version_extended): Tweak docstring; it's a good idea to copy out
   the data _before_ clearing the pool, and whilst this should be
   obvious, the previoius wording was the other way around.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1655241 13f79535-47bb-0310-9956-ffa450edef68

7 years agosvn --version --verbose: Support /etc/os-release, the systemd "what distro
Daniel Shahaf [Wed, 28 Jan 2015 07:58:40 +0000 (28 07:58 +0000)]
svn --version --verbose: Support /etc/os-release, the systemd "what distro
am I running" API.

Review by: stsp, brane, philip

* subversion/libsvn_subr/sysinfo.c
  (linux_release_name): Try /etc/os-release if /usr/bin/lsb_release fails.
  (systemd_release): New helper for linux_release_name().

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1655235 13f79535-47bb-0310-9956-ffa450edef68

7 years ago* subversion/include/svn_version.h
Daniel Shahaf [Wed, 28 Jan 2015 07:53:44 +0000 (28 07:53 +0000)]
* subversion/include/svn_version.h
  (svn_version_extended): Recommend users to clear the pool after calling
    this function.

Suggested by: brane

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1655233 13f79535-47bb-0310-9956-ffa450edef68

7 years agoOn the svn-auth-x509 branch: Sync with trunk up to r1655188.
Ben Reser [Tue, 27 Jan 2015 23:27:44 +0000 (27 23:27 +0000)]
On the svn-auth-x509 branch: Sync with trunk up to r1655188.

git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/svn-auth-x509@1655189 13f79535-47bb-0310-9956-ffa450edef68

7 years agoOn the dump-load-cross-check branch: Fix almost all the test failures
Branko Cibej [Tue, 27 Jan 2015 19:28:03 +0000 (27 19:28 +0000)]
On the dump-load-cross-check branch: Fix almost all the test failures
in svnsync_authz_tests.py when using dump/load check via svnserve.

* subversion/tests/cmdline/svntest/main.py
  (write_authz_file): Add an optional parameter that is a set of
   authz rules where paths already contain the repository prefix.

* subversion/tests/cmdline/svnsync_authz_tests.py
  (basic_authz,
   copy_from_unreadable_dir,
   copy_with_mod_from_unreadable_dir,
   copy_with_mod_from_unreadable_dir_and_copy,
   specific_deny_authz,
   copy_delete_unreadable_child): Use the new capability of
   write_authz_file to create the authz files for these
   tests instead of hand-crafting them.

git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/dump-load-cross-check@1655118 13f79535-47bb-0310-9956-ffa450edef68

7 years agoAdd more svn_uri_canonicalize() test cases for multiple slashes
Stefan Sperling [Tue, 27 Jan 2015 19:23:39 +0000 (27 19:23 +0000)]
Add more svn_uri_canonicalize() test cases for multiple slashes
after the scheme.

* subversion/tests/libsvn_subr/dirent_uri-test.c
  (uri_canonical): Add tests for "http:////example.com" and
   "http://///////example.com/" test cases. In both cases,
   expect "http:///example.com" as result.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1655116 13f79535-47bb-0310-9956-ffa450edef68

7 years agoAdd an svn_uri_canonicalize() test case that shows the expected
Stefan Sperling [Tue, 27 Jan 2015 19:20:52 +0000 (27 19:20 +0000)]
Add an svn_uri_canonicalize() test case that shows the expected
behaviour for 3 slashes after the scheme. The 3rd slash is always
retained, as in http:/// -> http:///, even if the scheme doesn't
support it (the file: scheme does, but http: actually does not).

* subversion/tests/libsvn_subr/dirent_uri-test.c
  (uri_canonical): Add "http:///example.com" test case.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1655113 13f79535-47bb-0310-9956-ffa450edef68

7 years agoOn the 'dump-load-cross-check' branch: add another TODO in BRANCH-README.
Julian Foad [Tue, 27 Jan 2015 17:51:42 +0000 (27 17:51 +0000)]
On the 'dump-load-cross-check' branch: add another TODO in BRANCH-README.

git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/dump-load-cross-check@1655101 13f79535-47bb-0310-9956-ffa450edef68

7 years agoOn the dump-load-cross-check branch: Enable svnrdump to avoid authz
Branko Cibej [Tue, 27 Jan 2015 17:33:56 +0000 (27 17:33 +0000)]
On the dump-load-cross-check branch: Enable svnrdump to avoid authz
restrictions during the dump/load cross-check step.

* subversion/tests/cmdline/svntest/main.py
  (crosscheck_username, crosscheck_password): Credentials for svnrdump.
  (svnrdump_crosscheck_authentication): Magic class object used by _with_auth.
  (_with_auth): If the magic class object is in the arg list, filter it
   out and put the svnrdump credentials into the argument list.
  (_post_create_repos): Add svnrdump credentials to svnserve's users authn file.
  (write_authz_file): Add rules that allow the svnrdump cross-check user
   full access to the repository regardless of otehr constraints in the
   authz file.

* subversion/tests/cmdline/svntest/sandbox.py
  (Sandbox.verify_repo): Add the magic class object to the
   argument list for 'svnrdump dump'.
  (Sandbox.verify): Add an option to skip the dump/load check
   for individual test cases.

* subversion/tests/cmdline/svntest/testcase.py
  (__all__): Add _SkipDumpLoadCrossCheck.
  (FunctionTestCase): Add a flag that tels the test runner to skip
   the dump/load check; propagate it to Sandbox.verify().
  (_SkipDumpLoadCrossCheck): New predicate/decorator class.
  (create_test_case): Propagate an option to skip the dump/load cross-check.
  (SkipDumpLoadCrossCheck_deco): New decorator.

* subversion/tests/cmdline/authz_tests.py
  (SkipDumpLoadCrossCheck): Import from svntest.testcase.
  (broken_authz_file): Skip the dump/load check because the authz file
   this test uses is broken on purpose.

git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/dump-load-cross-check@1655096 13f79535-47bb-0310-9956-ffa450edef68

7 years agoOn the 'dump-load-cross-check' branch: add a BRANCH-README file.
Julian Foad [Tue, 27 Jan 2015 16:08:23 +0000 (27 16:08 +0000)]
On the 'dump-load-cross-check' branch: add a BRANCH-README file.

git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/dump-load-cross-check@1655073 13f79535-47bb-0310-9956-ffa450edef68

7 years agoOn the 'dump-load-cross-check' branch: catch up with trunk@1655065.
Julian Foad [Tue, 27 Jan 2015 15:58:31 +0000 (27 15:58 +0000)]
On the 'dump-load-cross-check' branch: catch up with trunk@1655065.

git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/dump-load-cross-check@1655066 13f79535-47bb-0310-9956-ffa450edef68

7 years agoFix test suite's parsing of dumpfiles, following r1655026 which changed the
Julian Foad [Tue, 27 Jan 2015 15:20:29 +0000 (27 15:20 +0000)]
Fix test suite's parsing of dumpfiles, following r1655026 which changed the
order of headers in a node record.

* subversion/tests/cmdline/svntest/verify.py
  (DumpParser): When parsing node headers, do not require an ordering beyond
    that which is documented in notes/dump-load-format.txt.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1655064 13f79535-47bb-0310-9956-ffa450edef68

7 years agoUse SVN_TEST_STRING_ASSERT() in a few more C tests to improve error
Bert Huijben [Tue, 27 Jan 2015 14:33:00 +0000 (27 14:33 +0000)]
Use SVN_TEST_STRING_ASSERT() in a few more C tests to improve error
reporting.

* subversion/tests/libsvn_diff/parse-diff-test.c
  (test_parse_property_diff): Use SVN_TEST_STRING_ASSERT.

* subversion/tests/libsvn_subr/auth-test.c
  (cleanup_callback,
   test_auth_clear): Use SVN_TEST_STRING_ASSERT.

* subversion/tests/libsvn_wc/conflict-data-test.c
  (test_parse_property_diff): Use SVN_TEST_STRING_ASSERT.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1655053 13f79535-47bb-0310-9956-ffa450edef68

7 years agoRemove a few ';;' instances from our code.
Bert Huijben [Tue, 27 Jan 2015 12:57:23 +0000 (27 12:57 +0000)]
Remove a few ';;' instances from our code.

No functional changes.

* subversion/libsvn_client/deprecated.c
  (svn_client_uuid_from_url):
* subversion/libsvn_client/mergeinfo.c
  (svn_client__mergeinfo_log):
* subversion/libsvn_subr/stream.c
  (create_tempfile):
* subversion/libsvn_wc/conflicts.c
  (svn_wc__read_conflicts):
* subversion/libsvn_wc/merge.c
  (detranslate_wc_file):
* subversion/svnmucc/svnmucc.c
  (execute): Remove duplicated ';'.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1655030 13f79535-47bb-0310-9956-ffa450edef68

7 years agoFactor out writing a dumpfile node record, from 'svnadmin dump', 'svnrdump
Julian Foad [Tue, 27 Jan 2015 12:39:14 +0000 (27 12:39 +0000)]
Factor out writing a dumpfile node record, from 'svnadmin dump', 'svnrdump
dump' and 'svndumpfilter'.

No functional change.

* subversion/include/private/svn_repos_private.h
  (svn_repos__dump_node_record): New function.

* subversion/libsvn_repos/dump.c
  (svn_repos__dump_node_record): New, moved from output_node_record in
    svndumpfilter.c. Make the content-length header optional when there are
    no properties or text, so we can preserve exact behaviour.
  (dump_node): Use it.

* subversion/svndumpfilter/svndumpfilter.c
  (output_node_record): Delete; move to svn_repos__dump_node_record.
  (set_fulltext,
   close_node): Adjust callers.

* subversion/svnrdump/dump_editor.c
  (dir_baton): Add a 'headers' field in which to accumulate headers.
  (make_dir_baton): Initialize the 'headers' field.
  (get_props_content): Don't add a Prop-content-length header here.
  (dump_node): Return headers instead of writing them.
  (dump_mkdir,
   dump_pending_dir): Simplify by using svn_repos__dump_node_record().
  (open_root,
   add_directory): Adjust a call to dump_node() to store the headers in the
    node baton instead of writing them out straight away.
  (close_directory): The same, and instead of adjusting the second dump_node
    call and then dumping the resulting headers, use dump_node_delete().
  (close_file): Adjust the call to dump_node() and use the headers returned
    from it as the starting point for creating the rest of the headers.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1655026 13f79535-47bb-0310-9956-ffa450edef68

7 years ago* subversion/libsvn_fs_base/dag.c
Philip Martin [Tue, 27 Jan 2015 12:31:09 +0000 (27 12:31 +0000)]
* subversion/libsvn_fs_base/dag.c
  (svn_fs_base__dag_delete_if_mutable): Reduce memory usage by clearing
   and destroying the subpool.  Comparable to r1647820 for FSFS.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1655022 13f79535-47bb-0310-9956-ffa450edef68

7 years agoOn the dump-load-cross-check branch: Make dump/load cross-checking optional
Branko Cibej [Tue, 27 Jan 2015 12:25:27 +0000 (27 12:25 +0000)]
On the dump-load-cross-check branch: Make dump/load cross-checking optional
and turned off by default.

* Makefile.in (check): Add a new DUMP_LOAD_CROSS_CHECK flag.

* build/run_tests.py
  (main): Handle new option --dump-load-cross-check.
  (TestHarness.__init__): New optional argument dump_load_cross_check.
   Store its boolified value in the TestHarness instance.
  (TestHarness._run_py_test): Propagate the dump_load_cross_check
   to svntest.main.options.

* subversion/tests/cmdline/svntest/main.py
  (tests_verify_dump_load_cross_check): New predicate.
  (_create_parser): Handle new option --dump-load-cross-check.
  (TestSpawningThread.run_one): Propagate the dump_load_cross_check
   option to the test case driver.

* subversion/tests/cmdline/svntest/sandbox.py
  (Sandbox.verify): Run a dump/load cross-check only when it's
   enabled in the test options. Report progress through
   the logger instead of printing to stdout.

git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/dump-load-cross-check@1655020 13f79535-47bb-0310-9956-ffa450edef68

7 years agoFix a case where an attempt to bump a revision on a moved tree reported
Bert Huijben [Tue, 27 Jan 2015 12:08:52 +0000 (27 12:08 +0000)]
Fix a case where an attempt to bump a revision on a moved tree reported
an no-lock error, where it should have reported a tree conflict, which is
then easy to resolve once the right working copy lock is available.

* subversion/libsvn_wc/wc_db_update_move.c
  (bump_moved_layer): Verify if we have a lock before attempting to bump,
    which would fail because this lock wasn't available.

* subversion/tests/libsvn_wc/op-depth-test.c
  (check_tree_conflict_repos_path): Improve error reporting.
  (finite_move_update_bump): Extend test by verifying which conflicts are
    set in more places. Resolve some of the move conflicts explicitly to
    reproduce the expected results, to allow testing the other cases.
  (test_funcs): Remove XFail.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1655017 13f79535-47bb-0310-9956-ffa450edef68

7 years ago* build/run_tests.py
Julian Foad [Tue, 27 Jan 2015 11:48:40 +0000 (27 11:48 +0000)]
* build/run_tests.py
  (TestHarness.run): Correct a comment. Simplify the associated code.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1655015 13f79535-47bb-0310-9956-ffa450edef68

7 years agoMake the test added in r1654933 somewhat more robust by using the
Stefan Fuhrmann [Tue, 27 Jan 2015 11:16:35 +0000 (27 11:16 +0000)]
Make the test added in r1654933 somewhat more robust by using the
parser / serializer functions provided by FSFS.

* subversion/tests/libsvn_fs_fs/fs-fs-pack-test.c
  (stringbuf_find): Just return a position, not a pointer.
  (plain_0_length): Modify the revision content using FSFS noderev I/O and
                    tweak the native structure instead of its serialized
                    format.

Suggested by: danielsh

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1655008 13f79535-47bb-0310-9956-ffa450edef68

7 years ago* subversion/svnrdump/dump_editor.c
Julian Foad [Tue, 27 Jan 2015 10:55:13 +0000 (27 10:55 +0000)]
* subversion/svnrdump/dump_editor.c
  (dump_pending_dir): Correct the doc string, following r1655002.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1655006 13f79535-47bb-0310-9956-ffa450edef68

7 years agoSimplify some code in 'svnrdump dump'.
Julian Foad [Tue, 27 Jan 2015 10:40:55 +0000 (27 10:40 +0000)]
Simplify some code in 'svnrdump dump'.

The dump_pending() function was only ever needed for a directory node, so
remove the support for a pending file node.

* subversion/svnrdump/dump_editor.c
  (dump_edit_baton): Replace the two 'pending' fields with a single pending
    dir baton.
  (do_dump_newlines): Delete; subsume into dump_pending_dir().
  (dump_pending_dir): Rename from 'dump_pending'. Strip out file handling.
  (open_root,
   delete_entry,
   add_directory,
   open_directory,
   close_directory,
   add_file,
   open_file,
   change_dir_prop,
   close_file,
   svn_rdump__get_dump_editor): Adjust usage.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1655002 13f79535-47bb-0310-9956-ffa450edef68

7 years agoOn the 'svn-auth-x509' branch, add a test for overflow in object ids.
Ben Reser [Tue, 27 Jan 2015 08:49:27 +0000 (27 08:49 +0000)]
On the 'svn-auth-x509' branch, add a test for overflow in object ids.

This test is currently XFAIL.  I'll commit the fix tomorrow.

* subversion/tests/libsvn_subr/x509-test.c
  (broken_cert_tests, test_x509_parse_cert_broken): New test.
  (test_funcs): Add the new test.

git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/svn-auth-x509@1654989 13f79535-47bb-0310-9956-ffa450edef68

7 years agoFix segfault in svn_checksum__from_digest_fnv1a_32() and
Stefan Fuhrmann [Tue, 27 Jan 2015 06:42:18 +0000 (27 06:42 +0000)]
Fix segfault in svn_checksum__from_digest_fnv1a_32() and
svn_checksum__from_digest_fnv1a_32x4().

* subversion/libsvn_subr/checksum.c
  (checksum_create): Remove redundant DIGEST_SIZE parameter.
  (svn_checksum__from_digest_md5,
   svn_checksum__from_digest_sha1,
   svn_checksum__from_digest_fnv1a_32,
   svn_checksum__from_digest_fnv1a_32x4,
   svn_checksum_dup,
   svn_checksum_empty_checksum): Update callers.

Found by: hwright

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1654981 13f79535-47bb-0310-9956-ffa450edef68

7 years agoUpdate the FSFS structure description. No functional change.
Stefan Fuhrmann [Tue, 27 Jan 2015 01:49:12 +0000 (27 01:49 +0000)]
Update the FSFS structure description.  No functional change.

* subversion/libsvn_fs_fs/structure
  (Revision file format): Document that older releases don't implement the
                          full spec and be explicit about the limitations.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1654937 13f79535-47bb-0310-9956-ffa450edef68

7 years ago* subversion/libsvn_fs_fs/transaction.c
Stefan Fuhrmann [Tue, 27 Jan 2015 01:48:43 +0000 (27 01:48 +0000)]
* subversion/libsvn_fs_fs/transaction.c
  (get_shared_rep): Related to issue #4554, never pick a rep cache entry
                    that only matches in SHA-1 but not in size.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1654934 13f79535-47bb-0310-9956-ffa450edef68

7 years agoAdd a test demonstrating issue #4554.
Stefan Fuhrmann [Tue, 27 Jan 2015 01:48:08 +0000 (27 01:48 +0000)]
Add a test demonstrating issue #4554.

* subversion/tests/libsvn_fs_fs/fs-fs-pack-test.c
  (receive_index,
   stringbuf_find,
   get_line): New, test-specific utility functions.
  (plain_0_length): The new test case.
  (test_funcs): Register new test case.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1654933 13f79535-47bb-0310-9956-ffa450edef68

7 years agoMain fix for issue #4554: Correctly report the file length through
Stefan Fuhrmann [Tue, 27 Jan 2015 01:47:45 +0000 (27 01:47 +0000)]
Main fix for issue #4554:  Correctly report the file length through
svn_fs_file_length() in cases the expanded length has not been stored
explicitly in FSFS.

* subversion/libsvn_fs_fs/fs_fs.c
  (svn_fs_fs__file_length): Check whether the file is actually empty;
                            return the correct size otherwise.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1654932 13f79535-47bb-0310-9956-ffa450edef68

7 years agoFix issue #4553 "dumpfile has wrong node kind in delete record", by omitting
Julian Foad [Mon, 26 Jan 2015 19:17:14 +0000 (26 19:17 +0000)]
Fix issue #4553 "dumpfile has wrong node kind in delete record", by omitting
the node kind from the 'delete' record in this case just like we omit it
from the 'delete' record in non-replace cases. This applies to 'svnadmin
dump' and 'svnrdump dump'.

* subversion/libsvn_repos/dump.c,
  subversion/svnrdump/dump_editor.c
  (dump_node_delete): Remove support for the node kind.
  (dump_node): Don't pass the node kind to dump_node_delete().

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1654876 13f79535-47bb-0310-9956-ffa450edef68

7 years agoImplement dump/load cross-checking in the test suite.
Julian Foad [Mon, 26 Jan 2015 18:28:33 +0000 (26 18:28 +0000)]
Implement dump/load cross-checking in the test suite.

After every Python test in the test suite, dump the created repository (if
any) with svnadmin and with svnrdump and compare the two. Load each dump
with the other tool to check that they can load each other's dumps and
interpret them the same way. Run each dump through a no-op svndumpfilter
command and check it doesn't change the dumpfile significantly.

If cross-checking fails, raise a test failure in the normal way, as if the
cross-checking were part of the test.

A few tests deliberately create a broken repository. Adjust those tests
either to delete or to repair the repository before exiting, so that we do
not try to run this cross-checking on a broken repository.

Motivation: Cross-checking reveals bugs and inconsistencies between the
different dump/load tools. The test suite by its nature provides a good
selection of interesting repository contents.

### TODO:
  - Put back the dumpfile parser's ability to check for well-formed dumpfile
    contents, which has been temporarily stripped out here in order to
    achieve more generic parsing, as some dump/load tests rely on that.

  - Bypass authz when dumping with svnrdump, otherwise a partial dump is
    obtained for tests using authz, making those tests fail.

  - Make optional -- enabled by a configure option?

Ideas for improvement:
  - Improve the logic for finding repositories created by a test: detect
    when a test created a repository even if the sandbox is not marked as
    'built'; detect when a test created additional repositories.

  - Implement the same cross-checking for the C tests.

* subversion/tests/cmdline/svntest/sandbox.py
  (Sandbox.__init__): Remember the current working directory.
  (Sandbox.verify_repo,
   Sandbox.verify): New methods implementing dump/load cross-checking.

* subversion/tests/cmdline/svntest/testcase.py
  (FunctionTestCase.run): Call the sandbox's verify method afterwards.

* subversion/tests/cmdline/svntest/verify.py
  (DumpParser): Improve the parsing of headers, fixing bugs and making it
    more generic. Don't store the number of blank lines, for now, because at
    the moment these often differ between svnadmin and svnrdump.
  (compare_dump_files): Add new options: 'ignore uuid',
    'expect_content_length_always', 'ignore_empty_prop_sections'.

* subversion/tests/cmdline/svnadmin_tests.py
  (fsfs_recover_handle_missing_revs_or_revprops_file): Restore the
    repository to a non-corrupt state, to avoid failing to dump.
  (verify_keep_going,
   verify_invalid_path_changes,
   verify_quickly): Remove the corrupt repository, to avoid failing to dump.

git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/dump-load-cross-check@1654857 13f79535-47bb-0310-9956-ffa450edef68

7 years agoMake a branch for dump/load cross-checking.
Julian Foad [Mon, 26 Jan 2015 18:08:14 +0000 (26 18:08 +0000)]
Make a branch for dump/load cross-checking.

git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/dump-load-cross-check@1654853 13f79535-47bb-0310-9956-ffa450edef68

7 years agoChange the way a 'replace' is converted to delete-and-add in 'svnadmin load'
Julian Foad [Mon, 26 Jan 2015 17:37:51 +0000 (26 17:37 +0000)]
Change the way a 'replace' is converted to delete-and-add in 'svnadmin load'
and 'svnrdump load', in preparation for fixing issue #4553 "dumpfile has wrong
node kind in delete record".

No functional change.

* subversion/libsvn_repos/dump.c
  (dump_node_delete): New function.
  (dump_node): Handle a replace-with-history by calling dump_node_delete
    for the delete part and falling through to the 'add' case for the add part.
    Convert a multiple 'if' statement to a 'switch' statement to facilitate
    falling through, and for consistency with the svnrdump version of it.

* subversion/svnrdump/dump_editor.c
  (dump_node_delete): New function.
  (dump_node): Handle a replace-with-history by calling dump_node_delete
    for the delete part and falling through to the 'add' case for the add part.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1654850 13f79535-47bb-0310-9956-ffa450edef68

7 years ago* tools/buildbot/slaves/svn-sparc-solaris/svncheck.sh:
Philip Martin [Mon, 26 Jan 2015 16:25:43 +0000 (26 16:25 +0000)]
* tools/buildbot/slaves/svn-sparc-solaris/svncheck.sh:
  Set variable and export separately.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1654841 13f79535-47bb-0310-9956-ffa450edef68

7 years ago* tools/buildbot/slaves/svn-sparc-solaris/svncheck.sh:
Philip Martin [Mon, 26 Jan 2015 16:12:26 +0000 (26 16:12 +0000)]
* tools/buildbot/slaves/svn-sparc-solaris/svncheck.sh:
  Followup to r1641163, remove overriding --enable-optimize.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1654837 13f79535-47bb-0310-9956-ffa450edef68

7 years ago* tools/buildbot/slaves/svn-sparc-solaris/svncheck.sh:
Philip Martin [Mon, 26 Jan 2015 16:06:21 +0000 (26 16:06 +0000)]
* tools/buildbot/slaves/svn-sparc-solaris/svncheck.sh:
  Use GNU iconv, in preload mode, when running the regression
  tests to avoid UTF-8 conversion failures.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1654836 13f79535-47bb-0310-9956-ffa450edef68

7 years agoFollowing up on r1654794, add a related test that verifies the author value
Bert Huijben [Mon, 26 Jan 2015 14:17:25 +0000 (26 14:17 +0000)]
Following up on r1654794, add a related test that verifies the author value
retrieved with the stat ra functions.

* subversion/tests/cmdline/prop_tests.py
  (xml_unsafe_author2): New test.
  (test_list): Add xml_unsafe_author2.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1654810 13f79535-47bb-0310-9956-ffa450edef68

7 years agoFix issue #4415, under the assumption that Subversion clients receive the same
Bert Huijben [Mon, 26 Jan 2015 13:26:50 +0000 (26 13:26 +0000)]
Fix issue #4415, under the assumption that Subversion clients receive the same
property twice in the same response and only use the properly escaped version.

* subversion/mod_dav_svn/liveprops.c
  (includes): Add svn_ctype.h.
  (insert_prop_internal): Stop producing invalid xml for Subversion clients.
    Provide an non-identical author name when we would fail and document why.

* subversion/tests/cmdline/prop_tests.py
  (xml_unsafe_author): Remove XFail marker. Extend test.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1654791 13f79535-47bb-0310-9956-ffa450edef68

7 years ago* COMMITTERS: Replace tab with spaces.
Bert Huijben [Mon, 26 Jan 2015 12:21:46 +0000 (26 12:21 +0000)]
* COMMITTERS: Replace tab with spaces.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1654775 13f79535-47bb-0310-9956-ffa450edef68

7 years ago* subversion/libsvn_ra_serf/update.c
Ivan Zhakov [Mon, 26 Jan 2015 12:10:49 +0000 (26 12:10 +0000)]
* subversion/libsvn_ra_serf/update.c
  (fetch_for_file): Use SCRATCH_POOL for temporary allocation.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1654773 13f79535-47bb-0310-9956-ffa450edef68

7 years ago* subversion/libsvn_ra_serf/util.c
Bert Huijben [Mon, 26 Jan 2015 11:44:12 +0000 (26 11:44 +0000)]
* subversion/libsvn_ra_serf/util.c
  (connection_closed): Handle serf specific error codes on connection closed
    with proper error messages.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1654772 13f79535-47bb-0310-9956-ffa450edef68

7 years agoTweak a tiny bit of code to help during debugging. No runtime change.
Bert Huijben [Mon, 26 Jan 2015 11:38:10 +0000 (26 11:38 +0000)]
Tweak a tiny bit of code to help during debugging. No runtime change.

* subversion/libsvn_ra_serf/util.c
  (accept_response,
   accept_head): Document baton.
  (setup_request_cb): Use handler as baton instead of the session, to
    allow access to the request information from callbacks.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1654771 13f79535-47bb-0310-9956-ffa450edef68

7 years agoWith the standardized handler setup functions we can be a bit smarter on
Bert Huijben [Mon, 26 Jan 2015 10:32:46 +0000 (26 10:32 +0000)]
With the standardized handler setup functions we can be a bit smarter on
when to setup which headers. We are no longer in the business of writing
a generic Delta/V client, so avoid doing additional work for nobody.

* subversion/libsvn_ra_serf/commit.c
  (add_file): Disable DAV headers on this HEAD request.

* subversion/libsvn_ra_serf/get_lock.c
  (svn_ra_serf__get_lock): Disable DAV headers on this PROPFIND request.

* subversion/libsvn_ra_serf/property.c
  (svn_ra_serf__create_propfind_handler): Disable DAV headers on these
    PROPFIND requests.

* subversion/libsvn_ra_serf/util.c
  (setup_serf_req): Tweak comment.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1654755 13f79535-47bb-0310-9956-ffa450edef68

7 years agoThe ra_serf's standard propfind handler verifies that the response has http
Bert Huijben [Mon, 26 Jan 2015 09:58:18 +0000 (26 09:58 +0000)]
The ra_serf's standard propfind handler verifies that the response has http
status 207, so it is not necessary to check for that again after processing
the response (unlike 1.8, where this was necessary).

* subversion/libsvn_ra_serf/get_file.c
  (svn_ra_serf__get_file): Remove unneeded check.

* subversion/libsvn_ra_serf/property.c
  (svn_ra_serf__fetch_node_props): Remove unneeded check.

* subversion/libsvn_ra_serf/serf.c
  (serf__rev_proplist): Remove unneeded check.

* subversion/libsvn_ra_serf/stat.c
  (svn_ra_serf__stat,
   svn_ra_serf__get_dir): Remove unneeded checks.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1654751 13f79535-47bb-0310-9956-ffa450edef68