Author: philip
Date: Mon Jan 16 15:24:08 2012
New Revision: 1232025

URL: http://svn.apache.org/viewvc?rev=1232025&view=rev
Log:
Sync the moves-scan-log branch with trunk@1232008

Modified:
    subversion/branches/moves-scan-log/   (props changed)
    subversion/branches/moves-scan-log/CHANGES
    subversion/branches/moves-scan-log/build.conf
    subversion/branches/moves-scan-log/configure.ac
    subversion/branches/moves-scan-log/notes/http-and-webdav/webdav-protocol
    subversion/branches/moves-scan-log/notes/knobs
    subversion/branches/moves-scan-log/subversion/bindings/swig/ruby/svn/info.rb
    subversion/branches/moves-scan-log/subversion/bindings/swig/ruby/svn/util.rb
    
subversion/branches/moves-scan-log/subversion/include/private/svn_wc_private.h
    subversion/branches/moves-scan-log/subversion/include/svn_delta.h
    subversion/branches/moves-scan-log/subversion/libsvn_client/client.h
    subversion/branches/moves-scan-log/subversion/libsvn_client/commit_util.c
    subversion/branches/moves-scan-log/subversion/libsvn_client/copy.c
    subversion/branches/moves-scan-log/subversion/libsvn_client/export.c
    subversion/branches/moves-scan-log/subversion/libsvn_client/merge.c
    subversion/branches/moves-scan-log/subversion/libsvn_client/mergeinfo.c
    subversion/branches/moves-scan-log/subversion/libsvn_client/mergeinfo.h
    subversion/branches/moves-scan-log/subversion/libsvn_client/patch.c
    subversion/branches/moves-scan-log/subversion/libsvn_client/prop_commands.c
    subversion/branches/moves-scan-log/subversion/libsvn_client/ra.c
    subversion/branches/moves-scan-log/subversion/libsvn_client/repos_diff.c
    subversion/branches/moves-scan-log/subversion/libsvn_delta/compat.c
    subversion/branches/moves-scan-log/subversion/libsvn_fs_base/bdb/env.c
    subversion/branches/moves-scan-log/subversion/libsvn_fs_fs/fs_fs.c
    subversion/branches/moves-scan-log/subversion/libsvn_ra_neon/log.c
    subversion/branches/moves-scan-log/subversion/libsvn_ra_neon/session.c
    subversion/branches/moves-scan-log/subversion/libsvn_ra_serf/serf.c
    subversion/branches/moves-scan-log/subversion/libsvn_ra_serf/util.c
    subversion/branches/moves-scan-log/subversion/libsvn_repos/commit.c
    subversion/branches/moves-scan-log/subversion/libsvn_repos/dump.c
    subversion/branches/moves-scan-log/subversion/libsvn_subr/config_file.c
    subversion/branches/moves-scan-log/subversion/libsvn_subr/debug.c
    subversion/branches/moves-scan-log/subversion/libsvn_subr/gpg_agent.c
    subversion/branches/moves-scan-log/subversion/libsvn_subr/simple_providers.c
    
subversion/branches/moves-scan-log/subversion/libsvn_subr/ssl_client_cert_pw_providers.c
    subversion/branches/moves-scan-log/subversion/libsvn_subr/svn_string.c
    subversion/branches/moves-scan-log/subversion/libsvn_wc/adm_ops.c
    subversion/branches/moves-scan-log/subversion/libsvn_wc/diff_editor.c
    subversion/branches/moves-scan-log/subversion/libsvn_wc/externals.c
    subversion/branches/moves-scan-log/subversion/libsvn_wc/info.c
    subversion/branches/moves-scan-log/subversion/libsvn_wc/node.c
    subversion/branches/moves-scan-log/subversion/libsvn_wc/status.c
    subversion/branches/moves-scan-log/subversion/libsvn_wc/update_editor.c
    subversion/branches/moves-scan-log/subversion/libsvn_wc/util.c
    subversion/branches/moves-scan-log/subversion/libsvn_wc/wc.h
    subversion/branches/moves-scan-log/subversion/libsvn_wc/wc_db.c
    subversion/branches/moves-scan-log/subversion/mod_dav_svn/dav_svn.h
    subversion/branches/moves-scan-log/subversion/mod_dav_svn/lock.c
    subversion/branches/moves-scan-log/subversion/mod_dav_svn/merge.c
    subversion/branches/moves-scan-log/subversion/mod_dav_svn/util.c
    subversion/branches/moves-scan-log/subversion/mod_dav_svn/version.c
    subversion/branches/moves-scan-log/subversion/svn/status.c
    subversion/branches/moves-scan-log/subversion/svn/util.c
    subversion/branches/moves-scan-log/subversion/svnadmin/main.c
    subversion/branches/moves-scan-log/subversion/svnrdump/dump_editor.c
    subversion/branches/moves-scan-log/subversion/svnsync/main.c
    subversion/branches/moves-scan-log/subversion/tests/cmdline/basic_tests.py
    subversion/branches/moves-scan-log/subversion/tests/cmdline/commit_tests.py
    
