subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From i...@apache.org
Subject svn commit: r1659291 [1/21] - in /subversion/branches/remove-log-addressing: ./ subversion/include/ subversion/include/private/ subversion/libsvn_delta/ subversion/libsvn_fs_base/ subversion/libsvn_fs_fs/ subversion/libsvn_fs_x/ subversion/libsvn_repos...
Date Thu, 12 Feb 2015 15:50:48 GMT
Author: ivan
Date: Thu Feb 12 15:50:47 2015
New Revision: 1659291

URL: http://svn.apache.org/r1659291
Log:
On the remove-log-addressing branch: Merge changes from trunk.

Added:
    subversion/branches/remove-log-addressing/subversion/svnbench/
      - copied from r1659290, subversion/trunk/subversion/svnbench/
    subversion/branches/remove-log-addressing/subversion/tests/libsvn_wc/wc-test-queries.sql
      - copied unchanged from r1659290, subversion/trunk/subversion/tests/libsvn_wc/wc-test-queries.sql
Removed:
    subversion/branches/remove-log-addressing/subversion/svn-bench/
Modified:
    subversion/branches/remove-log-addressing/   (props changed)
    subversion/branches/remove-log-addressing/CHANGES
    subversion/branches/remove-log-addressing/Makefile.in
    subversion/branches/remove-log-addressing/build.conf
    subversion/branches/remove-log-addressing/subversion/include/private/svn_repos_private.h
    subversion/branches/remove-log-addressing/subversion/include/svn_x509.h
    subversion/branches/remove-log-addressing/subversion/libsvn_delta/compat.c
    subversion/branches/remove-log-addressing/subversion/libsvn_fs_base/fs.c
    subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/lock.c
    subversion/branches/remove-log-addressing/subversion/libsvn_fs_x/   (props changed)
    subversion/branches/remove-log-addressing/subversion/libsvn_fs_x/lock.c
    subversion/branches/remove-log-addressing/subversion/libsvn_repos/dump.c
    subversion/branches/remove-log-addressing/subversion/libsvn_repos/log.c
    subversion/branches/remove-log-addressing/subversion/libsvn_repos/repos.c
    subversion/branches/remove-log-addressing/subversion/libsvn_subr/dso.c
    subversion/branches/remove-log-addressing/subversion/libsvn_subr/x509.h
    subversion/branches/remove-log-addressing/subversion/libsvn_subr/x509info.c
    subversion/branches/remove-log-addressing/subversion/libsvn_subr/x509parse.c
    subversion/branches/remove-log-addressing/subversion/libsvn_wc/conflicts.c
    subversion/branches/remove-log-addressing/subversion/libsvn_wc/status.c
    subversion/branches/remove-log-addressing/subversion/libsvn_wc/token-map.h
    subversion/branches/remove-log-addressing/subversion/libsvn_wc/update_editor.c
    subversion/branches/remove-log-addressing/subversion/libsvn_wc/wc-queries.sql
    subversion/branches/remove-log-addressing/subversion/libsvn_wc/wc_db.c
    subversion/branches/remove-log-addressing/subversion/libsvn_wc/wc_db.h
    subversion/branches/remove-log-addressing/subversion/libsvn_wc/wc_db_private.h
    subversion/branches/remove-log-addressing/subversion/libsvn_wc/wc_db_update_move.c
    subversion/branches/remove-log-addressing/subversion/mod_dav_svn/deadprops.c
    subversion/branches/remove-log-addressing/subversion/svn/cl-conflicts.c
    subversion/branches/remove-log-addressing/subversion/svn/cl-conflicts.h
    subversion/branches/remove-log-addressing/subversion/svn/info-cmd.c
    subversion/branches/remove-log-addressing/subversion/svndumpfilter/svndumpfilter.c
    subversion/branches/remove-log-addressing/subversion/svnrdump/dump_editor.c
    subversion/branches/remove-log-addressing/subversion/tests/cmdline/authz_tests.py
    subversion/branches/remove-log-addressing/subversion/tests/cmdline/autoprop_tests.py
    subversion/branches/remove-log-addressing/subversion/tests/cmdline/basic_tests.py
    subversion/branches/remove-log-addressing/subversion/tests/cmdline/blame_tests.py
    subversion/branches/remove-log-addressing/subversion/tests/cmdline/cat_tests.py
    subversion/branches/remove-log-addressing/subversion/tests/cmdline/changelist_tests.py
    subversion/branches/remove-log-addressing/subversion/tests/cmdline/checkout_tests.py
    subversion/branches/remove-log-addressing/subversion/tests/cmdline/commit_tests.py
    subversion/branches/remove-log-addressing/subversion/tests/cmdline/copy_tests.py
    subversion/branches/remove-log-addressing/subversion/tests/cmdline/depth_tests.py
    subversion/branches/remove-log-addressing/subversion/tests/cmdline/diff_tests.py
    subversion/branches/remove-log-addressing/subversion/tests/cmdline/entries_tests.py
    subversion/branches/remove-log-addressing/subversion/tests/cmdline/export_tests.py
    subversion/branches/remove-log-addressing/subversion/tests/cmdline/externals_tests.py
    subversion/branches/remove-log-addressing/subversion/tests/cmdline/history_tests.py
    subversion/branches/remove-log-addressing/subversion/tests/cmdline/import_tests.py
    subversion/branches/remove-log-addressing/subversion/tests/cmdline/info_tests.py
    subversion/branches/remove-log-addressing/subversion/tests/cmdline/input_validation_tests.py
    subversion/branches/remove-log-addressing/subversion/tests/cmdline/iprop_authz_tests.py
    subversion/branches/remove-log-addressing/subversion/tests/cmdline/iprop_tests.py
    subversion/branches/remove-log-addressing/subversion/tests/cmdline/lock_tests.py
    subversion/branches/remove-log-addressing/subversion/tests/cmdline/log_tests.py
    subversion/branches/remove-log-addressing/subversion/tests/cmdline/merge_authz_tests.py
    subversion/branches/remove-log-addressing/subversion/tests/cmdline/merge_automatic_tests.py
    subversion/branches/remove-log-addressing/subversion/tests/cmdline/merge_reintegrate_tests.py
    subversion/branches/remove-log-addressing/subversion/tests/cmdline/merge_tests.py
    subversion/branches/remove-log-addressing/subversion/tests/cmdline/merge_tree_conflict_tests.py
    subversion/branches/remove-log-addressing/subversion/tests/cmdline/mergeinfo_tests.py
    subversion/branches/remove-log-addressing/subversion/tests/cmdline/move_tests.py
    subversion/branches/remove-log-addressing/subversion/tests/cmdline/patch_tests.py
    subversion/branches/remove-log-addressing/subversion/tests/cmdline/prop_tests.py
    subversion/branches/remove-log-addressing/subversion/tests/cmdline/redirect_tests.py
    subversion/branches/remove-log-addressing/subversion/tests/cmdline/relocate_tests.py
    subversion/branches/remove-log-addressing/subversion/tests/cmdline/resolve_tests.py
    subversion/branches/remove-log-addressing/subversion/tests/cmdline/revert_tests.py
    subversion/branches/remove-log-addressing/subversion/tests/cmdline/schedule_tests.py
    subversion/branches/remove-log-addressing/subversion/tests/cmdline/special_tests.py
    subversion/branches/remove-log-addressing/subversion/tests/cmdline/stat_tests.py
    subversion/branches/remove-log-addressing/subversion/tests/cmdline/svnadmin_tests.py
    subversion/branches/remove-log-addressing/subversion/tests/cmdline/svnauthz_tests.py
    subversion/branches/remove-log-addressing/subversion/tests/cmdline/svndumpfilter_tests.py
    subversion/branches/remove-log-addressing/subversion/tests/cmdline/svnlook_tests.py
    subversion/branches/remove-log-addressing/subversion/tests/cmdline/svnmucc_tests.py
    subversion/branches/remove-log-addressing/subversion/tests/cmdline/svnrdump_tests.py
    subversion/branches/remove-log-addressing/subversion/tests/cmdline/svnsync_authz_tests.py
    subversion/branches/remove-log-addressing/subversion/tests/cmdline/svnsync_tests.py
    subversion/branches/remove-log-addressing/subversion/tests/cmdline/svntest/actions.py
    subversion/branches/remove-log-addressing/subversion/tests/cmdline/svntest/deeptrees.py
    subversion/branches/remove-log-addressing/subversion/tests/cmdline/svntest/factory.py
    subversion/branches/remove-log-addressing/subversion/tests/cmdline/svntest/mergetrees.py
    subversion/branches/remove-log-addressing/subversion/tests/cmdline/svntest/objects.py
    subversion/branches/remove-log-addressing/subversion/tests/cmdline/svntest/sandbox.py
    subversion/branches/remove-log-addressing/subversion/tests/cmdline/svnversion_tests.py
    subversion/branches/remove-log-addressing/subversion/tests/cmdline/switch_tests.py
    subversion/branches/remove-log-addressing/subversion/tests/cmdline/trans_tests.py
    subversion/branches/remove-log-addressing/subversion/tests/cmdline/tree_conflict_tests.py
    subversion/branches/remove-log-addressing/subversion/tests/cmdline/update_tests.py
    subversion/branches/remove-log-addressing/subversion/tests/cmdline/upgrade_tests.py
    subversion/branches/remove-log-addressing/subversion/tests/cmdline/wc_tests.py
    subversion/branches/remove-log-addressing/subversion/tests/libsvn_fs/fs-test.c
    subversion/branches/remove-log-addressing/subversion/tests/libsvn_fs/locks-test.c
    subversion/branches/remove-log-addressing/subversion/tests/libsvn_ra/ra-test.c
    subversion/branches/remove-log-addressing/subversion/tests/libsvn_subr/x509-test.c
    subversion/branches/remove-log-addressing/subversion/tests/libsvn_wc/   (props changed)
    subversion/branches/remove-log-addressing/subversion/tests/libsvn_wc/db-test.c
    subversion/branches/remove-log-addressing/subversion/tests/libsvn_wc/op-depth-test.c
    subversion/branches/remove-log-addressing/subversion/tests/svn_test.h
    subversion/branches/remove-log-addressing/subversion/tests/svn_test_main.c

