You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ju...@apache.org on 2011/10/19 12:33:21 UTC

svn commit: r1186075 [1/2] - in /subversion/branches/showing-merge-info: ./ subversion/bindings/javahl/native/ subversion/bindings/javahl/src/org/tigris/subversion/javahl/ subversion/bindings/swig/ subversion/include/ subversion/include/private/ subver...

Author: julianfoad
Date: Wed Oct 19 10:33:19 2011
New Revision: 1186075

URL: http://svn.apache.org/viewvc?rev=1186075&view=rev
Log:
On the 'showing-merge-info' branch: Catch up to trunk@1186071.

Added:
    subversion/branches/showing-merge-info/subversion/tests/cmdline/upgrade_tests_data/upgrade_absent.tar.bz2
      - copied unchanged from r1186071, subversion/trunk/subversion/tests/cmdline/upgrade_tests_data/upgrade_absent.tar.bz2
    subversion/branches/showing-merge-info/subversion/tests/cmdline/upgrade_tests_data/upgrade_absent_repos.tar.bz2
      - copied unchanged from r1186071, subversion/trunk/subversion/tests/cmdline/upgrade_tests_data/upgrade_absent_repos.tar.bz2
Modified:
    subversion/branches/showing-merge-info/   (props changed)
    subversion/branches/showing-merge-info/CHANGES
    subversion/branches/showing-merge-info/INSTALL
    subversion/branches/showing-merge-info/Makefile.in
    subversion/branches/showing-merge-info/subversion/bindings/javahl/native/SVNRepos.cpp
    subversion/branches/showing-merge-info/subversion/bindings/javahl/src/org/tigris/subversion/javahl/SVNClient.java
    subversion/branches/showing-merge-info/subversion/bindings/swig/svn_wc.i
    subversion/branches/showing-merge-info/subversion/include/private/svn_mutex.h
    subversion/branches/showing-merge-info/subversion/include/svn_delta.h
    subversion/branches/showing-merge-info/subversion/include/svn_editor.h
    subversion/branches/showing-merge-info/subversion/include/svn_mergeinfo.h
    subversion/branches/showing-merge-info/subversion/include/svn_sorts.h
    subversion/branches/showing-merge-info/subversion/include/svn_wc.h
    subversion/branches/showing-merge-info/subversion/libsvn_client/add.c
    subversion/branches/showing-merge-info/subversion/libsvn_client/blame.c
    subversion/branches/showing-merge-info/subversion/libsvn_client/client.h
    subversion/branches/showing-merge-info/subversion/libsvn_client/copy.c
    subversion/branches/showing-merge-info/subversion/libsvn_client/log.c
    subversion/branches/showing-merge-info/subversion/libsvn_client/merge.c
    subversion/branches/showing-merge-info/subversion/libsvn_client/mergeinfo.c
    subversion/branches/showing-merge-info/subversion/libsvn_client/ra.c
    subversion/branches/showing-merge-info/subversion/libsvn_delta/compat.c
    subversion/branches/showing-merge-info/subversion/libsvn_delta/editor.c
    subversion/branches/showing-merge-info/subversion/libsvn_diff/diff_file.c
    subversion/branches/showing-merge-info/subversion/libsvn_fs/fs-loader.c
    subversion/branches/showing-merge-info/subversion/libsvn_fs_base/bdb/env.c
    subversion/branches/showing-merge-info/subversion/libsvn_repos/rev_hunt.c
    subversion/branches/showing-merge-info/subversion/libsvn_subr/deprecated.c
    subversion/branches/showing-merge-info/subversion/libsvn_subr/dso.c
    subversion/branches/showing-merge-info/subversion/libsvn_subr/mergeinfo.c
    subversion/branches/showing-merge-info/subversion/libsvn_subr/sqlite.c
    subversion/branches/showing-merge-info/subversion/libsvn_subr/svn_mutex.c
    subversion/branches/showing-merge-info/subversion/libsvn_wc/adm_crawler.c
    subversion/branches/showing-merge-info/subversion/libsvn_wc/adm_ops.c
    subversion/branches/showing-merge-info/subversion/libsvn_wc/deprecated.c
    subversion/branches/showing-merge-info/subversion/libsvn_wc/entries.c
    subversion/branches/showing-merge-info/subversion/libsvn_wc/externals.c
    subversion/branches/showing-merge-info/subversion/libsvn_wc/tree_conflicts.c
    subversion/branches/showing-merge-info/subversion/libsvn_wc/update_editor.c
    subversion/branches/showing-merge-info/subversion/libsvn_wc/upgrade.c
    subversion/branches/showing-merge-info/subversion/libsvn_wc/util.c
    subversion/branches/showing-merge-info/subversion/libsvn_wc/wc.h
    subversion/branches/showing-merge-info/subversion/libsvn_wc/wc_db.c
    subversion/branches/showing-merge-info/subversion/libsvn_wc/wc_db.h
    subversion/branches/showing-merge-info/subversion/svn/add-cmd.c
    subversion/branches/showing-merge-info/subversion/svn/cat-cmd.c
    subversion/branches/showing-merge-info/subversion/svn/changelist-cmd.c
    subversion/branches/showing-merge-info/subversion/svn/cl.h
    subversion/branches/showing-merge-info/subversion/svn/mergeinfo-cmd.c
    subversion/branches/showing-merge-info/subversion/svn/proplist-cmd.c
    subversion/branches/showing-merge-info/subversion/svn/tree-conflicts.c
    subversion/branches/showing-merge-info/subversion/svn/util.c
    subversion/branches/showing-merge-info/subversion/svnrdump/load_editor.c
    subversion/branches/showing-merge-info/subversion/tests/cmdline/basic_tests.py
    subversion/branches/showing-merge-info/subversion/tests/cmdline/cat_tests.py
    subversion/branches/showing-merge-info/subversion/tests/cmdline/depth_tests.py
    subversion/branches/showing-merge-info/subversion/tests/cmdline/tree_conflict_tests.py
    subversion/branches/showing-merge-info/subversion/tests/cmdline/update_tests.py
    subversion/branches/showing-merge-info/subversion/tests/cmdline/upgrade_tests.py
    subversion/branches/showing-merge-info/subversion/tests/libsvn_subr/cache-test.c
    subversion/branches/showing-merge-info/subversion/tests/libsvn_wc/op-depth-test.c
    subversion/branches/showing-merge-info/tools/dev/benchmarks/suite1/benchmark.py
    subversion/branches/showing-merge-info/tools/dev/benchmarks/suite1/cronjob
    subversion/branches/showing-merge-info/tools/dev/benchmarks/suite1/run

Propchange: subversion/branches/showing-merge-info/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Oct 19 10:33:19 2011
@@ -56,4 +56,4 @@
 /subversion/branches/tree-conflicts:868291-873154
 /subversion/branches/tree-conflicts-notify:873926-874008
 /subversion/branches/uris-as-urls:1060426-1064427
-/subversion/trunk:1177607-1182860
+/subversion/trunk:1177607-1186071

Modified: subversion/branches/showing-merge-info/CHANGES
URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/CHANGES?rev=1186075&r1=1186074&r2=1186075&view=diff
==============================================================================
--- subversion/branches/showing-merge-info/CHANGES (original)
+++ subversion/branches/showing-merge-info/CHANGES Wed Oct 19 10:33:19 2011
@@ -10,15 +10,20 @@ http://svn.apache.org/repos/asf/subversi
 
 
 Version 1.7.1
-(?? ??? 2011, from /branches/1.7.x)
+(?? Oct 2011, from /branches/1.7.x)
 http://svn.apache.org/repos/asf/subversion/tags/1.7.1
 
   User-visible changes:
    * improve performance of 'svn info' (r1164386)
    * improve sorting performance (r1167659)
-   * update base completion for 1.7 (r1177001)
+   * update bash completion for 1.7 (r1177001)
    * make 'svn ls' continue to work with 1.0-1.3 repos (r1154278, -379, -82)
    * improve error messages generated by SASL (r1179767)
+   * update INSTALL (r1182115, and others)
+   * error instead of assert when upgrading corrupt WCs (r1182904, -9)
+   * improve memory usage in merge (r1176915)
+   * fix an assertion in merge (r1149103, -35)
+   * improve performance of 'merge --reintegrate' (r1167681)
 
   Developer-visible changes:
    * fix object lifetime issues in the JavaHL bindings (r1175888)
@@ -27,6 +32,9 @@ http://svn.apache.org/repos/asf/subversi
    * improve zlib configuration (r1174761, -98, -806)
    * improve SQLite runtime init for OS X 10.7 compat (r1181666)
    * improve test suite correctness (r1174111)
+   * fix potential segfault seen by TSVN (r1183263)
+   * fix backward compat crashes in JavaHL (r1183054, -347)
+   * fill in repos_* fields of svn_wc_status3_t for repos-only nodes (r1181609)
 
 
 Version 1.7.0

Modified: subversion/branches/showing-merge-info/INSTALL
URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/INSTALL?rev=1186075&r1=1186074&r2=1186075&view=diff
==============================================================================
--- subversion/branches/showing-merge-info/INSTALL (original)
+++ subversion/branches/showing-merge-info/INSTALL Wed Oct 19 10:33:19 2011
@@ -449,7 +449,7 @@ I.    INTRODUCTION
       a precompiled version of the Berkeley DB library is available for
       download at the Subversion web site "Documents & files" area:
 
-          http://subversion.tigris.org/servlets/ProjectDocumentList
+          http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=688
 
       Look in the "Releases > Windows > Windows BDB" section.
 
@@ -887,8 +887,8 @@ II.   INSTALLATION
         libraries is not supported.
       * [Optional] Berkeley DB for backend support of the server
         components -- versions 4.3.27 and 4.4.20 are available from
-        http://subversion.tigris.org/servlets/ProjectDocumentList as
-        db-4.3.27-win32.zip and db-4.4.20-win32.zip.
+        http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=688
+        as db-4.3.27-win32.zip and db-4.4.20-win32.zip.
         For more information see Section I.5.
       * [Optional] Openssl 0.9.7f or higher can be obtained from
         http://www.openssl.org/source/openssl-0.9.7f.tar.gz

Modified: subversion/branches/showing-merge-info/Makefile.in
URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/Makefile.in?rev=1186075&r1=1186074&r2=1186075&view=diff
==============================================================================
--- subversion/branches/showing-merge-info/Makefile.in (original)
+++ subversion/branches/showing-merge-info/Makefile.in Wed Oct 19 10:33:19 2011
@@ -432,11 +432,18 @@ clean-javahl:
 
 extraclean-javahl: clean-javahl
 
-check-javahl: javahl javahl-compat
+check-tigris-javahl: javahl-compat
 	@FIX_JAVAHL_LIB@