subversion/branches/moves-scan-log/subversion/tests/cmdline/externals_tests.py
    
subversion/branches/moves-scan-log/subversion/tests/cmdline/input_validation_tests.py
    subversion/branches/moves-scan-log/subversion/tests/cmdline/log_tests.py
    subversion/branches/moves-scan-log/subversion/tests/cmdline/patch_tests.py
    subversion/branches/moves-scan-log/subversion/tests/cmdline/stat_tests.py
    
subversion/branches/moves-scan-log/subversion/tests/cmdline/svnadmin_tests.py
    
subversion/branches/moves-scan-log/subversion/tests/cmdline/svnrdump_tests.py
    subversion/branches/moves-scan-log/subversion/tests/cmdline/svnsync_tests.py
    subversion/branches/moves-scan-log/subversion/tests/cmdline/svntest/main.py
    
subversion/branches/moves-scan-log/subversion/tests/cmdline/tree_conflict_tests.py
    
subversion/branches/moves-scan-log/subversion/tests/libsvn_ra_local/ra-local-test.c
    subversion/branches/moves-scan-log/tools/client-side/svn-ssl-fingerprints.sh
    subversion/branches/moves-scan-log/tools/examples/SvnCLBrowse
    subversion/branches/moves-scan-log/tools/examples/get-location-segments.py

Propchange: subversion/branches/moves-scan-log/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Jan 16 15:24:08 2012
@@ -57,4 +57,4 @@
 /subversion/branches/tree-conflicts:868291-873154
 /subversion/branches/tree-conflicts-notify:873926-874008
 /subversion/branches/uris-as-urls:1060426-1064427
-/subversion/trunk:1186288-1227101
+/subversion/trunk:1186288-1232008

Modified: subversion/branches/moves-scan-log/CHANGES
URL: 
http://svn.apache.org/viewvc/subversion/branches/moves-scan-log/CHANGES?rev=1232025&r1=1232024&r2=1232025&view=diff
==============================================================================
--- subversion/branches/moves-scan-log/CHANGES (original)
+++ subversion/branches/moves-scan-log/CHANGES Mon Jan 16 15:24:08 2012
@@ -15,6 +15,7 @@ http://svn.apache.org/repos/asf/subversi
     * new 'svnadmin hotcopy --incremental' support for FSFS (issue #3815)
     * reject some attempts to merge between unrelated branches (r1215273)
     * support GPG agent for password storage on UNIX-like platforms (r1150783)
+    * new 'svnadmin lock' / 'svnadmin unlock' subcommands (issue #3942, #4092)
 
   - Client-side bugfixes:
     *

Modified: subversion/branches/moves-scan-log/build.conf
URL: 
http://svn.apache.org/viewvc/subversion/branches/moves-scan-log/build.conf?rev=1232025&r1=1232024&r2=1232025&view=diff
==============================================================================
--- subversion/branches/moves-scan-log/build.conf (original)
+++ subversion/branches/moves-scan-log/build.conf Mon Jan 16 15:24:08 2012
@@ -367,7 +367,7 @@ description = Apache Httpd module to blo
 type = apache-mod
 path = tools/server-side/mod_dontdothat
 nonlibs = mod_dav_svn apr aprutil
-libs = libsvn_subr
+libs = libsvn_subr xml
 install = apache-mod
 msvc-libs = libhttpd.lib
 

Modified: subversion/branches/moves-scan-log/configure.ac
URL: 
http://svn.apache.org/viewvc/subversion/branches/moves-scan-log/configure.ac?rev=1232025&r1=1232024&r2=1232025&view=diff
==============================================================================
--- subversion/branches/moves-scan-log/configure.ac (original)
+++ subversion/branches/moves-scan-log/configure.ac Mon Jan 16 15:24:08 2012
@@ -584,7 +584,7 @@ dnl GPG Agent -------------------
 AC_ARG_WITH(gpg_agent,
 AS_HELP_STRING([--without-gpg-agent], 
                [Disable support for GPG-Agent]),
-               [with_gpg_agent=no], [with_gpg_agent=yes])
+               [], [with_gpg_agent=yes])
 AC_MSG_CHECKING([whether to support GPG-Agent])
 if test "$svn_enable_shared" != "yes"; then
   AC_MSG_RESULT([no (shared library support is disabled)])
@@ -792,6 +792,20 @@ if test "$svn_lib_kwallet" = "yes"; then
             [Defined if KWallet support is enabled])
 fi
 