Propchange: subversion/branches/remove-log-addressing/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Feb 12 15:50:47 2015
@@ -87,4 +87,4 @@
 /subversion/branches/verify-at-commit:1462039-1462408
 /subversion/branches/verify-keep-going:1439280-1546110
 /subversion/branches/wc-collate-path:1402685-1480384
-/subversion/trunk:1603891-1658357
+/subversion/trunk:1603891-1659290

Modified: subversion/branches/remove-log-addressing/CHANGES
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/CHANGES?rev=1659291&r1=1659290&r2=1659291&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/CHANGES (original)
+++ subversion/branches/remove-log-addressing/CHANGES Thu Feb 12 15:50:47 2015
@@ -299,6 +299,8 @@ http://svn.apache.org/repos/asf/subversi
       PARALLEL=1 means to use the default (r1573320)
     * pkg-config support for libsvn_* libraries (issue #4435)
     * binaries built on Mac OS X 10.6+ will not run on older versions (r1651549)
+    * fix random failure of Makefile-based parallel builds on Unix
+      when the amalgamated SQLite is being used (r1658357)
 
   - API changes:
     * New RA callbacks for managing ra_svn tunnels:

Modified: subversion/branches/remove-log-addressing/Makefile.in
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/Makefile.in?rev=1659291&r1=1659290&r2=1659291&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/Makefile.in (original)
+++ subversion/branches/remove-log-addressing/Makefile.in Thu Feb 12 15:50:47 2015
@@ -837,7 +837,7 @@ $(SWIG_PL_DIR)/native/Makefile.PL: $(SWI
 	./config.status subversion/bindings/swig/perl/native/Makefile.PL
 
 $(SWIG_PL_DIR)/native/Makefile: $(SWIG_PL_DIR)/native/Makefile.PL
-	cd $(SWIG_PL_DIR)/native; $(PERL) Makefile.PL
+	cd $(SWIG_PL_DIR)/native; $(PERL) Makefile.PL PREFIX=$(prefix)
 
 # There is a "readlink -f" command on some systems for the same purpose,
 # but it's not as portable (e.g. Mac OS X doesn't have it).  These should
@@ -981,4 +981,5 @@ INSTALL_EXTRA_TOOLS=\
   ln -sf svnmucc$(EXEEXT) $(DESTDIR)$(bindir)/svnsyitf$(EXEEXT); \
   if test "$(DESTDIR)$(bindir)" != "$(DESTDIR)$(toolsdir)"; then \
     ln -sf $(bindir)/svnmucc$(EXEEXT) $(DESTDIR)$(toolsdir)/svnmucc$(EXEEXT); \
+    ln -sf $(bindir)/svnbench$(EXEEXT) $(DESTDIR)$(toolsdir)/svn-bench$(EXEEXT); \
   fi

Modified: subversion/branches/remove-log-addressing/build.conf
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/build.conf?rev=1659291&r1=1659290&r2=1659291&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/build.conf (original)
+++ subversion/branches/remove-log-addressing/build.conf Thu Feb 12 15:50:47 2015
@@ -56,6 +56,7 @@ private-built-includes =
         subversion/libsvn_wc/wc-queries.h
         subversion/libsvn_wc/wc-checks.h
         subversion/libsvn_subr/internal_statements.h
+        subversion/tests/libsvn_wc/wc-test-queries.h
         subversion/bindings/swig/proxy/swig_python_external_runtime.swg
         subversion/bindings/swig/proxy/swig_perl_external_runtime.swg
         subversion/bindings/swig/proxy/swig_ruby_external_runtime.swg
@@ -461,6 +462,12 @@ type = sql-header
 path = subversion/libsvn_subr
 sources = internal_statements.sql
 
+[wc_test_queries]
+description = Queries using working copy tests
+type = sql-header
+path = subversion/tests/libsvn_wc
+sources = wc-test-queries.sql
+
 # ----------------------------------------------------------------------------
 #
 # TARGETS FOR I18N SUPPORT
@@ -1469,7 +1476,7 @@ libs = svn svnadmin svndumpfilter svnloo
        svnversion
        mod_authz_svn mod_dav_svn mod_dontdothat
        svnauthz svnauthz-validate svnraisetreeconflict
-       svnfsfs svn-bench
+       svnfsfs svnbench
 
 [__ALL_TESTS__]
 type = project
@@ -1577,9 +1584,9 @@ sources = diff4.c
 install = tools
 libs = libsvn_diff libsvn_subr apriconv apr
 
-[svn-bench]
+[svnbench]
 type = exe
-path = subversion/svn-bench
+path = subversion/svnbench
 install = tools
 libs = libsvn_client libsvn_wc libsvn_ra libsvn_subr libsvn_delta
        apriconv apr

Modified: subversion/branches/remove-log-addressing/subversion/include/private/svn_repos_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/include/private/svn_repos_private.h?rev=1659291&r1=1659290&r2=1659291&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/include/private/svn_repos_private.h (original)
+++ subversion/branches/remove-log-addressing/subversion/include/private/svn_repos_private.h Thu Feb 12 15:50:47 2015
@@ -293,19 +293,13 @@ svn_repos__adjust_mergeinfo_property(svn
                                      apr_pool_t *result_pool,
                                      apr_pool_t *scratch_pool);
 
-/* A header entry.
- *
- * (The headers are currently declared here to be of type apr_array_header_t
- * with svn_repos__dumpfile_header_entry_t entries, but the types could
- * instead be made opaque.)
- */
-typedef struct svn_repos__dumpfile_header_entry_t {
-  const char *key, *val;
-} svn_repos__dumpfile_header_entry_t;
+/* A (nearly) opaque representation of an ordered list of header lines.
+ */
+typedef struct apr_array_header_t svn_repos__dumpfile_headers_t;
 
 /* Create an empty set of headers.
  */
-apr_array_header_t *
+svn_repos__dumpfile_headers_t *
 svn_repos__dumpfile_headers_create(apr_pool_t *pool);
 
 /* Push the header (KEY, VAL) onto HEADERS.
@@ -313,7 +307,7 @@ svn_repos__dumpfile_headers_create(apr_p
  * Duplicate the key and value into HEADERS's pool.
  */
 void
-svn_repos__dumpfile_header_push(apr_array_header_t *headers,
+svn_repos__dumpfile_header_push(svn_repos__dumpfile_headers_t *headers,
                                 const char *key,
                                 const char *val);
 
@@ -322,20 +316,17 @@ svn_repos__dumpfile_header_push(apr_arra
  * Duplicate the key and value into HEADERS's pool.
  */
 void
-svn_repos__dumpfile_header_pushf(apr_array_header_t *headers,
+svn_repos__dumpfile_header_pushf(svn_repos__dumpfile_headers_t *headers,
                                  const char *key,
                                  const char *val_fmt,
                                  ...)
         __attribute__((format(printf, 3, 4)));
 
 /* Write to STREAM the headers in HEADERS followed by a blank line.
- *
- * HEADERS is an array of struct {const char *key, *val;}.
  */
 svn_error_t *
 svn_repos__dump_headers(svn_stream_t *stream,
-                        apr_array_header_t *headers,
-                        svn_boolean_t terminate,
+                        svn_repos__dumpfile_headers_t *headers,
                         apr_pool_t *scratch_pool);
 
 /* Write a revision record to DUMP_STREAM for revision REVISION with revision
@@ -384,7 +375,7 @@ svn_repos__dump_revision_record(svn_stre
  */
 svn_error_t *
 svn_repos__dump_node_record(svn_stream_t *dump_stream,
-                            apr_array_header_t *headers,
+                            svn_repos__dumpfile_headers_t *headers,
                             svn_stringbuf_t *props_str,
                             svn_boolean_t has_text,
                             svn_filesize_t text_content_length,

Modified: subversion/branches/remove-log-addressing/subversion/include/svn_x509.h
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/include/svn_x509.h?rev=1659291&r1=1659290&r2=1659291&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/include/svn_x509.h (original)
+++ subversion/branches/remove-log-addressing/subversion/include/svn_x509.h Thu Feb 12 15:50:47 2015
@@ -38,13 +38,13 @@
 extern "C" {
 #endif
 
-#define SVN_X509_OID_COMMON_NAME  "2.5.4.3"
-#define SVN_X509_OID_COUNTRY      "2.5.4.6"
-#define SVN_X509_OID_LOCALITY     "2.5.4.7"
-#define SVN_X509_OID_STATE        "2.5.4.8"
-#define SVN_X509_OID_ORGANIZATION "2.5.4.10"
-#define SVN_X509_OID_ORG_UNIT     "2.5.4.11"
-#define SVN_X509_OID_EMAIL        "1.2.840.113549.1.9.1"
+#define SVN_X509_OID_COMMON_NAME  "\x55\x04\x03"
+#define SVN_X509_OID_COUNTRY      "\x55\x04\x06"
+#define SVN_X509_OID_LOCALITY     "\x55\x04\x07"
+#define SVN_X509_OID_STATE        "\x55\x04\x08"
+#define SVN_X509_OID_ORGANIZATION "\x55\x04\x0A"
+#define SVN_X509_OID_ORG_UNIT     "\x55\x04\x0B"
+#define SVN_X509_OID_EMAIL        "\x2A\x86\x48\x86\xF7\x0D\x01\x09\x01"
 
 /**
  * Representation of parsed certificate info.
@@ -54,6 +54,13 @@ extern "C" {
 typedef struct svn_x509_certinfo_t svn_x509_certinfo_t;
 
 /**
+ * Representation of an atttribute in an X.509 name (e.g. Subject or Issuer)
+ *
+ * @since New in 1.9.
+ */
+typedef struct svn_x509_name_attr_t svn_x509_name_attr_t;
+
+/**
  * Parse x509 @a der certificate data from @a buf with length @a
  * buflen and return certificate information in @a *certinfo,
  * allocated in @a result_pool.
@@ -77,6 +84,32 @@ svn_x509_parse_cert(svn_x509_certinfo_t
                     apr_pool_t *scratch_pool);
 
 /**
+ * Returns a deep copy of the @a attr, allocated in @a result_pool.
+ * May use @a scratch_pool for temporary allocations.
+ * @since New in 1.9.
+ */
+svn_x509_name_attr_t *
+svn_x509_name_attr_dup(const svn_x509_name_attr_t *attr,
+                       apr_pool_t *result_pool,
+                       apr_pool_t *scratch_pool);
+
+/**
+ * Returns the OID of @a attr as encoded in the certificate.  The
+ * length of the OID will be set in @a len.
+ * @since New in 1.9.
+ */
+const unsigned char *
+svn_x509_name_attr_get_oid(const svn_x509_name_attr_t *attr, apr_size_t *len);
+
+/**
+ * Returns the value of @a attr as a UTF-8 C string.
+ * @since New in 1.9.
+ */
+const char *
+svn_x509_name_attr_get_value(const svn_x509_name_attr_t *attr);
+
+
+/**
  * Returns a deep copy of @a certinfo, allocated in @a result_pool.
  * May use @a scratch_pool for temporary allocations.
  * @since New in 1.9.
@@ -95,25 +128,13 @@ svn_x509_certinfo_get_subject(const svn_
                               apr_pool_t *result_pool);
 
 /**
- * Returns a list of the the object IDs of the attributes available
- * for the subject in the @a certinfo.  The oids in the list are C
- * strings with dot separated integers.
+ * Returns a list of the attributes for the subject in the @a certinfo.
+ * Each member of the list is of type svn_x509_name_attr_t.
  *
  * @since New in 1.9.
  */
 const apr_array_header_t *
-svn_x509_certinfo_get_subject_oids(const svn_x509_certinfo_t *certinfo);
-
-/**
- * Returns the value of the attribute with the object ID specified in
- * @a oid of the subject from @a certinfo.  @a oid is a string of dot
- * separated integers.
- *
- * @since New in 1.9.
- */
-const char *
-svn_x509_certinfo_get_subject_attr(const svn_x509_certinfo_t *certinfo,
-                                   const char *oid);
+svn_x509_certinfo_get_subject_attrs(const svn_x509_certinfo_t *certinfo);
 
 /**
  * Returns the cerficiate issuer DN from @a certinfo.
@@ -124,25 +145,13 @@ svn_x509_certinfo_get_issuer(const svn_x
                              apr_pool_t *result_pool);
 
 /**
- * Returns a list of the the object IDs of the attributes available
- * for the issuer in the @a certinfo.  The oids in the list are C
- * strings with dot separated integers.
+ * Returns a list of the attributes for the issuer in the @a certinfo.
+ * Each member of the list is of type svn_x509_name_attr_t.
  *
  * @since New in 1.9.
  */
 const apr_array_header_t *
-svn_x509_certinfo_get_issuer_oids(const svn_x509_certinfo_t *certinfo);
-
-/**
- * Returns the value of the attribute with the object ID specified in
- * @a oid of the issuer from @a certinfo.  @a oid is a string of dot
- * separated integers.
- *
- * @since New in 1.9.
- */
-const char *
-svn_x509_certinfo_get_issuer_attr(const svn_x509_certinfo_t *certinfo,
-                                  const char *oid);
+svn_x509_certinfo_get_issuer_attrs(const svn_x509_certinfo_t *certinfo);
 
 /**
  * Returns the start of the certificate validity period from @a certinfo.
@@ -175,6 +184,17 @@ svn_x509_certinfo_get_digest(const svn_x
 const apr_array_header_t *
 svn_x509_certinfo_get_hostnames(const svn_x509_certinfo_t *certinfo);
 
+/**
+ * Given an @a oid return a null-terminated C string representation.
+ * For example an OID with the bytes "\x2A\x86\x48\x86\xF7\x0D\x01\x09\x01"
+ * would be converted to the string "1.2.840.113549.1.9.1".  Returns
+ * NULL if the @oid can't be represented as a string.
+ *
+ * @since New in 1.9. */
+const char *
+svn_x509_oid_to_string(const unsigned char *oid, apr_size_t oid_len,
+                       apr_pool_t *scratch_pool, apr_pool_t *result_pool);
+
 #ifdef __cplusplus
 }
 #endif

Modified: subversion/branches/remove-log-addressing/subversion/libsvn_delta/compat.c
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/libsvn_delta/compat.c?rev=1659291&r1=1659290&r2=1659291&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/libsvn_delta/compat.c (original)
+++ subversion/branches/remove-log-addressing/subversion/libsvn_delta/compat.c Thu Feb 12 15:50:47 2015
@@ -1233,12 +1233,12 @@ alter_file_cb(void *baton,
   if (contents)
     {
       /* We may need to re-checksum these contents */
-      if (!(checksum && checksum->kind == svn_checksum_md5))
+      if (checksum && checksum->kind == svn_checksum_md5)
+        md5_checksum = (svn_checksum_t *)checksum;
+      else
         contents = svn_stream_checksummed2(contents, &md5_checksum, NULL,
                                            svn_checksum_md5, TRUE,
                                            scratch_pool);
-      else
-        md5_checksum = (svn_checksum_t *)checksum;
 
       /* Spool the contents to a tempfile, and provide that to the driver. */
       SVN_ERR(svn_stream_open_unique(&tmp_stream, &tmp_filename, NULL,

Modified: subversion/branches/remove-log-addressing/subversion/libsvn_fs_base/fs.c
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/libsvn_fs_base/fs.c?rev=1659291&r1=1659290&r2=1659291&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/libsvn_fs_base/fs.c (original)
+++ subversion/branches/remove-log-addressing/subversion/libsvn_fs_base/fs.c Thu Feb 12 15:50:47 2015
@@ -783,8 +783,8 @@ base_create(svn_fs_t *fs,
   return SVN_NO_ERROR;;
 
 error:
-  svn_error_clear(cleanup_fs(fs));
-  return svn_err;
+  return svn_error_compose_create(svn_err,
+                                  svn_error_trace(cleanup_fs(fs)));
 }
 
 
@@ -871,8 +871,8 @@ base_open(svn_fs_t *fs,
   return SVN_NO_ERROR;
 
  error:
-  svn_error_clear(cleanup_fs(fs));
-  return svn_err;
+  return svn_error_compose_create(svn_err,
+                                  svn_error_trace(cleanup_fs(fs)));
 }
 
 

Modified: subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/lock.c
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/lock.c?rev=1659291&r1=1659290&r2=1659291&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/lock.c (original)
+++ subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/lock.c Thu Feb 12 15:50:47 2015
@@ -451,6 +451,12 @@ unlock_single(svn_fs_t *fs,
               svn_lock_t *lock,
               apr_pool_t *pool);
 
+/* Check if LOCK has been already expired. */
+static svn_boolean_t lock_expired(const svn_lock_t *lock)
+{
+  return lock->expiration_date && (apr_time_now() > lock->expiration_date);
+}
+
 /* Set *LOCK_P to the lock for PATH in FS.  HAVE_WRITE_LOCK should be
    TRUE if the caller (or one of its callers) has taken out the
    repository-wide write lock, FALSE otherwise.  If MUST_EXIST is
@@ -480,7 +486,7 @@ get_lock(svn_lock_t **lock_p,
     return must_exist ? SVN_FS__ERR_NO_SUCH_LOCK(fs, path) : SVN_NO_ERROR;
 
   /* Don't return an expired lock. */
-  if (lock->expiration_date && (apr_time_now() > lock->expiration_date))
+  if (lock_expired(lock))
     {
       /* Only remove the lock if we have the write lock.
          Read operations shouldn't change the filesystem. */
@@ -527,69 +533,17 @@ get_lock_helper(svn_fs_t *fs,
 }
 
 
-/* Baton for locks_walker(). */
-struct walk_locks_baton {
-  svn_fs_get_locks_callback_t get_locks_func;
-  void *get_locks_baton;
-  svn_fs_t *fs;
-};
-
-/* Implements walk_digests_callback_t. */
-static svn_error_t *
-locks_walker(void *baton,
-             const char *fs_path,
-             const char *digest_path,
-             apr_hash_t *children,
-             svn_lock_t *lock,
-             svn_boolean_t have_write_lock,
-             apr_pool_t *pool)
-{
-  struct walk_locks_baton *wlb = baton;
-
-  if (lock)
-    {
-      /* Don't report an expired lock. */
-      if (lock->expiration_date == 0
-          || (apr_time_now() <= lock->expiration_date))
-        {
-          if (wlb->get_locks_func)
-            SVN_ERR(wlb->get_locks_func(wlb->get_locks_baton, lock, pool));
-        }
-      else
-        {
-          /* Only remove the lock if we have the write lock.
-             Read operations shouldn't change the filesystem. */
-          if (have_write_lock)
-            SVN_ERR(unlock_single(wlb->fs, lock, pool));
-        }
-    }
-
-  return SVN_NO_ERROR;
-}
-
-/* Callback type for walk_digest_files().
- *
- * CHILDREN and LOCK come from a read_digest_file(digest_path) call.
- */
-typedef svn_error_t *(*walk_digests_callback_t)(void *baton,
-                                                const char *fs_path,
-                                                const char *digest_path,
-                                                apr_hash_t *children,
-                                                svn_lock_t *lock,
-                                                svn_boolean_t have_write_lock,
-                                                apr_pool_t *pool);
-
-/* A recursive function that calls WALK_DIGESTS_FUNC/WALK_DIGESTS_BATON for
-   all lock digest files in and under PATH in FS.
+/* A function that calls GET_LOCKS_FUNC/GET_LOCKS_BATON for
+   all locks in and under PATH in FS.
    HAVE_WRITE_LOCK should be true if the caller (directly or indirectly)
    has the FS write lock. */
 static svn_error_t *
-walk_digest_files(const char *fs_path,
-                  const char *digest_path,
-                  walk_digests_callback_t walk_digests_func,
-                  void *walk_digests_baton,
-                  svn_boolean_t have_write_lock,
-                  apr_pool_t *pool)
+walk_locks(svn_fs_t *fs,
+           const char *digest_path,
+           svn_fs_get_locks_callback_t get_locks_func,
+           void *get_locks_baton,
+           svn_boolean_t have_write_lock,
+           apr_pool_t *pool)
 {
   apr_hash_index_t *hi;
   apr_hash_t *children;
@@ -597,13 +551,21 @@ walk_digest_files(const char *fs_path,
   svn_lock_t *lock;
 
   /* First, send up any locks in the current digest file. */
-  SVN_ERR(read_digest_file(&children, &lock, fs_path, digest_path, pool));
+  SVN_ERR(read_digest_file(&children, &lock, fs->path, digest_path, pool));
 
-  SVN_ERR(walk_digests_func(walk_digests_baton, fs_path, digest_path,
-                            children, lock,
-                            have_write_lock, pool));
+  if (lock && lock_expired(lock))
+    {
+      /* Only remove the lock if we have the write lock.
+         Read operations shouldn't change the filesystem. */
+      if (have_write_lock)
+        SVN_ERR(unlock_single(fs, lock, pool));
+    }
+  else if (lock)
+    {
+      SVN_ERR(get_locks_func(get_locks_baton, lock, pool));
+    }
 
-  /* Now, recurse on this thing's child entries (if any; bail otherwise). */
+  /* Now, report all the child entries (if any; bail otherwise). */
   if (! apr_hash_count(children))
     return SVN_NO_ERROR;
   subpool = svn_pool_create(pool);
@@ -611,33 +573,24 @@ walk_digest_files(const char *fs_path,
     {
       const char *digest = apr_hash_this_key(hi);
       svn_pool_clear(subpool);
-      SVN_ERR(walk_digest_files
-              (fs_path, digest_path_from_digest(fs_path, digest, subpool),
-               walk_digests_func, walk_digests_baton, have_write_lock, subpool));
-    }
-  svn_pool_destroy(subpool);
-  return SVN_NO_ERROR;
-}
 
-/* A recursive function that calls GET_LOCKS_FUNC/GET_LOCKS_BATON for
-   all locks in and under PATH in FS.
-   HAVE_WRITE_LOCK should be true if the caller (directly or indirectly)
-   has the FS write lock. */
-static svn_error_t *
-walk_locks(svn_fs_t *fs,
-           const char *digest_path,
-           svn_fs_get_locks_callback_t get_locks_func,
-           void *get_locks_baton,
-           svn_boolean_t have_write_lock,
-           apr_pool_t *pool)
-{
-  struct walk_locks_baton wlb;
+      SVN_ERR(read_digest_file
+              (NULL, &lock, fs->path,
+               digest_path_from_digest(fs->path, digest, subpool), subpool));
 
-  wlb.get_locks_func = get_locks_func;
-  wlb.get_locks_baton = get_locks_baton;
-  wlb.fs = fs;
-  SVN_ERR(walk_digest_files(fs->path, digest_path, locks_walker, &wlb,
-                            have_write_lock, pool));
+      if (lock && lock_expired(lock))
+        {
+          /* Only remove the lock if we have the write lock.
+             Read operations shouldn't change the filesystem. */
+          if (have_write_lock)
+            SVN_ERR(unlock_single(fs, lock, pool));
+        }
+      else if (lock)
+        {
+          SVN_ERR(get_locks_func(get_locks_baton, lock, pool));
+        }
+    }
+  svn_pool_destroy(subpool);
   return SVN_NO_ERROR;
 }
 
@@ -715,6 +668,35 @@ svn_fs_fs__allow_locked_operation(const
   return SVN_NO_ERROR;
 }
 
+/* Helper function called from the lock and unlock code.
+   UPDATES is a map from "const char *" parent paths to "apr_array_header_t *"
+   arrays of child paths.  For all of the parent paths of PATH this function
+   adds PATH to the corresponding array of child paths. */
+static void
+schedule_index_update(apr_hash_t *updates,
+                      const char *path,
+                      apr_pool_t *scratch_pool)
+{
+  apr_pool_t *hashpool = apr_hash_pool_get(updates);
+  const char *parent_path = path;
+
+  while (! svn_fspath__is_root(parent_path, strlen(parent_path)))
+    {
+      apr_array_header_t *children;
+
+      parent_path = svn_fspath__dirname(parent_path, scratch_pool);
+      children = svn_hash_gets(updates, parent_path);
+
+      if (! children)
+        {
+          children = apr_array_make(hashpool, 8, sizeof(const char *));
+          svn_hash_sets(updates, apr_pstrdup(hashpool, parent_path), children);
+        }
+
+      APR_ARRAY_PUSH(children, const char *) = path;
+    }
+}
+
 /* The effective arguments for lock_body() below. */
 struct lock_baton {
   svn_fs_t *fs;
@@ -827,7 +809,6 @@ check_lock(svn_error_t **fs_err,
 
 struct lock_info_t {
   const char *path;
-  const char *component;
   svn_lock_t *lock;
   svn_error_t *fs_err;
 };
@@ -850,7 +831,9 @@ lock_body(void *baton, apr_pool_t *pool)
   svn_fs_root_t *root;
   svn_revnum_t youngest;
   const char *rev_0_path;
-  int i, outstanding = 0;
+  int i;
+  apr_hash_t *index_updates = apr_hash_make(pool);
+  apr_hash_index_t *hi;
   apr_pool_t *iterpool = svn_pool_create(pool);
 
   /* Until we implement directory locks someday, we only allow locks
@@ -864,34 +847,28 @@ lock_body(void *baton, apr_pool_t *pool)
     {
       const svn_sort__item_t *item = &APR_ARRAY_IDX(lb->targets, i,
                                                     svn_sort__item_t);
-      const svn_fs_lock_target_t *target = item->value;
       struct lock_info_t info;
 
       svn_pool_clear(iterpool);
 
       info.path = item->key;
-      SVN_ERR(check_lock(&info.fs_err, info.path, target, lb, root, iterpool));
       info.lock = NULL;
-      info.component = NULL;
-      APR_ARRAY_PUSH(lb->infos, struct lock_info_t) = info;
+      info.fs_err = SVN_NO_ERROR;
+
+      SVN_ERR(check_lock(&info.fs_err, info.path, item->value, lb, root,
+                         iterpool));
+
+      /* If no error occurred while pre-checking, schedule the index updates for
+         this path. */
       if (!info.fs_err)
-        ++outstanding;
+        schedule_index_update(index_updates, info.path, iterpool);
+
+      APR_ARRAY_PUSH(lb->infos, struct lock_info_t) = info;
     }
 
   rev_0_path = svn_fs_fs__path_rev_absolute(lb->fs, 0, pool);
 
-  /* Given the paths:
-
-       /foo/bar/f
-       /foo/bar/g
-       /zig/x
-
-     we loop through repeatedly.  The first pass sees '/' on all paths
-     and writes the '/' index.  The second pass sees '/foo' twice and
-     writes that index followed by '/zig' and that index. The third
-     pass sees '/foo/bar' twice and writes that index, and then writes
-     the lock for '/zig/x'.  The fourth pass writes the locks for
-     '/foo/bar/f' and '/foo/bar/g'.
+  /* We apply the scheduled index updates before writing the actual locks.
 
      Writing indices before locks is correct: if interrupted it leaves
      indices without locks rather than locks without indices.  An
@@ -900,92 +877,47 @@ lock_body(void *baton, apr_pool_t *pool)
      index is inconsistent, svn_fs_fs__allow_locked_operation will
      show locked on the file but unlocked on the parent. */
 
-    
-  while (outstanding)
+  for (hi = apr_hash_first(pool, index_updates); hi; hi = apr_hash_next(hi))
     {
-      const char *last_path = NULL;
-      apr_array_header_t *paths;
+      const char *path = apr_hash_this_key(hi);
+      apr_array_header_t *children = apr_hash_this_val(hi);
 
       svn_pool_clear(iterpool);
-      paths = apr_array_make(iterpool, 1, sizeof(const char *));
+      SVN_ERR(add_to_digest(lb->fs->path, children, path, rev_0_path,
+                            iterpool));
+    }
 
-      for (i = 0; i < lb->infos->nelts; ++i)
+  for (i = 0; i < lb->infos->nelts; ++i)
+    {
+      struct lock_info_t *info = &APR_ARRAY_IDX(lb->infos, i,
+                                                struct lock_info_t);
+      svn_sort__item_t *item = &APR_ARRAY_IDX(lb->targets, i, svn_sort__item_t);
+      svn_fs_lock_target_t *target = item->value;
+
+      svn_pool_clear(iterpool);
+
+      if (! info->fs_err)
         {
-          struct lock_info_t *info = &APR_ARRAY_IDX(lb->infos, i,
-                                                    struct lock_info_t);
-          const svn_sort__item_t *item = &APR_ARRAY_IDX(lb->targets, i,
-                                                        svn_sort__item_t);
-          const svn_fs_lock_target_t *target = item->value;
-
-          if (!info->fs_err && !info->lock)
-            {
-              if (!info->component)
-                {
-                  info->component = info->path;
-                  APR_ARRAY_PUSH(paths, const char *) = info->path;
-                  last_path = "/";
-                }
-              else
-                {
-                  info->component = strchr(info->component + 1, '/');
-                  if (!info->component)
-                    {
-                      /* The component is a path to lock, this cannot
-                         match a previous path that need to be indexed. */
-                      if (paths->nelts)
-                        {
-                          SVN_ERR(add_to_digest(lb->fs->path, paths, last_path,
-                                                rev_0_path, iterpool));
-                          apr_array_clear(paths);
-                          last_path = NULL;
-                        }
-
-                      info->lock = svn_lock_create(lb->result_pool);
-                      if (target->token)
-                        info->lock->token = target->token;
-                      else
-                        SVN_ERR(svn_fs_fs__generate_lock_token(
-                                  &(info->lock->token), lb->fs,
-                                  lb->result_pool));
-                      info->lock->path = info->path;
-                      info->lock->owner = lb->fs->access_ctx->username;
-                      info->lock->comment = lb->comment;
-                      info->lock->is_dav_comment = lb->is_dav_comment;
-                      info->lock->creation_date = apr_time_now();
-                      info->lock->expiration_date = lb->expiration_date;
-
-                      info->fs_err = set_lock(lb->fs->path, info->lock,
-                                              rev_0_path, iterpool);
-                      --outstanding;
-                    }
-                  else
-                    {
-                      /* The component is a path to an index. */
-                      apr_size_t len = info->component - info->path;
-
-                      if (last_path
-                          && (strncmp(last_path, info->path, len)
-                              || strlen(last_path) != len))
-                        {
-                          /* No match to the previous paths to index. */
-                          SVN_ERR(add_to_digest(lb->fs->path, paths, last_path,
-                                                rev_0_path, iterpool));
-                          apr_array_clear(paths);
-                          last_path = NULL;
-                        }
-                      APR_ARRAY_PUSH(paths, const char *) = info->path;
-                      if (!last_path)
-                        last_path = apr_pstrndup(iterpool, info->path, len);
-                    }
-                }
-            }
-
-          if (last_path && i == lb->infos->nelts - 1)
-            SVN_ERR(add_to_digest(lb->fs->path, paths, last_path,
-                                  rev_0_path, iterpool));
+          info->lock = svn_lock_create(lb->result_pool);
+          if (target->token)
+            info->lock->token = target->token;
+          else
+            SVN_ERR(svn_fs_fs__generate_lock_token(&(info->lock->token), lb->fs,
+                                                   lb->result_pool));
+
+          info->lock->path = info->path;
+          info->lock->owner = lb->fs->access_ctx->username;
+          info->lock->comment = lb->comment;
+          info->lock->is_dav_comment = lb->is_dav_comment;
+          info->lock->creation_date = apr_time_now();
+          info->lock->expiration_date = lb->expiration_date;
+
+          info->fs_err = set_lock(lb->fs->path, info->lock, rev_0_path,
+                                  iterpool);
         }
     }
-      
+
+  svn_pool_destroy(iterpool);
   return SVN_NO_ERROR;
 }
 
@@ -1026,10 +958,8 @@ check_unlock(svn_error_t **fs_err,
 
 struct unlock_info_t {
   const char *path;
-  const char *component;
   svn_error_t *fs_err;
   svn_boolean_t done;
-  int components;
 };
 
 /* The body of svn_fs_fs__unlock(), which see.
@@ -1050,7 +980,9 @@ unlock_body(void *baton, apr_pool_t *poo
   svn_fs_root_t *root;
   svn_revnum_t youngest;
   const char *rev_0_path;
-  int i, max_components = 0, outstanding = 0;
+  int i;
+  apr_hash_t *indices_updates = apr_hash_make(pool);
+  apr_hash_index_t *hi;
   apr_pool_t *iterpool = svn_pool_create(pool);
 
   SVN_ERR(ub->fs->vtable->youngest_rev(&youngest, ub->fs, pool));
@@ -1061,96 +993,56 @@ unlock_body(void *baton, apr_pool_t *poo
       const svn_sort__item_t *item = &APR_ARRAY_IDX(ub->targets, i,
                                                     svn_sort__item_t);
       const char *token = item->value;
-      struct unlock_info_t info = { 0 };
+      struct unlock_info_t info;
 
       svn_pool_clear(iterpool);
 
       info.path = item->key;
+      info.fs_err = SVN_NO_ERROR;
+      info.done = FALSE;
+
       if (!ub->skip_check)
         SVN_ERR(check_unlock(&info.fs_err, info.path, token, ub, root,
                              iterpool));
-      if (!info.fs_err)
-        {
-          const char *s;
 
-          info.components = 1;
-          info.component = info.path;
-          while((s = strchr(info.component + 1, '/')))
-            {
-              info.component = s;
-              ++info.components;
-            }
-
-          if (info.components > max_components)
-            max_components = info.components;
+      /* If no error occurred while pre-checking, schedule the index updates for
+         this path. */
+      if (!info.fs_err)
+        schedule_index_update(indices_updates, info.path, iterpool);
 
-          ++outstanding;
-        }
       APR_ARRAY_PUSH(ub->infos, struct unlock_info_t) = info;
     }
 
   rev_0_path = svn_fs_fs__path_rev_absolute(ub->fs, 0, pool);
 
-  for (i = max_components; i >= 0; --i)
+  /* Unlike the lock_body(), we need to delete locks *before* we start to
+     update indices. */
+
+  for (i = 0; i < ub->infos->nelts; ++i)
     {
-      const char *last_path = NULL;
-      apr_array_header_t *paths;
-      int j;
+      struct unlock_info_t *info = &APR_ARRAY_IDX(ub->infos, i,
+                                                  struct unlock_info_t);
 
       svn_pool_clear(iterpool);
-      paths = apr_array_make(pool, 1, sizeof(const char *));
 
-      for (j = 0; j < ub->infos->nelts; ++j)
+      if (! info->fs_err)
         {
-          struct unlock_info_t *info = &APR_ARRAY_IDX(ub->infos, j,
-                                                      struct unlock_info_t);
+          SVN_ERR(delete_lock(ub->fs->path, info->path, iterpool));
+          info->done = TRUE;
+        }
+    }
 
-          if (!info->fs_err && info->path)
-            {
+  for (hi = apr_hash_first(pool, indices_updates); hi; hi = apr_hash_next(hi))
+    {
+      const char *path = apr_hash_this_key(hi);
+      apr_array_header_t *children = apr_hash_this_val(hi);
 
-              if (info->components == i)
-                {
-                  SVN_ERR(delete_lock(ub->fs->path, info->path, iterpool));
-                  info->done = TRUE;
-                }
-              else if (info->components > i)
-                {
-                  apr_size_t len = info->component - info->path;
-
-                  if (last_path
-                      && strcmp(last_path, "/")
-                      && (strncmp(last_path, info->path, len)
-                          || strlen(last_path) != len))
-                    {
-                      SVN_ERR(delete_from_digest(ub->fs->path, paths, last_path,
-                                                 rev_0_path, iterpool));
-                      apr_array_clear(paths);
-                      last_path = NULL;
-                    }
-                  APR_ARRAY_PUSH(paths, const char *) = info->path;
-                  if (!last_path)
-                    {
-                      if (info->component > info->path)
-                        last_path = apr_pstrndup(pool, info->path, len);
-                      else
-                        last_path = "/";
-                    }
-
-                  if (info->component > info->path)
-                    {
-                      --info->component;
-                      while(info->component[0] != '/')
-                        --info->component;
-                    }
-                }
-            }
-
-          if (last_path && j == ub->infos->nelts - 1)
-            SVN_ERR(delete_from_digest(ub->fs->path, paths, last_path,
-                                       rev_0_path, iterpool));
-        }
+      svn_pool_clear(iterpool);
+      SVN_ERR(delete_from_digest(ub->fs->path, children, path, rev_0_path,
+                                 iterpool));
     }
 
+  svn_pool_destroy(iterpool);
   return SVN_NO_ERROR;
 }
 

Propchange: subversion/branches/remove-log-addressing/subversion/libsvn_fs_x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Feb 12 15:50:47 2015
@@ -88,5 +88,5 @@
 /subversion/branches/verify-at-commit/subversion/libsvn_fs_x:1462039-1462408
 /subversion/branches/verify-keep-going/subversion/libsvn_fs_x:1439280-1492639,1546002-1546110
 /subversion/branches/wc-collate-path/subversion/libsvn_fs_x:1402685-1480384
-/subversion/trunk/subversion/libsvn_fs_fs:1415133-1596500,1596567,1597414,1597989,1598273,1599140,1600872,1601633,1603485-1603487,1603499,1603605,1604128,1604188,1604413-1604414,1604416-1604417,1604421,1604442,1604700,1604717,1604720,1604726,1604755,1604794,1604802,1604824,1604836,1604844,1604902-1604903,1604911,1604925,1604933,1604947,1605059-1605060,1605064-1605065,1605068,1605071-1605073,1605075,1605123,1605188-1605189,1605191,1605197,1605444,1605633,1606132,1606142,1606144,1606514,1606526,1606528,1606551,1606554,1606564,1606598-1606599,1606656,1606658,1606662,1606744,1606840,1607085,1607572,1612407,1612810,1613339,1613872,1614611,1615348,1615351-1615352,1615356,1616338-1616339,1616613,1617586,1617688,1618138,1618151,1618153,1618226,1618641,1618653,1618662,1619068,1619358,1619413,1619769,1619774,1620602,1620909,1620912,1620928,1620930,1621275,1621635,1622931,1622937,1622942,1622946,1622959-1622960,1622963,1622987,1623007,1623368,1623373,1623377,1623379,1623381,1623398,1623402,162
 4011,1624265,1624512,1626246,1626871,1626873,1626886,1627497-1627498,1627502,1627947-1627949,1627966,1628083,1628093,1628158-1628159,1628161,1628392-1628393,1628415,1628427,1628676,1628738,1628762,1628764,1629854-1629855,1629857,1629865,1629873,1629875,1629879,1630067,1630070,1631049-1631051,1631075,1631115,1631171,1631180,1631185-1631186,1631196-1631197,1631239-1631240,1631548,1631550,1631563,1631567,1631588,1631598,1632646,1632776,1632849,1632851-1632853,1632856-1632857,1632868,1632908,1632926,1633232,1633617-1633618,1634872,1634875,1634879-1634880,1634920,1636478,1636483,1636629,1636644,1637184,1637186,1637330,1637358,1637363,1637393,1639319,1639322,1639335,1639348,1639352,1639355,1639358,1639414,1639419,1639426,1639430,1639436,1639440,1639549,1640061-1640062,1640197,1640915,1640966,1641013,1643139,1643233,1645567,1646021,1646712,1646716,1647537,1647540-1647541,1647820,1647905,1648230,1648238,1648241-1648243,1648253,1648272,1648532,1648537-1648539,1648542,1648591,1648612,1653608
-/subversion/trunk/subversion/libsvn_fs_x:1414756-1509914,1603891-1658357
+/subversion/trunk/subversion/libsvn_fs_fs:1415133-1596500,1596567,1597414,1597989,1598273,1599140,1600872,1601633,1603485-1603487,1603499,1603605,1604128,1604188,1604413-1604414,1604416-1604417,1604421,1604442,1604700,1604717,1604720,1604726,1604755,1604794,1604802,1604824,1604836,1604844,1604902-1604903,1604911,1604925,1604933,1604947,1605059-1605060,1605064-1605065,1605068,1605071-1605073,1605075,1605123,1605188-1605189,1605191,1605197,1605444,1605633,1606132,1606142,1606144,1606514,1606526,1606528,1606551,1606554,1606564,1606598-1606599,1606656,1606658,1606662,1606744,1606840,1607085,1607572,1612407,1612810,1613339,1613872,1614611,1615348,1615351-1615352,1615356,1616338-1616339,1616613,1617586,1617688,1618138,1618151,1618153,1618226,1618641,1618653,1618662,1619068,1619358,1619413,1619769,1619774,1620602,1620909,1620912,1620928,1620930,1621275,1621635,1622931,1622937,1622942,1622946,1622959-1622960,1622963,1622987,1623007,1623368,1623373,1623377,1623379,1623381,1623398,1623402,162
 4011,1624265,1624512,1626246,1626871,1626873,1626886,1627497-1627498,1627502,1627947-1627949,1627966,1628083,1628093,1628158-1628159,1628161,1628392-1628393,1628415,1628427,1628676,1628738,1628762,1628764,1629854-1629855,1629857,1629865,1629873,1629875,1629879,1630067,1630070,1631049-1631051,1631075,1631115,1631171,1631180,1631185-1631186,1631196-1631197,1631239-1631240,1631548,1631550,1631563,1631567,1631588,1631598,1632646,1632776,1632849,1632851-1632853,1632856-1632857,1632868,1632908,1632926,1633232,1633617-1633618,1634872,1634875,1634879-1634880,1634920,1636478,1636483,1636629,1636644,1637184,1637186,1637330,1637358,1637363,1637393,1639319,1639322,1639335,1639348,1639352,1639355,1639358,1639414,1639419,1639426,1639430,1639436,1639440,1639549,1640061-1640062,1640197,1640915,1640966,1641013,1643139,1643233,1645567,1646021,1646712,1646716,1647537,1647540-1647541,1647820,1647905,1648230,1648238,1648241-1648243,1648253,1648272,1648532,1648537-1648539,1648542,1648591,1648612,1653608,
 1658482
+/subversion/trunk/subversion/libsvn_fs_x:1414756-1509914,1603891-1659290

Modified: subversion/branches/remove-log-addressing/subversion/libsvn_fs_x/lock.c
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/libsvn_fs_x/lock.c?rev=1659291&r1=1659290&r2=1659291&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/libsvn_fs_x/lock.c (original)
+++ subversion/branches/remove-log-addressing/subversion/libsvn_fs_x/lock.c Thu Feb 12 15:50:47 2015
@@ -559,7 +559,6 @@ static svn_error_t *
 locks_walker(void *baton,
              const char *fs_path,
              const char *digest_path,
-             apr_hash_t *children,
              svn_lock_t *lock,
              svn_boolean_t have_write_lock,
              apr_pool_t *pool)
@@ -589,17 +588,16 @@ locks_walker(void *baton,
 
 /* Callback type for walk_digest_files().
  *
- * CHILDREN and LOCK come from a read_digest_file(digest_path) call.
+ * LOCK come from a read_digest_file(digest_path) call.
  */
 typedef svn_error_t *(*walk_digests_callback_t)(void *baton,
                                                 const char *fs_path,
                                                 const char *digest_path,
-                                                apr_hash_t *children,
                                                 svn_lock_t *lock,
                                                 svn_boolean_t have_write_lock,
                                                 apr_pool_t *pool);
 
-/* A recursive function that calls WALK_DIGESTS_FUNC/WALK_DIGESTS_BATON for
+/* A function that calls WALK_DIGESTS_FUNC/WALK_DIGESTS_BATON for
    all lock digest files in and under PATH in FS.
    HAVE_WRITE_LOCK should be true if the caller (directly or indirectly)
    has the FS write lock. */
@@ -619,11 +617,10 @@ walk_digest_files(const char *fs_path,
   /* First, send up any locks in the current digest file. */
   SVN_ERR(read_digest_file(&children, &lock, fs_path, digest_path, pool));
 
-  SVN_ERR(walk_digests_func(walk_digests_baton, fs_path, digest_path,
-                            children, lock,
+  SVN_ERR(walk_digests_func(walk_digests_baton, fs_path, digest_path, lock,
                             have_write_lock, pool));
 
-  /* Now, recurse on this thing's child entries (if any; bail otherwise). */
+  /* Now, report all the child entries (if any; bail otherwise). */
   if (! apr_hash_count(children))
     return SVN_NO_ERROR;
   subpool = svn_pool_create(pool);
@@ -631,15 +628,19 @@ walk_digest_files(const char *fs_path,
     {
       const char *digest = apr_hash_this_key(hi);
       svn_pool_clear(subpool);
-      SVN_ERR(walk_digest_files
-              (fs_path, digest_path_from_digest(fs_path, digest, subpool),
-               walk_digests_func, walk_digests_baton, have_write_lock, subpool));
+
+      SVN_ERR(read_digest_file
+              (NULL, &lock, fs_path,
+               digest_path_from_digest(fs_path, digest, subpool), subpool));
+
+      SVN_ERR(walk_digests_func(walk_digests_baton, fs_path, digest_path, lock,
+                                have_write_lock, subpool));
     }
   svn_pool_destroy(subpool);
   return SVN_NO_ERROR;
 }
 
-/* A recursive function that calls GET_LOCKS_FUNC/GET_LOCKS_BATON for
+/* A function that calls GET_LOCKS_FUNC/GET_LOCKS_BATON for
    all locks in and under PATH in FS.
    HAVE_WRITE_LOCK should be true if the caller (directly or indirectly)
    has the FS write lock. */

Modified: subversion/branches/remove-log-addressing/subversion/libsvn_repos/dump.c
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/libsvn_repos/dump.c?rev=1659291&r1=1659290&r2=1659291&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/libsvn_repos/dump.c (original)
+++ subversion/branches/remove-log-addressing/subversion/libsvn_repos/dump.c Thu Feb 12 15:50:47 2015
@@ -445,17 +445,24 @@ write_revision_headers(svn_stream_t *str
   return SVN_NO_ERROR;
 }
 
-apr_array_header_t *
+/* A header entry: the element type of the apr_array_header_t which is
+ * the real type of svn_repos__dumpfile_headers_t.
+ */
+typedef struct svn_repos__dumpfile_header_entry_t {
+  const char *key, *val;
+} svn_repos__dumpfile_header_entry_t;
+
+svn_repos__dumpfile_headers_t *
 svn_repos__dumpfile_headers_create(apr_pool_t *pool)
 {
-  apr_array_header_t *headers
+  svn_repos__dumpfile_headers_t *headers
     = apr_array_make(pool, 5, sizeof(svn_repos__dumpfile_header_entry_t));
 
   return headers;
 }
 
 void
-svn_repos__dumpfile_header_push(apr_array_header_t *headers,
+svn_repos__dumpfile_header_push(svn_repos__dumpfile_headers_t *headers,
                                 const char *key,
                                 const char *val)
 {
@@ -467,7 +474,7 @@ svn_repos__dumpfile_header_push(apr_arra
 }
 
 void
-svn_repos__dumpfile_header_pushf(apr_array_header_t *headers,
+svn_repos__dumpfile_header_pushf(svn_repos__dumpfile_headers_t *headers,
                                  const char *key,
                                  const char *val_fmt,
                                  ...)
@@ -484,8 +491,7 @@ svn_repos__dumpfile_header_pushf(apr_arr
 
 svn_error_t *
 svn_repos__dump_headers(svn_stream_t *stream,
-                        apr_array_header_t *headers,
-                        svn_boolean_t terminate,
+                        svn_repos__dumpfile_headers_t *headers,
                         apr_pool_t *scratch_pool)
 {
   int i;
@@ -500,8 +506,7 @@ svn_repos__dump_headers(svn_stream_t *st
     }
 
   /* End of headers */
-  if (terminate)
-    SVN_ERR(svn_stream_puts(stream, "\n"));
+  SVN_ERR(svn_stream_puts(stream, "\n"));
 
   return SVN_NO_ERROR;
 }
@@ -565,7 +570,7 @@ svn_repos__dump_revision_record(svn_stre
 
 svn_error_t *
 svn_repos__dump_node_record(svn_stream_t *dump_stream,
-                            apr_array_header_t *headers,
+                            svn_repos__dumpfile_headers_t *headers,
                             svn_stringbuf_t *props_str,
                             svn_boolean_t has_text,
                             svn_filesize_t text_content_length,
@@ -597,7 +602,7 @@ svn_repos__dump_node_record(svn_stream_t
     }
 
   /* write the headers */
-  SVN_ERR(svn_repos__dump_headers(dump_stream, headers, TRUE, scratch_pool));
+  SVN_ERR(svn_repos__dump_headers(dump_stream, headers, scratch_pool));
 
   /* write the props */
   if (props_str)
@@ -1048,7 +1053,8 @@ dump_node_delete(svn_stream_t *stream,
                  const char *node_relpath,
                  apr_pool_t *pool)
 {
-  apr_array_header_t *headers = svn_repos__dumpfile_headers_create(pool);
+  svn_repos__dumpfile_headers_t *headers
+    = svn_repos__dumpfile_headers_create(pool);
 
   /* Node-path: ... */
   svn_repos__dumpfile_header_push(
@@ -1058,7 +1064,7 @@ dump_node_delete(svn_stream_t *stream,
   svn_repos__dumpfile_header_push(
     headers, SVN_REPOS_DUMPFILE_NODE_ACTION, "delete");
 
-  SVN_ERR(svn_repos__dump_headers(stream, headers, TRUE, pool));
+  SVN_ERR(svn_repos__dump_headers(stream, headers, pool));
   return SVN_NO_ERROR;
 }
 
@@ -1091,7 +1097,8 @@ dump_node(struct edit_baton *eb,
   svn_revnum_t compare_rev = eb->current_rev - 1;
   svn_fs_root_t *compare_root = NULL;
   apr_file_t *delta_file = NULL;
-  apr_array_header_t *headers = svn_repos__dumpfile_headers_create(pool);
+  svn_repos__dumpfile_headers_t *headers
+    = svn_repos__dumpfile_headers_create(pool);
   svn_filesize_t textlen;
 
   /* Maybe validate the path. */
@@ -1324,7 +1331,7 @@ dump_node(struct edit_baton *eb,
          then our dumpstream format demands that at a *minimum*, we
          see a lone "PROPS-END" as a divider between text and props
          content within the content-block. */
-      SVN_ERR(svn_repos__dump_headers(eb->stream, headers, TRUE, pool));
+      SVN_ERR(svn_repos__dump_headers(eb->stream, headers, pool));
       len = 1;
       return svn_stream_write(eb->stream, "\n", &len); /* ### needed? */
     }

Modified: subversion/branches/remove-log-addressing/subversion/libsvn_repos/log.c
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/libsvn_repos/log.c?rev=1659291&r1=1659290&r2=1659291&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/libsvn_repos/log.c (original)
+++ subversion/branches/remove-log-addressing/subversion/libsvn_repos/log.c Thu Feb 12 15:50:47 2015
@@ -1144,7 +1144,16 @@ fill_log_entry(svn_log_entry_t *log_entr
           int i;
 
           /* Requested only some revprops... */
-          
+
+          /* Make "svn:author" and "svn:date" available as svn_string_t
+             for efficient comparison via svn_string_compare().  Note that
+             we want static initialization here and must therefore emulate
+             strlen(x) by sizeof(x)-1. */
+          static const svn_string_t svn_prop_revision_author
+            = {SVN_PROP_REVISION_AUTHOR, sizeof(SVN_PROP_REVISION_AUTHOR)-1};
+          static const svn_string_t svn_prop_revision_date
+            = {SVN_PROP_REVISION_DATE, sizeof(SVN_PROP_REVISION_DATE)-1};
+
           /* often only the standard revprops got requested and delivered.
              In that case, we can simply pass the hash on. */
           if (revprops->nelts == apr_hash_count(r_props) && !censor_revprops)
@@ -1172,10 +1181,8 @@ fill_log_entry(svn_log_entry_t *log_entr
                 svn_string_t *value
                   = apr_hash_get(r_props, name->data, name->len);
                 if (censor_revprops
-                    && !(strncmp(name->data, SVN_PROP_REVISION_AUTHOR,
-                                 name->len) == 0
-                         || strncmp(name->data, SVN_PROP_REVISION_DATE,
-                                    name->len) == 0))
+                    && !svn_string_compare(name, &svn_prop_revision_author)
+                    && !svn_string_compare(name, &svn_prop_revision_date))
                   /* ... but we can only return author/date. */
                   continue;
                 if (log_entry->revprops == NULL)



Mime
View raw message