-	$(JAVA) "-Dtest.rootdir=$(javahl_test_rootdir)" "-Dtest.srcdir=$(javahl_test_srcdir)" "-Dtest.rooturl=$(BASE_URL)" "-Dtest.fstype=$(FS_TYPE)" -Djava.library.path=@JAVAHL_OBJDIR@:$(libdir) -classpath $(javahl_tests_PATH):$(javahl_tests_CLASSPATH) "-Dtest.tests=$(JAVAHL_TESTS)" org.apache.subversion.javahl.RunTests
 	$(JAVA) "-Dtest.rootdir=$(javahl_test_rootdir)" "-Dtest.srcdir=$(javahl_test_srcdir)" "-Dtest.rooturl=$(BASE_URL)" "-Dtest.fstype=$(FS_TYPE)" -Djava.library.path=@JAVAHL_OBJDIR@:$(libdir) -classpath $(javahl_compat_tests_PATH):$(javahl_tests_CLASSPATH) "-Dtest.tests=$(JAVAHL_TESTS)" org.tigris.subversion.javahl.RunTests
 
+check-apache-javahl: javahl
+	@FIX_JAVAHL_LIB@
+	$(JAVA) "-Dtest.rootdir=$(javahl_test_rootdir)" "-Dtest.srcdir=$(javahl_test_srcdir)" "-Dtest.rooturl=$(BASE_URL)" "-Dtest.fstype=$(FS_TYPE)" -Djava.library.path=@JAVAHL_OBJDIR@:$(libdir) -classpath $(javahl_tests_PATH):$(javahl_tests_CLASSPATH) "-Dtest.tests=$(JAVAHL_TESTS)" org.apache.subversion.javahl.RunTests
+
+check-javahl: check-apache-javahl
+
+check-all-javahl: check-apache-javahl check-tigris-javahl
+
 # "make check CLEANUP=true" will clean up directories for successful tests.
 # "make check TESTS=subversion/tests/cmdline/basic_tests.py"
 #  will perform only basic tests (likewise for other tests).