+dnl plaintext passwords -------------------
+AC_ARG_ENABLE(plaintext-password-storage,
+AS_HELP_STRING([--disable-plaintext-password-storage],
+               [Disable on-disk caching of plaintext passwords and passphrases.
+                (Leaving this functionality enabled will not force Subversion
+                to store passwords in plaintext, but does permit users to
+                explicitly allow that behavior via runtime configuration.)]),
+[
+   if test "$enableval" = "no"; then
+      AC_MSG_NOTICE([Disabling plaintext password/passphrase storage])
+      AC_DEFINE(SVN_DISABLE_PLAINTEXT_PASSWORD_STORAGE, 1,
+                [Defined if plaintext password/passphrase storage is disabled])
+   fi
+])
 
 dnl Build and install rules -------------------
 

Modified: 
subversion/branches/moves-scan-log/notes/http-and-webdav/webdav-protocol
URL: 
http://svn.apache.org/viewvc/subversion/branches/moves-scan-log/notes/http-and-webdav/webdav-protocol?rev=1232025&r1=1232024&r2=1232025&view=diff
==============================================================================
--- subversion/branches/moves-scan-log/notes/http-and-webdav/webdav-protocol 
(original)
+++ subversion/branches/moves-scan-log/notes/http-and-webdav/webdav-protocol 
Mon Jan 16 15:24:08 2012
@@ -354,6 +354,7 @@ Request:
     <S:discover-changed-paths/> (optional)
     <S:strict-node-history/> (optional)
     <S:include-merged-revisions/> (optional)
+    <S:encode-binary-props> (optional)
     <S:revprop>REVPROP</S:revprop>... | <S:all-revprops/> | <S:no-revprops/>
       ('revprop', 'all-revprops', and 'no-revprops' are all optional)
     <S:path></S:path>... (optional)
@@ -369,6 +370,7 @@ Response:
       <S:date>2006-02-27T18:44:26.149336Z</S:date>
       <D:comment>Add doo-hickey</D:comment>
       <S:revprop name="REVPROP">value</S:revprop>... (optional)
+      <S:revprop name="REVPROP" encoding="base64">encoded value</S:revprop>... 
(optional)
       <S:has-children/> (optional)
       <S:added-path( copyfrom-path="PATH" 
copyfrom-rev="REVNUM">PATH</S:added-path>... (optional)
       <S:replaced-path( copyfrom-path="PATH" 
copyfrom-rev="REVNUM">PATH</S:replaced-path>... (optional)

Modified: subversion/branches/moves-scan-log/notes/knobs
URL: 
http://svn.apache.org/viewvc/subversion/branches/moves-scan-log/notes/knobs?rev=1232025&r1=1232024&r2=1232025&view=diff
==============================================================================
--- subversion/branches/moves-scan-log/notes/knobs (original)
+++ subversion/branches/moves-scan-log/notes/knobs Mon Jan 16 15:24:08 2012
@@ -22,6 +22,8 @@ The SVN source code boasts a number of e
 processor enabled tweaks that are mainly aimed at developer support.
 If you introduce new ones, please document them here.
 
+Macros documented in the configure-generated ../subversion/svn_private_config.h
+file are not repeated here.
 
 2 Defines and Environment Variables
 ===================================

Modified: 
subversion/branches/moves-scan-log/subversion/bindings/swig/ruby/svn/info.rb
URL: 
http://svn.apache.org/viewvc/subversion/branches/moves-scan-log/subversion/bindings/swig/ruby/svn/info.rb?rev=1232025&r1=1232024&r2=1232025&view=diff
==============================================================================
--- 
subversion/branches/moves-scan-log/subversion/bindings/swig/ruby/svn/info.rb 
(original)
+++ 
subversion/branches/moves-scan-log/subversion/bindings/swig/ruby/svn/info.rb 
Mon Jan 16 15:24:08 2012
@@ -229,7 +229,9 @@ module Svn
 
     def parse_diff_unified(entry)
       in_content = false
-      entry.body.each do |line|
+      # accomodation for ruby 1.9 and 1.8
+      each_meth = entry.body.respond_to?(:each_line) ? :each_line : :each
+      entry.body.send(each_meth) do |line|
         case line
         when /^@@/
           in_content = true

Modified: 
subversion/branches/moves-scan-log/subversion/bindings/swig/ruby/svn/util.rb
URL: 
http://svn.apache.org/viewvc/subversion/branches/moves-scan-log/subversion/bindings/swig/ruby/svn/util.rb?rev=1232025&r1=1232024&r2=1232025&view=diff
==============================================================================
--- 
subversion/branches/moves-scan-log/subversion/bindings/swig/ruby/svn/util.rb 
(original)
+++ 
subversion/branches/moves-scan-log/subversion/bindings/swig/ruby/svn/util.rb 
Mon Jan 16 15:24:08 2012
@@ -36,7 +36,7 @@ module Svn
   module Util #:nodoc:
     module_function
     def to_ruby_class_name(name)
-      name.split("_").collect do |x|
+      name.to_s.split("_").collect do |x|
         "#{x[0,1].upcase}#{x[1..-1].downcase}"
       end.join("")
     end

Modified: 
subversion/branches/moves-scan-log/subversion/include/private/svn_wc_private.h
URL: 
http://svn.apache.org/viewvc/subversion/branches/moves-scan-log/subversion/include/private/svn_wc_private.h?rev=1232025&r1=1232024&r2=1232025&view=diff
==============================================================================
--- 
subversion/branches/moves-scan-log/subversion/include/private/svn_wc_private.h 
(original)
+++ 
subversion/branches/moves-scan-log/subversion/include/private/svn_wc_private.h 
Mon Jan 16 15:24:08 2012
@@ -479,6 +479,12 @@ svn_wc__node_get_url(const char **url,
  * If not NULL, sets @a revision, @a repos_relpath, @a repos_root_url and
  * @a repos_uuid to the original (if a copy) or their current values.
  *
+ * If @a copy_root_abspath is not NULL, and @a *is_copy indicates that the
+ * node was copied, set @a *copy_root_abspath to the local absolute path of
+ * the root of the copied subtree containing the node. If the copied node is
+ * a root by itself, @a *copy_root_abspath will match @a local_abspath (but
+ * won't necessarily point to the same string in memory).
+ *
  * If @a scan_deleted is TRUE, determine the origin of the deleted node. If
  * @a scan_deleted is FALSE, return NULL, SVN_INVALID_REVNUM or FALSE for
  * deleted nodes.
@@ -491,6 +497,7 @@ svn_wc__node_get_origin(svn_boolean_t *i
                         const char **repos_relpath,
                         const char **repos_root_url,
                         const char **repos_uuid,
+                        const char **copy_root_abspath,
                         svn_wc_context_t *wc_ctx,
                         const char *local_abspath,
                         svn_boolean_t scan_deleted,

Modified: subversion/branches/moves-scan-log/subversion/include/svn_delta.h
URL: 
http://svn.apache.org/viewvc/subversion/branches/moves-scan-log/subversion/include/svn_delta.h?rev=1232025&r1=1232024&r2=1232025&view=diff
==============================================================================
--- subversion/branches/moves-scan-log/subversion/include/svn_delta.h (original)
+++ subversion/branches/moves-scan-log/subversion/include/svn_delta.h Mon Jan 
16 15:24:08 2012
@@ -916,8 +916,9 @@ typedef struct svn_delta_editor_t
 
   /** In the directory represented by @a parent_baton, indicate that
    * @a path is present as a subdirectory in the edit source, but
-   * cannot be conveyed to the edit consumer (perhaps because of
-   * authorization restrictions).
+   * cannot be conveyed to the edit consumer.  Currently, this would
+   * only occur because of authorization restrictions, but may change
+   * in the future.
    *
    * Any temporary allocations may be performed in @a scratch_pool.
    */
@@ -1040,8 +1041,9 @@ typedef struct svn_delta_editor_t
 
   /** In the directory represented by @a parent_baton, indicate that
    * @a path is present as a file in the edit source, but cannot be
-   * conveyed to the edit consumer (perhaps because of authorization
-   * restrictions).
+   * cannot be conveyed to the edit consumer.  Currently, this would
+   * only occur because of authorization restrictions, but may change
+   * in the future.
    *
    * Any temporary allocations may be performed in @a scratch_pool.
    */
@@ -1095,6 +1097,7 @@ typedef svn_error_t *(*svn_delta_fetch_p
   apr_hash_t **props,
   void *baton,
   const char *path,
+  svn_revnum_t base_revision,
   apr_pool_t *result_pool,
   apr_pool_t *scratch_pool
   );
@@ -1108,6 +1111,7 @@ typedef svn_error_t *(*svn_delta_fetch_k
   svn_kind_t *kind,
   void *baton,
   const char *path,
+  svn_revnum_t base_revision,
   apr_pool_t *scratch_pool
   );
 
@@ -1121,6 +1125,7 @@ typedef svn_error_t *(*svn_delta_fetch_b
   const char **filename,
   void *baton,
   const char *path,
+  svn_revnum_t base_revision,
   apr_pool_t *result_pool,
   apr_pool_t *scratch_pool
   );
@@ -1134,11 +1139,9 @@ typedef svn_error_t *(*svn_delta_fetch_b
 typedef struct svn_delta_shim_callbacks_t
 {
   svn_delta_fetch_props_func_t fetch_props_func;
-  void *fetch_props_baton;
   svn_delta_fetch_kind_func_t fetch_kind_func;
-  void *fetch_kind_baton;
   svn_delta_fetch_base_func_t fetch_base_func;
-  void *fetch_base_baton;
+  void *fetch_baton;
 } svn_delta_shim_callbacks_t;
 
 /** Return a collection of default shim functions in @a result_pool.

Modified: subversion/branches/moves-scan-log/subversion/libsvn_client/client.h
URL: 
http://svn.apache.org/viewvc/subversion/branches/moves-scan-log/subversion/libsvn_client/client.h?rev=1232025&r1=1232024&r2=1232025&view=diff
==============================================================================
--- subversion/branches/moves-scan-log/subversion/libsvn_client/client.h 
(original)
+++ subversion/branches/moves-scan-log/subversion/libsvn_client/client.h Mon 
Jan 16 15:24:08 2012
@@ -148,7 +148,9 @@ svn_client__repos_locations(const char *
  *
  * Set *OP_URL to the URL that the object PEG_URL@PEG_REVNUM had in
  * revision OP_REVNUM.
- * RA_SESSION is required. */
+ *
+ * RA_SESSION is an open RA session to the correct repository; it may be
+ * temporarily reparented inside this function. */
 svn_error_t *
 svn_client__repos_location(const char **start_url,
                            svn_ra_session_t *ra_session,
@@ -161,8 +163,8 @@ svn_client__repos_location(const char **
 
 
 /* Set *SEGMENTS to an array of svn_location_segment_t * objects, each
-   representing a reposition location segment for the history of PATH
-   (which is relative to RA_SESSION's session URL) in PEG_REVISION
+   representing a reposition location segment for the history of URL
+   in PEG_REVISION
    between END_REVISION and START_REVISION, ordered from oldest
    segment to youngest.  *SEGMENTS may be empty but it will never
    be NULL.
@@ -171,13 +173,16 @@ svn_client__repos_location(const char **
    svn_ra_get_location_segments() interface, which see for the rules
    governing PEG_REVISION, START_REVISION, and END_REVISION.
 
+   RA_SESSION is an RA session open to the repository of URL; it may be
+   temporarily reparented within this function.
+
    CTX is the client context baton.
 
    Use POOL for all allocations.  */
 svn_error_t *
 svn_client__repos_location_segments(apr_array_header_t **segments,
                                     svn_ra_session_t *ra_session,
-                                    const char *path,
+                                    const char *url,
                                     svn_revnum_t peg_revision,
                                     svn_revnum_t start_revision,
                                     svn_revnum_t end_revision,
@@ -249,11 +254,10 @@ svn_client__ra_session_from_path(svn_ra_
                                  apr_pool_t *pool);
 
 /* Ensure that RA_SESSION's session URL matches SESSION_URL,
-   reparenting that session if necessary.  If reparenting occurs,
-   store the previous session URL in *OLD_SESSION_URL (so that if the
+   reparenting that session if necessary.
+   Store the previous session URL in *OLD_SESSION_URL (so that if the
    reparenting is meant to be temporary, the caller can reparent the
-   session back to where it was); otherwise set *OLD_SESSION_URL to
-   NULL.
+   session back to where it was).
 
    If SESSION_URL is NULL, treat this as a magic value meaning "point
    the RA session to the root of the repository".
@@ -268,8 +272,7 @@ svn_client__ra_session_from_path(svn_ra_
 
        [...]
 
-       if (old_session_url)
-         SVN_ERR(svn_ra_reparent(ra_session, old_session_url, pool));
+       SVN_ERR(svn_ra_reparent(ra_session, old_session_url, pool));
 */
 svn_error_t *
 svn_client__ensure_ra_session_url(const char **old_session_url,

Modified: 
subversion/branches/moves-scan-log/subversion/libsvn_client/commit_util.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/moves-scan-log/subversion/libsvn_client/commit_util.c?rev=1232025&r1=1232024&r2=1232025&view=diff
==============================================================================
--- subversion/branches/moves-scan-log/subversion/libsvn_client/commit_util.c 
(original)
+++ subversion/branches/moves-scan-log/subversion/libsvn_client/commit_util.c 
Mon Jan 16 15:24:08 2012
@@ -627,7 +627,7 @@ harvest_committables(svn_wc_context_t *w
 
           /* Determine from what parent we would be the deleted child */
           SVN_ERR(svn_wc__node_get_origin(NULL, &revision, &repos_relpath,
-                                          NULL, NULL, wc_ctx,
+                                          NULL, NULL, NULL, wc_ctx,
                                           svn_dirent_dirname(local_abspath,
                                                              scratch_pool),
                                           FALSE, scratch_pool, scratch_pool));
@@ -684,7 +684,7 @@ harvest_committables(svn_wc_context_t *w
 
           SVN_ERR(svn_wc__node_get_origin(NULL, &cf_rev,
                                       &cf_relpath, NULL,
-                                      NULL,
+                                      NULL, NULL,
                                       wc_ctx, local_abspath, FALSE,
                                       scratch_pool, scratch_pool));
 
@@ -1032,13 +1032,13 @@ svn_client__harvest_committables(svn_cli
    * Since we don't know what's included in the commit until we've
    * harvested all the targets, we can't reliably check this as we
    * go.  So in `danglers', we record named targets whose parents
-   * are unversioned, then after harvesting the total commit group, we
-   * check to make sure those parents are included.
+   * do not yet exist in the repository. Then after harvesting the total
+   * commit group, we check to make sure those parents are included.
    *
-   * Each key of danglers is an unversioned parent.  The (const char *)
-   * value is one of that parent's children which is named as part of
-   * the commit; the child is included only to make a better error
-   * message.
+   * Each key of danglers is a parent which does not exist in the
+   * repository.  The (const char *) value is one of that parent's
+   * children which is named as part of the commit; the child is
+   * included only to make a better error message.
    *
    * (The reason we don't bother to check unnamed -- i.e, implicit --
    * targets is that they can only join the commit if their parents
@@ -1122,6 +1122,22 @@ svn_client__harvest_committables(svn_cli
 
           if (is_added)
             {
+              svn_boolean_t is_copy;
+              const char *copy_root_abspath;
+
+              /* Copies are always committed recursively as long as the
+               * copy root is in the commit target list.
+               * So for nodes copied along with a parent, the copy root path
+               * is the dangling parent. See issue #4059. */
+              SVN_ERR(svn_wc__node_get_origin(&is_copy,
+                                              NULL, NULL, NULL, NULL,
+                                              &copy_root_abspath,
+                                              ctx->wc_ctx,
+                                              target_abspath,
+                                              FALSE, iterpool, iterpool));
+              if (is_copy && strcmp(copy_root_abspath, target_abspath) != 0)
+                parent_abspath = copy_root_abspath;
+
               /* Copy the parent and target into pool; iterpool
                  lasts only for this loop iteration, and we check
                  danglers after the loop is over. */
@@ -1170,31 +1186,31 @@ svn_client__harvest_committables(svn_cli
 
       svn_pool_clear(iterpool);
 
-       if (! look_up_committable(*committables, dangling_parent, iterpool))
-         {
-           const char *dangling_child = svn__apr_hash_index_val(hi);
-
-           if (ctx->notify_func2 != NULL)
-             {
-               svn_wc_notify_t *notify;
-
-               notify = svn_wc_create_notify(dangling_child,
-                                             svn_wc_notify_failed_no_parent,
-                                             scratch_pool);
-
-               ctx->notify_func2(ctx->notify_baton2, notify, iterpool);
-             }
-
-           return svn_error_createf(
-                            SVN_ERR_ILLEGAL_TARGET, NULL,
-                            _("'%s' is not under version control "
-                              "and is not part of the commit, "
-                              "yet its child '%s' is part of the commit"),
-                            /* Probably one or both of these is an entry, but
-                               safest to local_stylize just in case. */
-                            svn_dirent_local_style(dangling_parent, iterpool),
-                            svn_dirent_local_style(dangling_child, iterpool));
-         }
+      if (! look_up_committable(*committables, dangling_parent, iterpool))
+        {
+          const char *dangling_child = svn__apr_hash_index_val(hi);
+
+          if (ctx->notify_func2 != NULL)
+            {
+              svn_wc_notify_t *notify;
+
+              notify = svn_wc_create_notify(dangling_child,
+                                            svn_wc_notify_failed_no_parent,
+                                            scratch_pool);
+
+              ctx->notify_func2(ctx->notify_baton2, notify, iterpool);
+            }
+
+          return svn_error_createf(
+                           SVN_ERR_ILLEGAL_TARGET, NULL,
+                           _("'%s' is not known to exist in the repository "
+                             "and is not part of the commit, "
+                             "yet its child '%s' is part of the commit"),
+                           /* Probably one or both of these is an entry, but
+                              safest to local_stylize just in case. */
+                           svn_dirent_local_style(dangling_parent, iterpool),
+                           svn_dirent_local_style(dangling_child, iterpool));
+        }
     }
 
   svn_pool_destroy(iterpool);

Modified: subversion/branches/moves-scan-log/subversion/libsvn_client/copy.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/moves-scan-log/subversion/libsvn_client/copy.c?rev=1232025&r1=1232024&r2=1232025&view=diff
==============================================================================
--- subversion/branches/moves-scan-log/subversion/libsvn_client/copy.c 
(original)
+++ subversion/branches/moves-scan-log/subversion/libsvn_client/copy.c Mon Jan 
16 15:24:08 2012
@@ -98,7 +98,7 @@ calculate_target_mergeinfo(svn_ra_sessio
 
       SVN_ERR(svn_wc__node_get_origin(NULL, &src_revnum,
                                       &repos_relpath, &repos_root_url,
-                                      NULL,
+                                      NULL, NULL,
                                       ctx->wc_ctx, local_abspath, FALSE,
                                       pool, pool));
 
@@ -113,20 +113,11 @@ calculate_target_mergeinfo(svn_ra_sessio
 
   if (! locally_added)
     {
-      /* Fetch any existing (explicit) mergeinfo.  We'll temporarily
-         reparent to the target URL here, just to keep the code simple.
-         We could, as an alternative, first see if the target URL was a
-         child of the session URL and use the relative "remainder",
-         falling back to this reparenting as necessary.  */
-      const char *old_session_url = NULL;
-      SVN_ERR(svn_client__ensure_ra_session_url(&old_session_url,
-                                                ra_session, src_url, pool));
+      /* Fetch any existing (explicit) mergeinfo. */
       SVN_ERR(svn_client__get_repos_mergeinfo(&src_mergeinfo, ra_session,
-                                              "", src_revnum,
+                                              src_url, src_revnum,
                                               svn_mergeinfo_inherited,
                                               TRUE, pool));
-      if (old_session_url)
-        SVN_ERR(svn_ra_reparent(ra_session, old_session_url, pool));
     }
 
   *target_mergeinfo = src_mergeinfo;
@@ -981,7 +972,7 @@ repos_to_repos_copy(const apr_array_head
         }
       else
         {
-          const char *old_url = NULL;
+          const char *old_url;
 
           src_rel = NULL;
           SVN_ERR_ASSERT(! is_move);
@@ -2127,7 +2118,7 @@ try_copy(const apr_array_header_t *sourc
                   SVN_ERR(svn_wc__node_get_origin(NULL, &copyfrom_rev,
                                                   &copyfrom_repos_relpath,
                                                   &copyfrom_repos_root_url,
-                                                  NULL,
+                                                  NULL, NULL,
                                                   ctx->wc_ctx,
                                                   pair->src_abspath_or_url,
                                                   TRUE, iterpool, iterpool));

Modified: subversion/branches/moves-scan-log/subversion/libsvn_client/export.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/moves-scan-log/subversion/libsvn_client/export.c?rev=1232025&r1=1232024&r2=1232025&view=diff
==============================================================================
--- subversion/branches/moves-scan-log/subversion/libsvn_client/export.c 
(original)
+++ subversion/branches/moves-scan-log/subversion/libsvn_client/export.c Mon 
Jan 16 15:24:08 2012
@@ -402,7 +402,7 @@ copy_versioned_files(const char *from_ab
       const char *repos_relpath;
 
       SVN_ERR(svn_wc__node_get_origin(&is_added, NULL, &repos_relpath,
-                                      NULL, NULL,
+                                      NULL, NULL, NULL,
                                       ctx->wc_ctx, from_abspath, FALSE,
                                       pool, pool));
 
@@ -1020,6 +1020,55 @@ close_file(void *file_baton,
   return SVN_NO_ERROR;
 }
 
+static svn_error_t *
+fetch_kind_func(svn_kind_t *kind,
+                void *baton,
+                const char *path,
+                svn_revnum_t base_revision,
+                apr_pool_t *scratch_pool)
+{
+  /* We know the root of the edit is a directory. */
+  if (path[0] == '\0')
+    *kind = svn_kind_dir;
+
+  /* ### TODO: We could possibly fetch the kind of the object in question
+         from the server with a second ra_session, but right now this
+         seems to work. */
+  else
+    *kind = svn_kind_unknown;
+
+  return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+fetch_props_func(apr_hash_t **props,
+                 void *baton,
+                 const char *path,
+                 svn_revnum_t base_revision,
+                 apr_pool_t *result_pool,
+                 apr_pool_t *scratch_pool)
+{
+  /* Always use empty props, since the node won't have pre-existing props
+     (This is an export, remember?) */
+  *props = apr_hash_make(result_pool);
+
+  return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+fetch_base_func(const char **filename,
+                void *baton,
+                const char *path,
+                svn_revnum_t base_revision,
+                apr_pool_t *result_pool,
+                apr_pool_t *scratch_pool)
+{
+  /* An export always gets text against the empty stream (i.e, full texts). */
+  *filename = NULL;
+
+  return SVN_NO_ERROR;
+}
+
 
 
 /*** Public Interfaces ***/
@@ -1180,6 +1229,11 @@ svn_client_export5(svn_revnum_t *result_
                                                     &edit_baton,
                                                     pool));
 
+          shim_callbacks->fetch_kind_func = fetch_kind_func;
+          shim_callbacks->fetch_props_func = fetch_props_func;
+          shim_callbacks->fetch_base_func = fetch_base_func;
+          shim_callbacks->fetch_baton = eb;
+
           SVN_ERR(svn_editor__insert_shims(&export_editor, &edit_baton,
                                            export_editor, edit_baton,
                                            shim_callbacks, pool, pool));


Reply via email to