Modified: subversion/branches/showing-merge-info/subversion/bindings/javahl/native/SVNRepos.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/bindings/javahl/native/SVNRepos.cpp?rev=1186075&r1=1186074&r2=1186075&view=diff
==============================================================================
--- subversion/branches/showing-merge-info/subversion/bindings/javahl/native/SVNRepos.cpp (original)
+++ subversion/branches/showing-merge-info/subversion/bindings/javahl/native/SVNRepos.cpp Wed Oct 19 10:33:19 2011
@@ -678,7 +678,6 @@ jobject SVNRepos::lslocks(File &path, sv
 void SVNRepos::rmlocks(File &path, StringArray &locks)
 {
   SVN::Pool requestPool;
-  apr_pool_t *pool = requestPool.getPool();
   svn_repos_t *repos;
   svn_fs_t *fs;
   svn_fs_access_t *access;
@@ -700,10 +699,11 @@ void SVNRepos::rmlocks(File &path, Strin
     apr_uid_t uid;
     apr_gid_t gid;
     char *un;
-    if (apr_uid_current (&uid, &gid, pool) == APR_SUCCESS &&
-        apr_uid_name_get (&un, uid, pool) == APR_SUCCESS)
+    if (apr_uid_current (&uid, &gid, requestPool.getPool()) == APR_SUCCESS &&
+        apr_uid_name_get (&un, uid, requestPool.getPool()) == APR_SUCCESS)
       {
-        svn_error_t *err = svn_utf_cstring_to_utf8(&username, un, pool);
+        svn_error_t *err = svn_utf_cstring_to_utf8(&username, un,
+                                                   requestPool.getPool());
         svn_error_clear (err);
         if (err)
           username = "administrator";
@@ -711,7 +711,7 @@ void SVNRepos::rmlocks(File &path, Strin
   }
 
   /* Create an access context describing the current user. */
-  SVN_JNI_ERR(svn_fs_create_access(&access, username, pool), );
+  SVN_JNI_ERR(svn_fs_create_access(&access, username, requestPool.getPool()), );
 
   /* Attach the access context to the filesystem. */
   SVN_JNI_ERR(svn_fs_set_access(fs, access), );

Modified: subversion/branches/showing-merge-info/subversion/bindings/javahl/src/org/tigris/subversion/javahl/SVNClient.java
URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/bindings/javahl/src/org/tigris/subversion/javahl/SVNClient.java?rev=1186075&r1=1186074&r2=1186075&view=diff
==============================================================================
--- subversion/branches/showing-merge-info/subversion/bindings/javahl/src/org/tigris/subversion/javahl/SVNClient.java (original)
+++ subversion/branches/showing-merge-info/subversion/bindings/javahl/src/org/tigris/subversion/javahl/SVNClient.java Wed Oct 19 10:33:19 2011
@@ -324,10 +324,20 @@ public class SVNClient implements SVNCli
         implements org.apache.subversion.javahl.callback.UserPasswordCallback
     {
         PromptUserPassword oldPrompt;
+        PromptUserPassword2 oldPrompt2;
+        PromptUserPassword3 oldPrompt3;
 
         PromptUser1Wrapper(PromptUserPassword prompt)
         {
             oldPrompt = prompt;
+
+            /* This mirrors the insanity that was going on in the C++ layer
+               prior to 1.7.  Don't ask, just pray it works. */
+            if (prompt instanceof PromptUserPassword2)
+              oldPrompt2 = (PromptUserPassword2) prompt;
+
+            if (prompt instanceof PromptUserPassword3)
+              oldPrompt3 = (PromptUserPassword3) prompt;
         }
 
         public String getPassword()
@@ -359,7 +369,10 @@ public class SVNClient implements SVNCli
 
         public int askTrustSSLServer(String info, boolean allowPermanently)
         {
-            return askTrustSSLServer(info, allowPermanently);
+            if (oldPrompt2 != null)
+                return oldPrompt2.askTrustSSLServer(info, allowPermanently);
+            else
+                return 0;
         }
 
         public boolean userAllowedSave()
@@ -370,12 +383,19 @@ public class SVNClient implements SVNCli
         public String askQuestion(String realm, String question,
                                   boolean showAnswer, boolean maySave)
         {
-            return askQuestion(realm, question, showAnswer);
+            if (oldPrompt3 != null)
+                return oldPrompt3.askQuestion(realm, question, showAnswer,
+                                              maySave);
+            else
+                return askQuestion(realm, question, showAnswer);
         }
 
         public boolean prompt(String realm, String username, boolean maySave)
         {
-            return prompt(realm, username);
+            if (oldPrompt3 != null)
+                return oldPrompt3.prompt(realm, username, maySave);
+            else
+                return prompt(realm, username);
         }
     }
 

Modified: subversion/branches/showing-merge-info/subversion/bindings/swig/svn_wc.i
URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/bindings/swig/svn_wc.i?rev=1186075&r1=1186074&r2=1186075&view=diff
==============================================================================
--- subversion/branches/showing-merge-info/subversion/bindings/swig/svn_wc.i (original)
+++ subversion/branches/showing-merge-info/subversion/bindings/swig/svn_wc.i Wed Oct 19 10:33:19 2011
@@ -45,6 +45,7 @@
 
 #ifdef SWIGRUBY
 %ignore svn_wc_external_item_create;
+%ignore svn_wc_external_item2_create;
 %ignore svn_wc_external_item_dup;
 %ignore svn_wc_external_item2_dup;
 %ignore svn_wc_revision_status;
@@ -268,11 +269,11 @@ svn_wc_swig_init_asp_dot_net_hack (apr_p
 {
   svn_wc_external_item2_t(apr_pool_t *pool) {
     svn_error_t *err;
-    const svn_wc_external_item2_t *self;
-    err = svn_wc_external_item_create(&self, pool);
+    svn_wc_external_item2_t *self;
+    err = svn_wc_external_item2_create(&self, pool);
     if (err)
       svn_swig_rb_handle_svn_error(err);
-    return (svn_wc_external_item2_t *)self;
+    return self;
   };
 
   ~svn_wc_external_item2_t() {

Modified: subversion/branches/showing-merge-info/subversion/include/private/svn_mutex.h
URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/include/private/svn_mutex.h?rev=1186075&r1=1186074&r2=1186075&view=diff
==============================================================================
--- subversion/branches/showing-merge-info/subversion/include/private/svn_mutex.h (original)
+++ subversion/branches/showing-merge-info/subversion/include/private/svn_mutex.h Wed Oct 19 10:33:19 2011
@@ -42,8 +42,8 @@ extern "C" {
 #if APR_HAS_THREADS
 
 /** A mutex for synchronization between threads. It may be NULL, in
- * which case no synchronization will take place. The latter is useful,
- * if implement some functionality where synchronization is optional.
+ * which case no synchronization will take place. The latter is useful
+ * when implementing some functionality with optional synchronization.
  */
 typedef apr_thread_mutex_t svn_mutex__t;
 
@@ -60,8 +60,7 @@ typedef void svn_mutex__t;
  * the pointer will be set to @c NULL and @ref svn_mutex__lock as well as
  * @ref svn_mutex__unlock will be no-ops.
  * 
- * If @a enable_mutex is set but threading is not supported by APR, this 
- * function returns an @c APR_ENOTIMPL error.
+ * If threading is not supported by APR, this function is a no-op.
  */
 svn_error_t *
 svn_mutex__init(svn_mutex__t **mutex,
@@ -111,7 +110,7 @@ do {                                    
   if (e) return svn_error_trace(e);       \
   e = svn_mutex__unlock(m, (expr));       \
   if (e) return svn_error_trace(e);       \
-} while (0);
+} while (0)
 
 #ifdef __cplusplus
 }

Modified: subversion/branches/showing-merge-info/subversion/include/svn_delta.h
URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/include/svn_delta.h?rev=1186075&r1=1186074&r2=1186075&view=diff
==============================================================================
--- subversion/branches/showing-merge-info/subversion/include/svn_delta.h (original)
+++ subversion/branches/showing-merge-info/subversion/include/svn_delta.h Wed Oct 19 10:33:19 2011
@@ -1105,7 +1105,7 @@ typedef svn_error_t *(*svn_delta_fetch_p
  * @since New in 1.8.
  */
 typedef svn_error_t *(*svn_delta_fetch_kind_func_t)(
-  svn_node_kind_t *kind,
+  svn_kind_t *kind,
   void *baton,
   const char *path,
   apr_pool_t *scratch_pool

Modified: subversion/branches/showing-merge-info/subversion/include/svn_editor.h
URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/include/svn_editor.h?rev=1186075&r1=1186074&r2=1186075&view=diff
==============================================================================
--- subversion/branches/showing-merge-info/subversion/include/svn_editor.h (original)
+++ subversion/branches/showing-merge-info/subversion/include/svn_editor.h Wed Oct 19 10:33:19 2011
@@ -411,7 +411,7 @@ typedef svn_error_t *(*svn_editor_cb_add
 typedef svn_error_t *(*svn_editor_cb_add_absent_t)(
   void *baton,
   const char *relpath,
-  svn_node_kind_t kind,
+  svn_kind_t kind,
   svn_revnum_t replaces_rev,
   apr_pool_t *scratch_pool);
 
@@ -787,7 +787,7 @@ svn_editor_add_symlink(svn_editor_t *edi
 svn_error_t *
 svn_editor_add_absent(svn_editor_t *editor,
                       const char *relpath,
-                      svn_node_kind_t kind,
+                      svn_kind_t kind,
                       svn_revnum_t replaces_rev);
 
 /** Drive @a editor's #svn_editor_cb_set_props_t callback.

Modified: subversion/branches/showing-merge-info/subversion/include/svn_mergeinfo.h
URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/include/svn_mergeinfo.h?rev=1186075&r1=1186074&r2=1186075&view=diff
==============================================================================
--- subversion/branches/showing-merge-info/subversion/include/svn_mergeinfo.h (original)
+++ subversion/branches/showing-merge-info/subversion/include/svn_mergeinfo.h Wed Oct 19 10:33:19 2011
@@ -167,7 +167,8 @@ svn_mergeinfo_parse(svn_mergeinfo_t *mer
 
 /** Calculate the delta between two mergeinfos, @a mergefrom and @a mergeto
  * (which may be @c NULL), and place the result in @a *deleted and @a
- * *added (neither output argument may be @c NULL).
+ * *added (neither output argument may be @c NULL), both allocated in @a
+ * result_pool.
  *
  * @a consider_inheritance determines how the rangelists in the two
  * hashes are compared for equality.  If @a consider_inheritance is FALSE,
@@ -184,8 +185,21 @@ svn_mergeinfo_parse(svn_mergeinfo_t *mer
  *       '/trunk: 1,3-4*,5' == '/trunk: 1,3-4*,5'
  *       '/trunk: 1,3-4,5'  == '/trunk: 1,3-4,5'
  *
+ * @since New in 1.8.
+ */
+svn_error_t *
+svn_mergeinfo_diff2(svn_mergeinfo_t *deleted, svn_mergeinfo_t *added,
+                    svn_mergeinfo_t mergefrom, svn_mergeinfo_t mergeto,
+                    svn_boolean_t consider_inheritance,
+                    apr_pool_t *result_pool,
+                    apr_pool_t *scratch_pool);
+
+/** Similar to svn_mergeinfo_diff2(), but users only one pool.
+ *
+ * @deprecated Provided for backward compatibility with the 1.7 API.
  * @since New in 1.5.
  */
+SVN_DEPRECATED
 svn_error_t *
 svn_mergeinfo_diff(svn_mergeinfo_t *deleted, svn_mergeinfo_t *added,
                    svn_mergeinfo_t mergefrom, svn_mergeinfo_t mergeto,
@@ -195,8 +209,9 @@ svn_mergeinfo_diff(svn_mergeinfo_t *dele
 /** Merge a shallow copy of one mergeinfo, @a changes, into another mergeinfo
  * @a mergeinfo.
  *
- * Additions to @a mergeinfo are allocated in @a result_pool.  Temporary
- * allocations are made in @a scratch_pool.
+ * Rangelists for merge source paths common to @a changes and @a mergeinfo may
+ * result in new rangelists; these are allocated in @a result_pool.
+ * Temporary allocations are made in @a scratch_pool.
  *
  * When intersecting rangelists for a path are merged, the inheritability of
  * the resulting svn_merge_range_t depends on the inheritability of the

Modified: subversion/branches/showing-merge-info/subversion/include/svn_sorts.h
URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/include/svn_sorts.h?rev=1186075&r1=1186074&r2=1186075&view=diff
==============================================================================
--- subversion/branches/showing-merge-info/subversion/include/svn_sorts.h (original)
+++ subversion/branches/showing-merge-info/subversion/include/svn_sorts.h Wed Oct 19 10:33:19 2011
@@ -164,29 +164,38 @@ svn_sort__hash(apr_hash_t *ht,
                                       const svn_sort__item_t *),
                apr_pool_t *pool);
 
-/* Return the lowest index at which the element *KEY should be inserted into
-   the array ARRAY, according to the ordering defined by COMPARE_FUNC.
-   The array must already be sorted in the ordering defined by COMPARE_FUNC.
-   COMPARE_FUNC is defined as for the C stdlib function bsearch(). */
+/* Return the lowest index at which the element @a *key should be inserted into
+ * the array @a array, according to the ordering defined by @a compare_func.
+ * The array must already be sorted in the ordering defined by @a compare_func.
+ * @a compare_func is defined as for the C stdlib function bsearch().
+ *
+ * @note Private. For use by Subversion's own code only.
+ */
 int
 svn_sort__bsearch_lower_bound(const void *key,
                               const apr_array_header_t *array,
                               int (*compare_func)(const void *, const void *));
 
-/* Insert a shallow copy of *NEW_ELEMENT into the array ARRAY at the index
-   INSERT_INDEX, growing the array and shuffling existing elements along to
-   make room. */
+/* Insert a shallow copy of @a *new_element into the array @a array at the index
+ * @a insert_index, growing the array and shuffling existing elements along to
+ * make room.
+ *
+ * @note Private. For use by Subversion's own code only.
+ */
 void
 svn_sort__array_insert(const void *new_element,
                        apr_array_header_t *array,
                        int insert_index);
 
 
-/* Remove ELEMENTS_TO_DELETE elements starting  at DELETE_INDEX from the
-   array ARR. If DELETE_INDEX is not a valid element of ARR,
-   ELEMENTS_TO_DELETE is not greater than zero, or
-   DELETE_INDEX + ELEMENTS_TO_DELETE is greater than ARR->NELTS, then do
-   nothing. */
+/* Remove @a elements_to_delete elements starting at @a delete_index from the
+ * array @a arr. If @a delete_index is not a valid element of @a arr,
+ * @a elements_to_delete is not greater than zero, or
+ * @a delete_index + @a elements_to_delete is greater than @a arr->nelts,
+ * then do nothing.
+ *
+ * @note Private. For use by Subversion's own code only.
+ */
 void
 svn_sort__array_delete(apr_array_header_t *arr,
                        int delete_index,

Modified: subversion/branches/showing-merge-info/subversion/include/svn_wc.h
URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/include/svn_wc.h?rev=1186075&r1=1186074&r2=1186075&view=diff
==============================================================================
--- subversion/branches/showing-merge-info/subversion/include/svn_wc.h (original)
+++ subversion/branches/showing-merge-info/subversion/include/svn_wc.h Wed Oct 19 10:33:19 2011
@@ -781,7 +781,7 @@ svn_wc_traversed_depths(apr_hash_t **dep
  * canonicalized.
  *
  * In order to avoid backwards compatibility problems clients should use
- * svn_wc_external_item_create() to allocate and initialize this structure
+ * svn_wc_external_item2_create() to allocate and initialize this structure
  * instead of doing so themselves.
  *
  * @since New in 1.5.
@@ -822,8 +822,20 @@ typedef struct svn_wc_external_item2_t
  * The current implementation never returns error, but callers should
  * still check for error, for compatibility with future versions.
  *
+ * @since New in 1.8.
+ */
+svn_error_t *
+svn_wc_external_item2_create(svn_wc_external_item2_t **item,
+                             apr_pool_t *pool);
+
+/* Same as svn_wc_external_item2_create() except the pointer to the new
+ * empty item is 'const' which is stupid since the next thing you need to do
+ * is fill in its fields.
+ *
+ * @deprecated Provided for backward compatibility with the 1.7 API.
  * @since New in 1.5.
  */
+SVN_DEPRECATED
 svn_error_t *
 svn_wc_external_item_create(const svn_wc_external_item2_t **item,
                             apr_pool_t *pool);
@@ -1554,6 +1566,8 @@ typedef enum svn_wc_conflict_reason_t
   svn_wc_conflict_reason_replaced,
   /** Object is moved away. @since New in 1.8. */
   svn_wc_conflict_reason_moved_away,
+  /** Object is moved away and was edited post-move. @since New in 1.8. */
+  svn_wc_conflict_reason_moved_away_and_edited,
   /** Object is moved here. @since New in 1.8. */
   svn_wc_conflict_reason_moved_here
 

Modified: subversion/branches/showing-merge-info/subversion/libsvn_client/add.c
URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/libsvn_client/add.c?rev=1186075&r1=1186074&r2=1186075&view=diff
==============================================================================
--- subversion/branches/showing-merge-info/subversion/libsvn_client/add.c (original)
+++ subversion/branches/showing-merge-info/subversion/libsvn_client/add.c Wed Oct 19 10:33:19 2011
@@ -621,16 +621,24 @@ find_existing_parent(const char **existi
                      apr_pool_t *result_pool,
                      apr_pool_t *scratch_pool)
 {
-  int format;
+  svn_node_kind_t kind;
   const char *parent_abspath;
   svn_wc_context_t *wc_ctx = ctx->wc_ctx;
 
-  SVN_ERR(svn_wc_check_wc2(&format, wc_ctx, local_abspath, scratch_pool));
+  SVN_ERR(svn_wc_read_kind(&kind, wc_ctx, local_abspath, FALSE, scratch_pool));
 
-  if (format > 0)
+  if (kind == svn_node_dir)
     {
-      *existing_parent_abspath = apr_pstrdup(result_pool, local_abspath);
-      return SVN_NO_ERROR;
+      svn_boolean_t is_deleted;
+
+      SVN_ERR(svn_wc__node_is_status_deleted(&is_deleted,
+                                             wc_ctx, local_abspath,
+                                             scratch_pool));
+      if (!is_deleted)
+        {
+          *existing_parent_abspath = apr_pstrdup(result_pool, local_abspath);
+          return SVN_NO_ERROR;
+        }
     }
 
   if (svn_dirent_is_root(local_abspath, strlen(local_abspath)))

Modified: subversion/branches/showing-merge-info/subversion/libsvn_client/blame.c
URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/libsvn_client/blame.c?rev=1186075&r1=1186074&r2=1186075&view=diff
==============================================================================
--- subversion/branches/showing-merge-info/subversion/libsvn_client/blame.c (original)
+++ subversion/branches/showing-merge-info/subversion/libsvn_client/blame.c Wed Oct 19 10:33:19 2011
@@ -592,7 +592,6 @@ svn_client_blame5(const char *target,
 {
   struct file_rev_baton frb;
   svn_ra_session_t *ra_session;
-  const char *url;
   svn_revnum_t start_revnum, end_revnum;
   struct blame *walk, *walk_merged = NULL;
   apr_pool_t *iterpool;
@@ -611,9 +610,8 @@ svn_client_blame5(const char *target,
     SVN_ERR(svn_dirent_get_absolute(&target_abspath_or_url, target, pool));
 
   /* Get an RA plugin for this filesystem object. */
-  SVN_ERR(svn_client__ra_session_from_path(&ra_session, &end_revnum,
-                                           &url, target, NULL,
-                                           peg_revision, end,
+  SVN_ERR(svn_client__ra_session_from_path(&ra_session, &end_revnum, NULL,
+                                           target, NULL, peg_revision, end,
                                            ctx, pool));
 
   SVN_ERR(svn_client__get_revision_number(&start_revnum, NULL, ctx->wc_ctx,

Modified: subversion/branches/showing-merge-info/subversion/libsvn_client/client.h
URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/libsvn_client/client.h?rev=1186075&r1=1186074&r2=1186075&view=diff
==============================================================================
--- subversion/branches/showing-merge-info/subversion/libsvn_client/client.h (original)
+++ subversion/branches/showing-merge-info/subversion/libsvn_client/client.h Wed Oct 19 10:33:19 2011
@@ -202,7 +202,7 @@ svn_client__get_youngest_common_ancestor
 
    Store the resulting ra_session in *RA_SESSION_P.  Store the actual
    revision number of the object in *REV_P, and the final resulting
-   URL in *URL_P.
+   URL in *URL_P. REV_P and/or URL_P may be NULL if not wanted.
 
    Use authentication baton cached in CTX to authenticate against the
    repository.

Modified: subversion/branches/showing-merge-info/subversion/libsvn_client/copy.c
URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/libsvn_client/copy.c?rev=1186075&r1=1186074&r2=1186075&view=diff
==============================================================================
--- subversion/branches/showing-merge-info/subversion/libsvn_client/copy.c (original)
+++ subversion/branches/showing-merge-info/subversion/libsvn_client/copy.c Wed Oct 19 10:33:19 2011
@@ -150,7 +150,7 @@ extend_wc_mergeinfo(const char *target_a
 
   /* Combine the provided mergeinfo with any mergeinfo from the WC. */
   if (wc_mergeinfo && mergeinfo)
-    SVN_ERR(svn_mergeinfo_merge(wc_mergeinfo, mergeinfo, pool));
+    SVN_ERR(svn_mergeinfo_merge2(wc_mergeinfo, mergeinfo, pool, pool));
   else if (! wc_mergeinfo)
     wc_mergeinfo = mergeinfo;
 
@@ -1400,7 +1400,8 @@ wc_to_repos_copy(const apr_array_header_
                                           pair->src_abspath_or_url,
                                           iterpool, iterpool));
       if (wc_mergeinfo && mergeinfo)
-        SVN_ERR(svn_mergeinfo_merge(mergeinfo, wc_mergeinfo, iterpool));
+        SVN_ERR(svn_mergeinfo_merge2(mergeinfo, wc_mergeinfo, iterpool,
+                                     iterpool));
       else if (! mergeinfo)
         mergeinfo = wc_mergeinfo;
       if (mergeinfo)

Modified: subversion/branches/showing-merge-info/subversion/libsvn_client/log.c
URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/libsvn_client/log.c?rev=1186075&r1=1186074&r2=1186075&view=diff
==============================================================================
--- subversion/branches/showing-merge-info/subversion/libsvn_client/log.c (original)
+++ subversion/branches/showing-merge-info/subversion/libsvn_client/log.c Wed Oct 19 10:33:19 2011
@@ -283,7 +283,6 @@ svn_client_log5(const apr_array_header_t
   svn_boolean_t has_log_revprops;
   const char *actual_url;
   apr_array_header_t *condensed_targets;
-  svn_revnum_t ignored_revnum;
   svn_opt_revision_t session_opt_rev;
   const char *ra_target;
   pre_15_receiver_baton_t rb = {0};
@@ -485,8 +484,8 @@ svn_client_log5(const apr_array_header_t
     else
       ra_target = url_or_path;
 
-    SVN_ERR(svn_client__ra_session_from_path(&ra_session, &ignored_revnum,
-                                             &actual_url, ra_target, NULL,
+    SVN_ERR(svn_client__ra_session_from_path(&ra_session, NULL, &actual_url,
+                                             ra_target, NULL,
                                              &peg_rev, &session_opt_rev,
                                              ctx, pool));
 

Modified: subversion/branches/showing-merge-info/subversion/libsvn_client/merge.c
URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/libsvn_client/merge.c?rev=1186075&r1=1186074&r2=1186075&view=diff
==============================================================================
--- subversion/branches/showing-merge-info/subversion/libsvn_client/merge.c (original)
+++ subversion/branches/showing-merge-info/subversion/libsvn_client/merge.c Wed Oct 19 10:33:19 2011
@@ -536,7 +536,6 @@ tree_conflict(merge_cmd_baton_t *merge_b
               svn_wc_conflict_reason_t reason)
 {
   const svn_wc_conflict_description2_t *existing_conflict;
-  svn_wc_conflict_description2_t *conflict;
 
   if (merge_b->record_only || merge_b->dry_run)
     return SVN_NO_ERROR;
@@ -546,6 +545,8 @@ tree_conflict(merge_cmd_baton_t *merge_b
                                     merge_b->pool));
   if (existing_conflict == NULL)
     {
+      svn_wc_conflict_description2_t *conflict;
+
       /* There is no existing tree conflict so it is safe to add one. */
       SVN_ERR(make_tree_conflict(&conflict, merge_b, victim_abspath,
                                  node_kind, action, reason));
@@ -1102,7 +1103,6 @@ merge_props_changed(svn_wc_notify_state_
   apr_array_header_t *props;
   merge_cmd_baton_t *merge_b = baton;
   svn_client_ctx_t *ctx = merge_b->ctx;
-  svn_error_t *err;
 
   SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
 
@@ -1134,6 +1134,8 @@ merge_props_changed(svn_wc_notify_state_
      definition, 'svn merge' shouldn't touch any data within .svn/  */
   if (props->nelts)
     {
+      svn_error_t *err;
+
       /* If this is a forward merge then don't add new mergeinfo to
          PATH that is already part of PATH's own history, see
          http://svn.haxx.se/dev/archive-2008-09/0006.shtml.  If the
@@ -1428,7 +1430,6 @@ merge_file_changed(svn_wc_notify_state_t
   merge_cmd_baton_t *merge_b = baton;
   const char *mine_abspath = svn_dirent_join(merge_b->target_abspath,
                                              mine_relpath, scratch_pool);
-  enum svn_wc_merge_outcome_t merge_outcome;
   svn_node_kind_t wc_kind;
   svn_boolean_t is_deleted;
 
@@ -1582,6 +1583,7 @@ merge_file_changed(svn_wc_notify_state_t
   if (older_abspath)
     {
       svn_boolean_t has_local_mods;
+      enum svn_wc_merge_outcome_t merge_outcome;
 
       /* xgettext: the '.working', '.merge-left.r%ld' and
          '.merge-right.r%ld' strings are used to tag onto a file
@@ -1992,8 +1994,6 @@ merge_file_deleted(svn_wc_notify_state_t
   const char *mine_abspath = svn_dirent_join(merge_b->target_abspath,
                                              mine_relpath, scratch_pool);
   svn_node_kind_t kind;
-  svn_boolean_t moved_away;
-  svn_wc_conflict_reason_t reason;
 
   if (merge_b->dry_run)
     {
@@ -2081,21 +2081,26 @@ merge_file_deleted(svn_wc_notify_state_t
         *state = svn_wc_notify_state_obstructed;
       break;
     case svn_node_none:
-      /* The file deleted in the diff does not exist at the current URL.
-       *
-       * This is use case 6 described in the paper attached to issue
-       * #2282.  See also notes/tree-conflicts/detection.txt
-       */
-      SVN_ERR(check_moved_away(&moved_away, merge_b->ctx->wc_ctx,
-                               mine_abspath, scratch_pool));
-      reason = moved_away ? svn_wc_conflict_reason_moved_away
-                          : svn_wc_conflict_reason_deleted;
-      SVN_ERR(tree_conflict(merge_b, mine_abspath, svn_node_file,
-                            svn_wc_conflict_action_delete, reason));
-      if (tree_conflicted)
-        *tree_conflicted = TRUE;
-      if (state)
-        *state = svn_wc_notify_state_missing;
+      {
+        svn_boolean_t moved_away;
+        svn_wc_conflict_reason_t reason;
+
+        /* The file deleted in the diff does not exist at the current URL.
+         *
+         * This is use case 6 described in the paper attached to issue
+         * #2282.  See also notes/tree-conflicts/detection.txt
+         */
+        SVN_ERR(check_moved_away(&moved_away, merge_b->ctx->wc_ctx,
+                                 mine_abspath, scratch_pool));
+        reason = moved_away ? svn_wc_conflict_reason_moved_away
+                            : svn_wc_conflict_reason_deleted;
+        SVN_ERR(tree_conflict(merge_b, mine_abspath, svn_node_file,
+                              svn_wc_conflict_action_delete, reason));
+        if (tree_conflicted)
+          *tree_conflicted = TRUE;
+        if (state)
+          *state = svn_wc_notify_state_missing;
+      }
       break;
     default:
       if (state)
@@ -2324,12 +2329,8 @@ merge_dir_deleted(svn_wc_notify_state_t 
   const char *local_abspath = svn_dirent_join(merge_b->target_abspath,
                                               local_relpath, scratch_pool);
   svn_node_kind_t kind;
-  svn_error_t *err;
   svn_boolean_t is_versioned;
   svn_boolean_t is_deleted;
-  svn_boolean_t moved_away;
-  svn_wc_conflict_reason_t reason;
-
 
   /* Easy out: We are only applying mergeinfo differences. */
   if (merge_b->record_only)
@@ -2376,6 +2377,8 @@ merge_dir_deleted(svn_wc_notify_state_t 
       {
         if (is_versioned && !is_deleted)
           {
+            svn_error_t *err;
+
             /* ### TODO: Before deleting, we should ensure that this dir
                tree is equal to the one we're being asked to delete.
                If not, mark this directory as a tree conflict victim,
@@ -2412,6 +2415,9 @@ merge_dir_deleted(svn_wc_notify_state_t 
           }
         else
           {
+            svn_boolean_t moved_away;
+            svn_wc_conflict_reason_t reason;
+
             /* Dir is already not under version control at this path. */
             /* Raise a tree conflict. */
             SVN_ERR(check_moved_away(&moved_away, merge_b->ctx->wc_ctx,
@@ -2430,19 +2436,24 @@ merge_dir_deleted(svn_wc_notify_state_t 
         *state = svn_wc_notify_state_obstructed;
       break;
     case svn_node_none:
-      /* Dir is already non-existent. This is use case 6 as described in
-       * notes/tree-conflicts/detection.txt.
-       * This case was formerly treated as no-op. */
-      SVN_ERR(check_moved_away(&moved_away, merge_b->ctx->wc_ctx,
-                               local_abspath, scratch_pool));
-      reason = moved_away ? svn_wc_conflict_reason_moved_away
-                          : svn_wc_conflict_reason_deleted;
-      SVN_ERR(tree_conflict(merge_b, local_abspath, svn_node_dir,
-                            svn_wc_conflict_action_delete, reason));
-      if (tree_conflicted)
-        *tree_conflicted = TRUE;
-      if (state)
-        *state = svn_wc_notify_state_missing;
+      {
+        svn_boolean_t moved_away;
+        svn_wc_conflict_reason_t reason;
+
+        /* Dir is already non-existent. This is use case 6 as described in
+         * notes/tree-conflicts/detection.txt.
+         * This case was formerly treated as no-op. */
+        SVN_ERR(check_moved_away(&moved_away, merge_b->ctx->wc_ctx,
+                                 local_abspath, scratch_pool));
+        reason = moved_away ? svn_wc_conflict_reason_moved_away
+                            : svn_wc_conflict_reason_deleted;
+        SVN_ERR(tree_conflict(merge_b, local_abspath, svn_node_dir,
+                              svn_wc_conflict_action_delete, reason));
+        if (tree_conflicted)
+          *tree_conflicted = TRUE;
+        if (state)
+          *state = svn_wc_notify_state_missing;
+      }
       break;
     default:
       if (state)
@@ -2466,7 +2477,6 @@ merge_dir_opened(svn_boolean_t *tree_con
   merge_cmd_baton_t *merge_b = baton;
   const char *local_abspath = svn_dirent_join(merge_b->target_abspath,
                                               local_relpath, scratch_pool);
-  svn_depth_t parent_depth;
   svn_node_kind_t wc_kind;
   svn_wc_notify_state_t obstr_state;
   svn_boolean_t is_deleted;
@@ -2491,6 +2501,8 @@ merge_dir_opened(svn_boolean_t *tree_con
     {
       if (wc_kind == svn_node_none)
         {
+          svn_depth_t parent_depth;
+
           /* If the parent is too shallow to contain this directory,
            * and the directory is not present on disk, skip it.
            * Non-inheritable mergeinfo will be recorded, allowing
@@ -3409,11 +3421,10 @@ get_full_mergeinfo(svn_mergeinfo_t *reco
                    apr_pool_t *result_pool,
                    apr_pool_t *scratch_pool)
 {
-  svn_boolean_t inherited_mergeinfo = FALSE;
-
   /* First, we get the real mergeinfo. */
   if (recorded_mergeinfo)
     {
+      svn_boolean_t inherited_mergeinfo;
       svn_boolean_t inherited_from_repos;
 
       SVN_ERR(svn_client__get_wc_or_repos_mergeinfo(recorded_mergeinfo,
@@ -4203,9 +4214,6 @@ populate_remaining_ranges(apr_array_head
   apr_pool_t *iterpool = svn_pool_create(scratch_pool);
   int i;
   svn_revnum_t gap_start, gap_end;
-  svn_boolean_t child_inherits_implicit;
-  svn_client__merge_path_t *parent;
-  int parent_index;
 
   /* If we aren't honoring mergeinfo or this is a --record-only merge,
      we'll make quick work of this by simply adding dummy REVISION1:REVISION2
@@ -4218,7 +4226,6 @@ populate_remaining_ranges(apr_array_head
             APR_ARRAY_IDX(children_with_mergeinfo, i,
                           svn_client__merge_path_t *);
 
-          parent = NULL;
           svn_pool_clear(iterpool);
 
           /* Issue #3646 'record-only merges create self-referential
@@ -4241,10 +4248,13 @@ populate_remaining_ranges(apr_array_head
             {
               /* Issue #3443 - Subtrees of the merge target can inherit
                  their parent's implicit mergeinfo in most cases. */
-              parent_index = find_nearest_ancestor(children_with_mergeinfo,
-                                                   FALSE, child->abspath);
-              parent = APR_ARRAY_IDX(children_with_mergeinfo, parent_index,
-                                     svn_client__merge_path_t *);
+              int parent_index = find_nearest_ancestor(children_with_mergeinfo,
+                                                       FALSE, child->abspath);
+              svn_client__merge_path_t *parent
+                = APR_ARRAY_IDX(children_with_mergeinfo, parent_index,
+                                svn_client__merge_path_t *);
+              svn_boolean_t child_inherits_implicit;
+
               /* If CHILD is a subtree then its parent must be in
                  CHILDREN_WITH_MERGEINFO, see the global comment
                  'THE CHILDREN_WITH_MERGEINFO ARRAY'. */
@@ -4298,8 +4308,8 @@ populate_remaining_ranges(apr_array_head
       const char *child_url1, *child_url2;
       svn_client__merge_path_t *child =
         APR_ARRAY_IDX(children_with_mergeinfo, i, svn_client__merge_path_t *);
-
-      parent = NULL;
+      svn_client__merge_path_t *parent = NULL;
+      svn_boolean_t child_inherits_implicit;
 
       svn_pool_clear(iterpool);
 
@@ -4338,8 +4348,8 @@ populate_remaining_ranges(apr_array_head
       /* If CHILD isn't the merge target find its parent. */
       if (i > 0)
         {
-          parent_index = find_nearest_ancestor(children_with_mergeinfo,
-                                               FALSE, child->abspath);
+          int parent_index = find_nearest_ancestor(children_with_mergeinfo,
+                                                   FALSE, child->abspath);
           parent = APR_ARRAY_IDX(children_with_mergeinfo, parent_index,
                                  svn_client__merge_path_t *);
           /* If CHILD is a subtree then its parent must be in
@@ -4536,8 +4546,6 @@ update_wc_mergeinfo(svn_mergeinfo_catalo
                     apr_pool_t *scratch_pool)
 {
   apr_pool_t *iterpool = svn_pool_create(scratch_pool);
-  const char *rel_path;
-  svn_mergeinfo_t mergeinfo;
   apr_hash_index_t *hi;
 
   /* Combine the mergeinfo for the revision range just merged into
@@ -4549,6 +4557,8 @@ update_wc_mergeinfo(svn_mergeinfo_catalo
       apr_array_header_t *rangelist;
       svn_error_t *err;
       const char *local_abspath_rel_to_target;
+      const char *rel_path;
+      svn_mergeinfo_t mergeinfo;
 
       svn_pool_clear(iterpool);
 
@@ -4597,7 +4607,7 @@ update_wc_mergeinfo(svn_mergeinfo_catalo
                                    local_abspath_rel_to_target,
                                    iterpool);
       else
-          rel_path = repos_rel_path;
+        rel_path = repos_rel_path;
       rangelist = apr_hash_get(mergeinfo, rel_path, APR_HASH_KEY_STRING);
       if (rangelist == NULL)
         rangelist = apr_array_make(iterpool, 0, sizeof(svn_merge_range_t *));
@@ -5252,7 +5262,8 @@ remove_first_range_from_remaining_ranges
                                            *children_with_mergeinfo,
                                          apr_pool_t *pool)
 {
-  int i, j;
+  int i;
+
   for (i = 0; i < children_with_mergeinfo->nelts; i++)
     {
       svn_client__merge_path_t *child =
@@ -5268,6 +5279,8 @@ remove_first_range_from_remaining_ranges
             {
               apr_array_header_t *orig_remaining_ranges =
                 child->remaining_ranges;
+              int j;
+
               child->remaining_ranges =
                 apr_array_make(pool, (child->remaining_ranges->nelts - 1),
                                sizeof(svn_merge_range_t *));

Modified: subversion/branches/showing-merge-info/subversion/libsvn_client/mergeinfo.c
URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/libsvn_client/mergeinfo.c?rev=1186075&r1=1186074&r2=1186075&view=diff
==============================================================================
--- subversion/branches/showing-merge-info/subversion/libsvn_client/mergeinfo.c (original)
+++ subversion/branches/showing-merge-info/subversion/libsvn_client/mergeinfo.c Wed Oct 19 10:33:19 2011
@@ -1803,19 +1803,18 @@ svn_client_mergeinfo_log(svn_boolean_t f
   /* Open RA sessions to the repository for the source and target.
    * ### TODO: As the source and target must be in the same repository, we
    * should share a single session, tracking the two URLs separately. */
-  
+
   if (!finding_merged)
     {
       svn_revnum_t target_peg_revnum;
-      const char *url;
 
       SVN_ERR(svn_client__ra_session_from_path(&target_session,
-                                               &target_peg_revnum, &url,
+                                               &target_peg_revnum, NULL,
                                                target_path_or_url, NULL,
                                                target_peg_revision,
                                                target_peg_revision,
                                                ctx, scratch_pool));
-      
+
       SVN_ERR(svn_client__get_history_as_mergeinfo(&target_history, NULL,
                                                    target_peg_revnum,
                                                    SVN_INVALID_REVNUM,
@@ -1826,10 +1825,9 @@ svn_client_mergeinfo_log(svn_boolean_t f
 
   {
     svn_revnum_t source_peg_revnum;
-    const char *url;
 
     SVN_ERR(svn_client__ra_session_from_path(&source_session,
-                                             &source_peg_revnum, &url,
+                                             &source_peg_revnum, NULL,
                                              source_path_or_url, NULL,
                                              source_peg_revision,
                                              source_peg_revision,
@@ -1905,9 +1903,9 @@ svn_client_mergeinfo_log(svn_boolean_t f
                                            subtree_history,
                                            subtree_source_history, TRUE,
                                            scratch_pool, iterpool));
-          SVN_ERR(svn_mergeinfo_merge(subtree_mergeinfo,
-                                      merged_via_history,
-                                      scratch_pool));
+          SVN_ERR(svn_mergeinfo_merge2(subtree_mergeinfo,
+                                       merged_via_history,
+                                       scratch_pool, scratch_pool));
         }
 
       SVN_ERR(svn_mergeinfo_inheritable2(&subtree_inheritable_mergeinfo,

Modified: subversion/branches/showing-merge-info/subversion/libsvn_client/ra.c
URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/libsvn_client/ra.c?rev=1186075&r1=1186074&r2=1186075&view=diff
==============================================================================
--- subversion/branches/showing-merge-info/subversion/libsvn_client/ra.c (original)
+++ subversion/branches/showing-merge-info/subversion/libsvn_client/ra.c Wed Oct 19 10:33:19 2011
@@ -447,7 +447,8 @@ path_or_url_local_style(const char *path
    as "head" for a URL or "working" for a working-copy path.
 
    Store the actual revision number of the object in *REV_P, and the
-   final resulting URL in *URL_P.
+   final resulting URL in *URL_P. REV_P and/or URL_P may be NULL if not
+   wanted.
 
    Use authentication baton cached in CTX to authenticate against the
    repository.
@@ -485,8 +486,10 @@ resolve_rev_and_url(svn_revnum_t *rev_p,
     good_rev->kind = svn_opt_revision_head;
   SVN_ERR(svn_client__get_revision_number(&rev, NULL, ctx->wc_ctx, url,
                                           ra_session, good_rev, pool));
-  *rev_p = rev;
-  *url_p = url;
+  if (rev_p)
+    *rev_p = rev;
+  if (url_p)
+    *url_p = url;
 
   return SVN_NO_ERROR;
 }
@@ -505,6 +508,7 @@ svn_client__ra_session_from_path(svn_ra_
   svn_ra_session_t *ra_session;
   const char *initial_url;
   const char *corrected_url;
+  const char *resolved_url;
 
   SVN_ERR(svn_client_url_from_path2(&initial_url, path_or_url, ctx, pool,
                                     pool));
@@ -523,14 +527,16 @@ svn_client__ra_session_from_path(svn_ra_
   if (corrected_url && svn_path_is_url(path_or_url))
     path_or_url = corrected_url;
 
-  SVN_ERR(resolve_rev_and_url(rev_p, url_p, ra_session,
+  SVN_ERR(resolve_rev_and_url(rev_p, &resolved_url, ra_session,
                               path_or_url, peg_revision, revision,
                               ctx, pool));
 
   /* Make the session point to the real URL. */
-  SVN_ERR(svn_ra_reparent(ra_session, *url_p, pool));
+  SVN_ERR(svn_ra_reparent(ra_session, resolved_url, pool));
 
   *ra_session_p = ra_session;
+  if (url_p)
+    *url_p = resolved_url;
 
   return SVN_NO_ERROR;
 }
@@ -823,14 +829,11 @@ svn_client__get_youngest_common_ancestor
    * ### TODO: As they are assumed to be in the same repository, we
    * should share a single session, tracking the two URLs separately. */
   {
-    svn_revnum_t peg;
-    const char *url;
-
-    SVN_ERR(svn_client__ra_session_from_path(&session1, &peg, &url,
+    SVN_ERR(svn_client__ra_session_from_path(&session1, NULL, NULL,
                                              path_or_url1, NULL,
                                              &revision1, &revision1,
                                              ctx, pool));
-    SVN_ERR(svn_client__ra_session_from_path(&session2, &peg, &url,
+    SVN_ERR(svn_client__ra_session_from_path(&session2, NULL, NULL,
                                              path_or_url2, NULL,
                                              &revision2, &revision2,
                                              ctx, pool));

Modified: subversion/branches/showing-merge-info/subversion/libsvn_delta/compat.c
URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/libsvn_delta/compat.c?rev=1186075&r1=1186074&r2=1186075&view=diff
==============================================================================
--- subversion/branches/showing-merge-info/subversion/libsvn_delta/compat.c (original)
+++ subversion/branches/showing-merge-info/subversion/libsvn_delta/compat.c Wed Oct 19 10:33:19 2011
@@ -287,10 +287,10 @@ ev2_add_directory(const char *path,
 {
   struct ev2_dir_baton *pb = parent_baton;
   struct ev2_dir_baton *cb = apr_palloc(result_pool, sizeof(*cb));
-  svn_node_kind_t *kind;
+  svn_kind_t *kind;
 
   kind = apr_palloc(pb->eb->edit_pool, sizeof(*kind));
-  *kind = svn_node_dir;
+  *kind = svn_kind_dir;
   SVN_ERR(add_action(pb->eb, path, ACTION_ADD, kind));
 
   cb->eb = pb->eb;
@@ -362,14 +362,14 @@ ev2_add_file(const char *path,
 {
   struct ev2_file_baton *fb = apr_palloc(result_pool, sizeof(*fb));
   struct ev2_dir_baton *pb = parent_baton;
-  svn_node_kind_t *kind;
+  svn_kind_t *kind;
 
   fb->eb = pb->eb;
   fb->path = apr_pstrdup(result_pool, path);
   *file_baton = fb;
 
   kind = apr_palloc(pb->eb->edit_pool, sizeof(*kind));
-  *kind = svn_node_file;
+  *kind = svn_kind_file;
   SVN_ERR(add_action(pb->eb, path, ACTION_ADD, kind));
 
   return SVN_NO_ERROR;
@@ -547,9 +547,9 @@ struct operation {
                             occuring; directories are OP_OPEN with non-empty
                             props */
   } operation;
-  svn_node_kind_t kind;  /* to copy, mkdir, put or set revprops */
-  svn_revnum_t rev;      /* to copy, valid for add and replace */
-  const char *url;       /* to copy, valid for add and replace */
+  svn_kind_t kind;  /* to copy, mkdir, put or set revprops */
+  svn_revnum_t copyfrom_revision;      /* to copy, valid for add and replace */
+  const char *copyfrom_url;       /* to copy, valid for add and replace */
   const char *src_file;  /* for put, the source file for contents */
   apr_hash_t *children;  /* const char *path -> struct operation * */
   apr_hash_t *props;     /* const char *prop_name ->
@@ -587,8 +587,8 @@ get_operation(const char *path,
       child = apr_pcalloc(result_pool, sizeof(*child));
       child->children = apr_hash_make(result_pool);
       child->operation = OP_OPEN;
-      child->rev = SVN_INVALID_REVNUM;
-      child->kind = svn_node_dir;
+      child->copyfrom_revision = SVN_INVALID_REVNUM;
+      child->kind = svn_kind_dir;
       child->props = NULL;
       apr_hash_set(operation->children, apr_pstrdup(result_pool, path),
                    APR_HASH_KEY_STRING, child);
@@ -653,13 +653,13 @@ build(struct editor_baton *eb,
       if (! ((operation->operation == OP_ADD) ||
              (operation->operation == OP_REPLACE)))
         {
-          if ((operation->kind == svn_node_file)
+          if ((operation->kind == svn_kind_file)
                    && (operation->operation == OP_OPEN))
             operation->operation = OP_PROPSET;
         }
       operation->props = svn_prop_hash_dup(props, eb->edit_pool);
-      if (!operation->rev)
-        operation->rev = rev;
+      if (!operation->copyfrom_revision)
+        operation->copyfrom_revision = rev;
       return SVN_NO_ERROR;
     }
 
@@ -674,15 +674,15 @@ build(struct editor_baton *eb,
 
       SVN_ERR(eb->fetch_kind_func(&operation->kind, eb->fetch_kind_baton,
                                   relpath, scratch_pool));
-      operation->url = url;
-      operation->rev = rev;
+      operation->copyfrom_url = url;
+      operation->copyfrom_revision = rev;
     }
   /* Handle mkdir operations (which can be adds or replacements). */
   else if (action == ACTION_MKDIR)
     {
       operation->operation =
         operation->operation == OP_DELETE ? OP_REPLACE : OP_ADD;
-      operation->kind = svn_node_dir;
+      operation->kind = svn_kind_dir;
     }
   /* Handle put operations (which can be adds, replacements, or opens). */
   else if (action == ACTION_PUT)
@@ -695,15 +695,15 @@ build(struct editor_baton *eb,
         {
           SVN_ERR(eb->fetch_kind_func(&operation->kind, eb->fetch_kind_baton,
                                       relpath, scratch_pool));
-          if (operation->kind == svn_node_file)
+          if (operation->kind == svn_kind_file)
             operation->operation = OP_OPEN;
-          else if (operation->kind == svn_node_none)
+          else if (operation->kind == svn_kind_none)
             operation->operation = OP_ADD;
           else
             return svn_error_createf(SVN_ERR_BAD_URL, NULL,
                                      "'%s' is not a file", relpath);
         }
-      operation->kind = svn_node_file;
+      operation->kind = svn_kind_file;
       operation->src_file = src_file;
     }
   else
@@ -724,6 +724,11 @@ add_directory_cb(void *baton,
                  svn_revnum_t replaces_rev,
                  apr_pool_t *scratch_pool)
 {
+  struct editor_baton *eb = baton;
+
+  SVN_ERR(build(eb, ACTION_MKDIR, relpath, NULL, SVN_INVALID_REVNUM,
+                NULL, NULL, SVN_INVALID_REVNUM, scratch_pool));
+
   return SVN_NO_ERROR;
 }
 
@@ -737,6 +742,11 @@ add_file_cb(void *baton,
             svn_revnum_t replaces_rev,
             apr_pool_t *scratch_pool)
 {
+  struct editor_baton *eb = baton;
+
+  SVN_ERR(build(eb, ACTION_PUT, relpath, NULL, SVN_INVALID_REVNUM,
+                NULL, NULL, SVN_INVALID_REVNUM, scratch_pool));
+
   return SVN_NO_ERROR;
 }
 
@@ -756,7 +766,7 @@ add_symlink_cb(void *baton,
 static svn_error_t *
 add_absent_cb(void *baton,
               const char *relpath,
-              svn_node_kind_t kind,
+              svn_kind_t kind,
               svn_revnum_t replaces_rev,
               apr_pool_t *scratch_pool)
 {
@@ -837,29 +847,56 @@ move_cb(void *baton,
   return SVN_NO_ERROR;
 }
 
+static svn_error_t *
+drive(const struct operation *operation,
+      const svn_delta_editor_t *editor,
+      apr_pool_t *scratch_pool)
+{
+  apr_pool_t *iterpool = svn_pool_create(scratch_pool);
+  apr_hash_index_t *hi;
+
+  for (hi = apr_hash_first(scratch_pool, operation->children);
+       hi; hi = apr_hash_next(hi))
+    {
+      struct operation *child;
+      const char *path;
+      void *file_baton = NULL;
+
+      svn_pool_clear(iterpool);
+      child = svn__apr_hash_index_val(hi);
+      path = svn__apr_hash_index_key(hi);
+
+      if (child->operation == OP_ADD)
+        {
+          if (child->kind == svn_kind_dir)
+            SVN_ERR(editor->add_directory(path, operation->baton,
+                                          child->copyfrom_url,
+                                          child->copyfrom_revision,
+                                          iterpool, &child->baton));
+          else
+            SVN_ERR(editor->add_file(path, operation->baton,
+                                     child->copyfrom_url,
+                                     child->copyfrom_revision, iterpool,
+                                     &file_baton));
+        }
+
+      /*SVN_DBG(("child: '%s'; operation: %d\n", path, child->operation));*/
+      if (child->kind == svn_kind_dir)
+        SVN_ERR(drive(child, editor, iterpool));
+    }
+
+  return SVN_NO_ERROR;
+}
+
 /* This implements svn_editor_cb_complete_t */
 static svn_error_t *
 complete_cb(void *baton,
             apr_pool_t *scratch_pool)
 {
   struct editor_baton *eb = baton;
-  apr_array_header_t *sorted_hash;
-  int i;
 
-  /* Sort the paths touched by this edit.
-   * Ev2 doesn't really have any particular need for depth-first-ness, but
-   * we want to ensure all parent directories are handled before children in
-   * the case of adds (which does introduce an element of depth-first-ness). */
-  sorted_hash = svn_sort__hash(eb->paths, svn_sort_compare_items_as_paths,
-                               scratch_pool);
-
-  for (i = 0; i < sorted_hash->nelts; i++)
-    {
-      svn_sort__item_t *item = &APR_ARRAY_IDX(sorted_hash, i, svn_sort__item_t);
-      const char *path = item->key;
-
-      /* ### We should actually do something here, but for now... */
-    }
+  /* Drive the tree we've created. */
+  SVN_ERR(drive(&eb->root, eb->deditor, scratch_pool));
 
   return svn_error_trace(eb->deditor->close_edit(eb->dedit_baton,
                                                  scratch_pool));
@@ -912,10 +949,10 @@ svn_editor_from_delta(svn_editor_t **edi
   eb->fetch_kind_baton = fetch_kind_baton;
 
   eb->root.children = apr_hash_make(result_pool);
-  eb->root.kind = svn_node_dir;
+  eb->root.kind = svn_kind_dir;
   eb->root.operation = OP_OPEN;
   eb->root.props = NULL;
-  eb->root.rev = SVN_INVALID_REVNUM;
+  eb->root.copyfrom_revision = SVN_INVALID_REVNUM;
 
   SVN_ERR(svn_editor_create(&editor, eb, cancel_func, cancel_baton,
                             result_pool, scratch_pool));

Modified: subversion/branches/showing-merge-info/subversion/libsvn_delta/editor.c
URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/libsvn_delta/editor.c?rev=1186075&r1=1186074&r2=1186075&view=diff
==============================================================================
--- subversion/branches/showing-merge-info/subversion/libsvn_delta/editor.c (original)
+++ subversion/branches/showing-merge-info/subversion/libsvn_delta/editor.c Wed Oct 19 10:33:19 2011
@@ -354,7 +354,7 @@ svn_editor_add_symlink(svn_editor_t *edi
 svn_error_t *
 svn_editor_add_absent(svn_editor_t *editor,
                       const char *relpath,
-                      svn_node_kind_t kind,
+                      svn_kind_t kind,
                       svn_revnum_t replaces_rev)
 {
   svn_error_t *err;

Modified: subversion/branches/showing-merge-info/subversion/libsvn_diff/diff_file.c
URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/libsvn_diff/diff_file.c?rev=1186075&r1=1186074&r2=1186075&view=diff
==============================================================================
--- subversion/branches/showing-merge-info/subversion/libsvn_diff/diff_file.c (original)
+++ subversion/branches/showing-merge-info/subversion/libsvn_diff/diff_file.c Wed Oct 19 10:33:19 2011
@@ -591,9 +591,9 @@ find_identical_suffix(apr_off_t *suffix_
   had_nl = FALSE;
   while (is_match)
     {
+#if SVN_UNALIGNED_ACCESS_IS_OK
       /* Initialize the minimum pointer positions. */
       const char *min_curp[4];
-#if SVN_UNALIGNED_ACCESS_IS_OK
       svn_boolean_t can_read_word;
 #endif /* SVN_UNALIGNED_ACCESS_IS_OK */
 
@@ -616,6 +616,7 @@ find_identical_suffix(apr_off_t *suffix_
 
       DECREMENT_POINTERS(file_for_suffix, file_len, pool);
 
+#if SVN_UNALIGNED_ACCESS_IS_OK
 
       min_curp[0] = file_for_suffix[0].chunk == suffix_min_chunk0
                   ? file_for_suffix[0].buffer + suffix_min_offset0 + 1
@@ -623,8 +624,6 @@ find_identical_suffix(apr_off_t *suffix_
       for (i = 1; i < file_len; i++)
         min_curp[i] = file_for_suffix[i].buffer + 1;
 
-#if SVN_UNALIGNED_ACCESS_IS_OK
-
       /* Scan quickly by reading with machine-word granularity. */
       for (i = 0, can_read_word = TRUE; i < file_len; i++)
         can_read_word = can_read_word

Modified: subversion/branches/showing-merge-info/subversion/libsvn_fs/fs-loader.c
URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/libsvn_fs/fs-loader.c?rev=1186075&r1=1186074&r2=1186075&view=diff
==============================================================================
--- subversion/branches/showing-merge-info/subversion/libsvn_fs/fs-loader.c (original)
+++ subversion/branches/showing-merge-info/subversion/libsvn_fs/fs-loader.c Wed Oct 19 10:33:19 2011
@@ -265,9 +265,8 @@ svn_fs_initialize(apr_pool_t *pool)
     return SVN_NO_ERROR;
 
   common_pool = svn_pool_create(pool);
-#if APR_HAS_THREADS
   SVN_ERR(svn_mutex__init(&common_pool_lock, TRUE, common_pool));
-#endif
+
   /* ### This won't work if POOL is NULL and libsvn_fs is loaded as a DSO
      ### (via libsvn_ra_local say) since the global common_pool will live
      ### longer than the DSO, which gets unloaded when the pool used to

Modified: subversion/branches/showing-merge-info/subversion/libsvn_fs_base/bdb/env.c
URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/libsvn_fs_base/bdb/env.c?rev=1186075&r1=1186074&r2=1186075&view=diff
==============================================================================
--- subversion/branches/showing-merge-info/subversion/libsvn_fs_base/bdb/env.c (original)
+++ subversion/branches/showing-merge-info/subversion/libsvn_fs_base/bdb/env.c Wed Oct 19 10:33:19 2011
@@ -379,7 +379,7 @@ bdb_init_cb(void *baton, apr_pool_t *poo
   bdb_cache_pool = svn_pool_create(pool);
   bdb_cache = apr_hash_make(bdb_cache_pool);
   
-  SVN_ERR(svn_mutex__init(&bdb_cache_lock, APR_HAS_THREADS, bdb_cache_pool));
+  SVN_ERR(svn_mutex__init(&bdb_cache_lock, TRUE, bdb_cache_pool));
   apr_pool_cleanup_register(bdb_cache_pool, NULL, clear_cache,
                             apr_pool_cleanup_null);
 

Modified: subversion/branches/showing-merge-info/subversion/libsvn_repos/rev_hunt.c
URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/libsvn_repos/rev_hunt.c?rev=1186075&r1=1186074&r2=1186075&view=diff
==============================================================================
--- subversion/branches/showing-merge-info/subversion/libsvn_repos/rev_hunt.c (original)
+++ subversion/branches/showing-merge-info/subversion/libsvn_repos/rev_hunt.c Wed Oct 19 10:33:19 2011
@@ -1111,13 +1111,13 @@ get_merged_mergeinfo(apr_hash_t **merged
     SVN_ERR(err);
 
   /* Then calculate and merge the differences. */
-  SVN_ERR(svn_mergeinfo_diff(&deleted, &changed, prev_mergeinfo, curr_mergeinfo,
-                             FALSE, subpool));
-  SVN_ERR(svn_mergeinfo_merge(changed, deleted, subpool));
+  SVN_ERR(svn_mergeinfo_diff2(&deleted, &changed, prev_mergeinfo,
+                              curr_mergeinfo, FALSE, pool, subpool));
+  SVN_ERR(svn_mergeinfo_merge2(changed, deleted, pool, subpool));
 
   /* Store the result. */
   if (apr_hash_count(changed))
-    *merged_mergeinfo = svn_mergeinfo_dup(changed, pool);
+    *merged_mergeinfo = changed;
   else
     *merged_mergeinfo = NULL;
 

Modified: subversion/branches/showing-merge-info/subversion/libsvn_subr/deprecated.c
URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/libsvn_subr/deprecated.c?rev=1186075&r1=1186074&r2=1186075&view=diff
==============================================================================
--- subversion/branches/showing-merge-info/subversion/libsvn_subr/deprecated.c (original)
+++ subversion/branches/showing-merge-info/subversion/libsvn_subr/deprecated.c Wed Oct 19 10:33:19 2011
@@ -1083,6 +1083,17 @@ svn_rangelist_merge(apr_array_header_t *
 }
 
 svn_error_t *
+svn_mergeinfo_diff(svn_mergeinfo_t *deleted, svn_mergeinfo_t *added,
+                   svn_mergeinfo_t from, svn_mergeinfo_t to,
+                   svn_boolean_t consider_inheritance,
+                   apr_pool_t *pool)
+{
+  return svn_error_trace(svn_mergeinfo_diff2(deleted, added, from, to,
+                                             consider_inheritance, pool,
+                                             pool));
+}
+
+svn_error_t *
 svn_mergeinfo_merge(svn_mergeinfo_t mergeinfo,
                     svn_mergeinfo_t changes,
                     apr_pool_t *pool)

Modified: subversion/branches/showing-merge-info/subversion/libsvn_subr/dso.c
URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/libsvn_subr/dso.c?rev=1186075&r1=1186074&r2=1186075&view=diff
==============================================================================
--- subversion/branches/showing-merge-info/subversion/libsvn_subr/dso.c (original)
+++ subversion/branches/showing-merge-info/subversion/libsvn_subr/dso.c Wed Oct 19 10:33:19 2011
@@ -54,7 +54,7 @@ svn_dso_initialize2(void)
 
   dso_pool = svn_pool_create(NULL);
 
-  SVN_ERR(svn_mutex__init(&dso_mutex, APR_HAS_THREADS, dso_pool));
+  SVN_ERR(svn_mutex__init(&dso_mutex, TRUE, dso_pool));
 
   dso_cache = apr_hash_make(dso_pool);
   return SVN_NO_ERROR;

Modified: subversion/branches/showing-merge-info/subversion/libsvn_subr/mergeinfo.c
URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/libsvn_subr/mergeinfo.c?rev=1186075&r1=1186074&r2=1186075&view=diff
==============================================================================
--- subversion/branches/showing-merge-info/subversion/libsvn_subr/mergeinfo.c (original)
+++ subversion/branches/showing-merge-info/subversion/libsvn_subr/mergeinfo.c Wed Oct 19 10:33:19 2011
@@ -1598,31 +1598,32 @@ walk_mergeinfo_hash_for_diff(svn_mergein
 }
 
 svn_error_t *
-svn_mergeinfo_diff(svn_mergeinfo_t *deleted, svn_mergeinfo_t *added,
-                   svn_mergeinfo_t from, svn_mergeinfo_t to,
-                   svn_boolean_t consider_inheritance,
-                   apr_pool_t *pool)
+svn_mergeinfo_diff2(svn_mergeinfo_t *deleted, svn_mergeinfo_t *added,
+                    svn_mergeinfo_t from, svn_mergeinfo_t to,
+                    svn_boolean_t consider_inheritance,
+                    apr_pool_t *result_pool,
+                    apr_pool_t *scratch_pool)
 {
   if (from && to == NULL)
     {
-      *deleted = svn_mergeinfo_dup(from, pool);
-      *added = apr_hash_make(pool);
+      *deleted = svn_mergeinfo_dup(from, result_pool);
+      *added = apr_hash_make(result_pool);
     }
   else if (from == NULL && to)
     {
-      *deleted = apr_hash_make(pool);
-      *added = svn_mergeinfo_dup(to, pool);
+      *deleted = apr_hash_make(result_pool);
+      *added = svn_mergeinfo_dup(to, result_pool);
     }
   else
     {
-      *deleted = apr_hash_make(pool);
-      *added = apr_hash_make(pool);
+      *deleted = apr_hash_make(result_pool);
+      *added = apr_hash_make(result_pool);
 
       if (from && to)
         {
           SVN_ERR(walk_mergeinfo_hash_for_diff(from, to, *deleted, *added,
-                                               consider_inheritance, pool,
-                                               pool));
+                                               consider_inheritance,
+                                               result_pool, scratch_pool));
         }
     }
 
@@ -1639,8 +1640,8 @@ svn_mergeinfo__equals(svn_boolean_t *is_
   if (apr_hash_count(info1) == apr_hash_count(info2))
     {
       svn_mergeinfo_t deleted, added;
-      SVN_ERR(svn_mergeinfo_diff(&deleted, &added, info1, info2,
-                                 consider_inheritance, pool));
+      SVN_ERR(svn_mergeinfo_diff2(&deleted, &added, info1, info2,
+                                  consider_inheritance, pool, pool));
       *is_equal = apr_hash_count(deleted) == 0 && apr_hash_count(added) == 0;
     }
   else

Modified: subversion/branches/showing-merge-info/subversion/libsvn_subr/sqlite.c
URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/libsvn_subr/sqlite.c?rev=1186075&r1=1186074&r2=1186075&view=diff
==============================================================================
--- subversion/branches/showing-merge-info/subversion/libsvn_subr/sqlite.c (original)
+++ subversion/branches/showing-merge-info/subversion/libsvn_subr/sqlite.c Wed Oct 19 10:33:19 2011
@@ -667,13 +667,6 @@ internal_open(sqlite3 **db3, const char 
     flags |= SQLITE_OPEN_NOMUTEX;
 #endif
 
-    /* SQLite 3.5 allows sharing cache instances, even in a multithreaded
-       environment. This allows sharing cached data when we open a database
-       more than once.
-
-       OS X 10.7 doesn't support sqlite3_enable_shared_cache. */
-    flags |= SQLITE_OPEN_SHAREDCACHE;
-
     /* Open the database. Note that a handle is returned, even when an error
        occurs (except for out-of-memory); thus, we can safely use it to
        extract an error message and construct an svn_error_t. */

Modified: subversion/branches/showing-merge-info/subversion/libsvn_subr/svn_mutex.c
URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/libsvn_subr/svn_mutex.c?rev=1186075&r1=1186074&r2=1186075&view=diff
==============================================================================
--- subversion/branches/showing-merge-info/subversion/libsvn_subr/svn_mutex.c (original)
+++ subversion/branches/showing-merge-info/subversion/libsvn_subr/svn_mutex.c Wed Oct 19 10:33:19 2011
@@ -29,8 +29,11 @@ svn_mutex__init(svn_mutex__t **mutex_p, 
                 svn_boolean_t enable_mutex, 
                 apr_pool_t *result_pool)
 {
-#if APR_HAS_THREADS
+  /* always initialize the mutex pointer, even though it is not
+     strictly necessary if APR_HAS_THREADS has not been set */
   *mutex_p = NULL;
+
+#if APR_HAS_THREADS
   if (enable_mutex)
     {
       apr_thread_mutex_t *apr_mutex;
@@ -43,10 +46,6 @@ svn_mutex__init(svn_mutex__t **mutex_p, 
 
       *mutex_p = apr_mutex;
     }
-#else
-  if (enable_mutex)
-    return svn_error_wrap_apr(SVN_ERR_UNSUPPORTED_FEATURE,
-                              _("APR doesn't support threads"));
 #endif
     
   return SVN_NO_ERROR;

Modified: subversion/branches/showing-merge-info/subversion/libsvn_wc/adm_crawler.c
URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/libsvn_wc/adm_crawler.c?rev=1186075&r1=1186074&r2=1186075&view=diff
==============================================================================
--- subversion/branches/showing-merge-info/subversion/libsvn_wc/adm_crawler.c (original)
+++ subversion/branches/showing-merge-info/subversion/libsvn_wc/adm_crawler.c Wed Oct 19 10:33:19 2011
@@ -562,7 +562,7 @@ report_revisions_and_depths(svn_wc__db_t
                    || (dir_depth == svn_depth_immediates
                        && ths->depth != svn_depth_empty)
                    || (ths->depth < svn_depth_infinity
-                       && depth == svn_depth_infinity))
+                       && SVN_DEPTH_IS_RECURSIVE(depth)))
             {
               /* ... or perhaps just a differing revision, lock token,
                  incomplete subdir, the mere presence of the directory

Modified: subversion/branches/showing-merge-info/subversion/libsvn_wc/adm_ops.c
URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/libsvn_wc/adm_ops.c?rev=1186075&r1=1186074&r2=1186075&view=diff
==============================================================================
--- subversion/branches/showing-merge-info/subversion/libsvn_wc/adm_ops.c (original)
+++ subversion/branches/showing-merge-info/subversion/libsvn_wc/adm_ops.c Wed Oct 19 10:33:19 2011
@@ -1165,7 +1165,7 @@ svn_wc_add4(svn_wc_context_t *wc_ctx,
                                          repos_relpath,
                                          repos_root_url, repos_uuid,
                                          copyfrom_rev,
-                                         NULL /* children */, depth,
+                                         NULL /* children */, FALSE, depth,
                                          NULL /* conflicts */,
                                          NULL /* work items */,
                                          scratch_pool));

Modified: subversion/branches/showing-merge-info/subversion/libsvn_wc/deprecated.c
URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/libsvn_wc/deprecated.c?rev=1186075&r1=1186074&r2=1186075&view=diff
==============================================================================
--- subversion/branches/showing-merge-info/subversion/libsvn_wc/deprecated.c (original)
+++ subversion/branches/showing-merge-info/subversion/libsvn_wc/deprecated.c Wed Oct 19 10:33:19 2011
@@ -3426,6 +3426,14 @@ svn_wc_get_switch_editor(svn_revnum_t *t
 }
 
 
+svn_error_t *
+svn_wc_external_item_create(const svn_wc_external_item2_t **item,
+                            apr_pool_t *pool)
+{
+  *item = apr_pcalloc(pool, sizeof(svn_wc_external_item2_t));
+  return SVN_NO_ERROR;
+}
+
 svn_wc_external_item_t *
 svn_wc_external_item_dup(const svn_wc_external_item_t *item,
                          apr_pool_t *pool)

Modified: subversion/branches/showing-merge-info/subversion/libsvn_wc/entries.c
URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/libsvn_wc/entries.c?rev=1186075&r1=1186074&r2=1186075&view=diff
==============================================================================
--- subversion/branches/showing-merge-info/subversion/libsvn_wc/entries.c (original)
+++ subversion/branches/showing-merge-info/subversion/libsvn_wc/entries.c Wed Oct 19 10:33:19 2011
@@ -1466,6 +1466,8 @@ insert_node(svn_sqlite__db_t *sdb,
     SVN_ERR(svn_sqlite__bind_text(stmt, 8, "incomplete"));
   else if (node->presence == svn_wc__db_status_excluded)
     SVN_ERR(svn_sqlite__bind_text(stmt, 8, "excluded"));
+  else if (node->presence == svn_wc__db_status_server_excluded)
+    SVN_ERR(svn_sqlite__bind_text(stmt, 8, "absent"));
 
   if (node->kind == svn_node_none)
     SVN_ERR(svn_sqlite__bind_text(stmt, 10, "unknown"));
@@ -1697,10 +1699,10 @@ write_entry(struct write_baton **entry_n
       SVN_ERR_ASSERT(!entry->incomplete);
       base_node->presence = svn_wc__db_status_not_present;
     }
-
-  if (entry->absent)
+  else if (entry->absent)
     {
-      SVN_ERR_ASSERT(base_node && !working_node);
+      SVN_ERR_ASSERT(base_node && !working_node && !below_working_node);
+      SVN_ERR_ASSERT(!entry->incomplete);
       base_node->presence = svn_wc__db_status_server_excluded;
     }
 
@@ -1873,9 +1875,22 @@ write_entry(struct write_baton **entry_n
 
       if (entry->deleted)
         {
-          base_node->presence = svn_wc__db_status_not_present;
+          SVN_ERR_ASSERT(base_node->presence == svn_wc__db_status_not_present);
+          /* ### should be svn_node_unknown, but let's store what we have. */
+          base_node->kind = entry->kind;
+        }
+      else if (entry->absent)
+        {
+          SVN_ERR_ASSERT(base_node->presence 
+                                == svn_wc__db_status_server_excluded);
           /* ### should be svn_node_unknown, but let's store what we have. */
           base_node->kind = entry->kind;
+
+          /* Store the most likely revision in the node to avoid
+             base nodes without a valid revision. Of course
+             we remember that the data is still incomplete. */
+          if (!SVN_IS_VALID_REVNUM(base_node->revision) && parent_node->base)
+            base_node->revision = parent_node->base->revision;
         }
       else
         {
@@ -1934,9 +1949,20 @@ write_entry(struct write_baton **entry_n
                 found_md5_checksum = text_base_info->normal_base.md5_checksum;
               else
                 found_md5_checksum = NULL;
-              if (entry_md5_checksum && found_md5_checksum)
-                SVN_ERR_ASSERT(svn_checksum_match(entry_md5_checksum,
-                                                  found_md5_checksum));
+              if (entry_md5_checksum && found_md5_checksum &&
+                  !svn_checksum_match(entry_md5_checksum, found_md5_checksum))
+                return svn_error_createf(SVN_ERR_WC_CORRUPT, NULL,
+                                         _("Bad base MD5 checksum for '%s'; "
+                                           "expected: '%s'; found '%s'; "),
+                                       svn_dirent_local_style(
+                                         svn_dirent_join(root_abspath,
+                                                         local_relpath,
+                                                         scratch_pool),
+                                         scratch_pool),
+                                       svn_checksum_to_cstring_display(
+                                         entry_md5_checksum, scratch_pool),
+                                       svn_checksum_to_cstring_display(
+                                         found_md5_checksum, scratch_pool));
               else
                 {
                   /* ### Not sure what conditions this should cover. */

Modified: subversion/branches/showing-merge-info/subversion/libsvn_wc/externals.c
URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/libsvn_wc/externals.c?rev=1186075&r1=1186074&r2=1186075&view=diff
==============================================================================
--- subversion/branches/showing-merge-info/subversion/libsvn_wc/externals.c (original)
+++ subversion/branches/showing-merge-info/subversion/libsvn_wc/externals.c Wed Oct 19 10:33:19 2011
@@ -201,8 +201,7 @@ svn_wc_parse_externals_description3(apr_
       for (num_line_parts = 0; line_parts[num_line_parts]; num_line_parts++)
         ;
 
-      SVN_ERR(svn_wc_external_item_create
-              ((const svn_wc_external_item2_t **) &item, pool));
+      SVN_ERR(svn_wc_external_item2_create(&item, pool));
       item->revision.kind = svn_opt_revision_unspecified;
       item->peg_revision.kind = svn_opt_revision_unspecified;
 

Modified: subversion/branches/showing-merge-info/subversion/libsvn_wc/tree_conflicts.c
URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/libsvn_wc/tree_conflicts.c?rev=1186075&r1=1186074&r2=1186075&view=diff
==============================================================================
--- subversion/branches/showing-merge-info/subversion/libsvn_wc/tree_conflicts.c (original)
+++ subversion/branches/showing-merge-info/subversion/libsvn_wc/tree_conflicts.c Wed Oct 19 10:33:19 2011
@@ -76,8 +76,9 @@ const svn_token_map_t svn_wc__conflict_r
   { "added",       svn_wc_conflict_reason_added },
   { "replaced",    svn_wc_conflict_reason_replaced },
   { "unversioned", svn_wc_conflict_reason_unversioned },
-  { "moved-here", svn_wc_conflict_reason_moved_here },
   { "moved-away", svn_wc_conflict_reason_moved_away },
+  { "moved-away-and-edited", svn_wc_conflict_reason_moved_away_and_edited },
+  { "moved-here", svn_wc_conflict_reason_moved_here },
   { NULL }
 };
 
@@ -365,7 +366,7 @@ svn_wc__serialize_conflict(svn_skel_t **
 
   /* Victim path (escaping separator chars). */
   victim_basename = svn_dirent_basename(conflict->local_abspath, result_pool);
-  SVN_ERR_ASSERT(strlen(victim_basename) > 0);
+  SVN_ERR_ASSERT(victim_basename[0]);
   svn_skel__prepend(svn_skel__str_atom(victim_basename, result_pool), c_skel);
 
   svn_skel__prepend(svn_skel__str_atom("conflict", result_pool), c_skel);