You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ar...@apache.org on 2011/08/16 11:38:43 UTC

svn commit: r1158171 [3/10] - in /subversion/branches/svn-bisect: ./ build/ build/ac-macros/ build/generator/ build/generator/swig/ notes/ subversion/bindings/ctypes-python/csvn/ subversion/bindings/ctypes-python/test/ subversion/bindings/javahl/native...

Modified: subversion/branches/svn-bisect/subversion/bindings/swig/ruby/test/util.rb
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/bindings/swig/ruby/test/util.rb?rev=1158171&r1=1158170&r2=1158171&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/bindings/swig/ruby/test/util.rb (original)
+++ subversion/branches/svn-bisect/subversion/bindings/swig/ruby/test/util.rb Tue Aug 16 09:38:37 2011
@@ -262,7 +262,7 @@ realm = #{@realm}
             "svn://#{@svnserve_host}:#{@svnserve_port}#{@full_repos_path}"
           # Avoid a race by waiting a short time for svnserve to start up.
           # Without this, tests can fail with "Connection refused" errors.
-          sleep 0.1
+          sleep 1
           break
         end
       end

Propchange: subversion/branches/svn-bisect/subversion/include/private/svn_adler32.h
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Aug 16 09:38:37 2011
@@ -44,4 +44,4 @@
 /subversion/branches/tc_url_rev/subversion/libsvn_diff/diff.h:874351-874483
 /subversion/branches/tree-conflicts/subversion/libsvn_diff/diff.h:868291-873154
 /subversion/branches/tree-conflicts-notify/subversion/libsvn_diff/diff.h:873926-874008
-/subversion/trunk/subversion/include/private/svn_adler32.h:1140046-1148712
+/subversion/trunk/subversion/include/private/svn_adler32.h:1140046-1158163

Modified: subversion/branches/svn-bisect/subversion/include/private/svn_auth_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/include/private/svn_auth_private.h?rev=1158171&r1=1158170&r2=1158171&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/include/private/svn_auth_private.h (original)
+++ subversion/branches/svn-bisect/subversion/include/private/svn_auth_private.h Tue Aug 16 09:38:37 2011
@@ -46,6 +46,7 @@ extern "C" {
 #define SVN_AUTH__KEYCHAIN_PASSWORD_TYPE           "keychain"
 #define SVN_AUTH__KWALLET_PASSWORD_TYPE            "kwallet"
 #define SVN_AUTH__GNOME_KEYRING_PASSWORD_TYPE      "gnome-keyring"
+#define SVN_AUTH__GPG_AGENT_PASSWORD_TYPE          "gpg-agent"
 
 /* A function that stores in *PASSWORD (potentially after decrypting it)
    the user's password.  It might be obtained directly from CREDS, or

Modified: subversion/branches/svn-bisect/subversion/include/private/svn_client_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/include/private/svn_client_private.h?rev=1158171&r1=1158170&r2=1158171&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/include/private/svn_client_private.h (original)
+++ subversion/branches/svn-bisect/subversion/include/private/svn_client_private.h Tue Aug 16 09:38:37 2011
@@ -48,7 +48,7 @@ svn_client__assert_homogeneous_target_ty
 
 /* Create a svn_client_status_t structure *CST for LOCAL_ABSPATH, shallow
  * copying data from *STATUS wherever possible and retrieving the other values
- * where needed. Peform temporary allocations in SCRATCH_POOL and allocate the
+ * where needed. Perform temporary allocations in SCRATCH_POOL and allocate the
  * result in RESULT_POOL
  */
 svn_error_t *

Modified: subversion/branches/svn-bisect/subversion/include/private/svn_dep_compat.h
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/include/private/svn_dep_compat.h?rev=1158171&r1=1158170&r2=1158171&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/include/private/svn_dep_compat.h (original)
+++ subversion/branches/svn-bisect/subversion/include/private/svn_dep_compat.h Tue Aug 16 09:38:37 2011
@@ -62,6 +62,11 @@ extern "C" {
 #define apr_array_clear(arr)         (arr)->nelts = 0
 #endif
 
+#if !APR_VERSION_AT_LEAST(1,0,0)
+#define APR_UINT64_C(val) UINT64_C(val)
+#define APR_FPROT_OS_DEFAULT APR_OS_DEFAULT
+#endif
+
 #if !APR_VERSION_AT_LEAST(1,3,0)
 #define APR_UINT16_MAX  0xFFFFU
 #define APR_INT16_MAX   0x7FFF

Modified: subversion/branches/svn-bisect/subversion/include/private/svn_string_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/include/private/svn_string_private.h?rev=1158171&r1=1158170&r2=1158171&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/include/private/svn_string_private.h (original)
+++ subversion/branches/svn-bisect/subversion/include/private/svn_string_private.h Tue Aug 16 09:38:37 2011
@@ -53,6 +53,11 @@ extern "C" {
  */
 svn_string_t *
 svn_stringbuf__morph_into_string(svn_stringbuf_t *strbuf);
+
+/** Like apr_strtoff but provided here for backward compatibility
+ *  with APR 0.9 */
+apr_status_t
+svn__strtoff(apr_off_t *offset, const char *buf, char **end, int base);
 /** @} */
 
 /** @} */

Propchange: subversion/branches/svn-bisect/subversion/include/private/svn_string_private.h
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Aug 16 09:38:37 2011
@@ -53,4 +53,4 @@
 /subversion/branches/tree-conflicts/subversion/include/svn_string.h:868291-873154
 /subversion/branches/tree-conflicts-notify/subversion/include/svn_string.h:873926-874008
 /subversion/branches/uris-as-urls/subversion/include/svn_string.h:1060426-1064427
-/subversion/trunk/subversion/include/private/svn_string_private.h:1140046-1148712
+/subversion/trunk/subversion/include/private/svn_string_private.h:1140046-1158163

Propchange: subversion/branches/svn-bisect/subversion/include/private/svn_temp_serializer.h
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Aug 16 09:38:37 2011
@@ -1,2 +1,2 @@
 /subversion/branches/revprop-packing/subversion/include/private/svn_temp_serializer.h:1143907,1143971,1144017,1144568,1146145
-/subversion/trunk/subversion/include/private/svn_temp_serializer.h:1067687-1072301,1140046-1148712
+/subversion/trunk/subversion/include/private/svn_temp_serializer.h:1067687-1072301,1140046-1158163

Modified: subversion/branches/svn-bisect/subversion/include/private/svn_wc_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/include/private/svn_wc_private.h?rev=1158171&r1=1158170&r2=1158171&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/include/private/svn_wc_private.h (original)
+++ subversion/branches/svn-bisect/subversion/include/private/svn_wc_private.h Tue Aug 16 09:38:37 2011
@@ -466,6 +466,22 @@ svn_wc__node_is_status_deleted(svn_boole
                                apr_pool_t *scratch_pool);
 
 /**
+ * Set @a *deleted_ancestor_abspath to the root of the delete operation
+ * that deleted @a local_abspath. If @a local_abspath itself was deleted
+ * and has no deleted ancestor, @a *deleted_ancestor_abspath will equal
+ * @a local_abspath. If @a local_abspath was not deleted,
+ * set @a *deleted_ancestor_abspath to @c NULL.
+ * @a *deleted_ancestor_abspath is allocated in @a result_pool.
+ * Use @a scratch_pool for all temporary allocations.
+ */ 
+svn_error_t *
+svn_wc__node_get_deleted_ancestor(const char **deleted_ancestor_abspath,
+                                  svn_wc_context_t *wc_ctx,
+                                  const char *local_abspath,
+                                  apr_pool_t *result_pool,
+                                  apr_pool_t *scratch_pool);
+
+/**
  * Set @a *is_server_excluded to whether @a local_abspath has been
  * excluded by the server, using @a wc_ctx.  If @a local_abspath is not
  * in the working copy, return @c SVN_ERR_WC_PATH_NOT_FOUND.
@@ -994,9 +1010,6 @@ svn_wc__get_not_present_descendants(cons
  * If DELETED is not NULL, set *DELETED to TRUE if the node is marked as
  * deleted in the working copy.
  *
- * If CONFLICTED is not NULL, set *CONFLICTED to TRUE if the node is somehow
- * conflicted.
- *
  * All output arguments except OBSTRUCTION_STATE can be NULL to ommit the
  * result.
  *
@@ -1007,7 +1020,6 @@ svn_wc__check_for_obstructions(svn_wc_no
                                svn_node_kind_t *kind,
                                svn_boolean_t *added,
                                svn_boolean_t *deleted,
-                               svn_boolean_t *conflicted,
                                svn_wc_context_t *wc_ctx,
                                const char *local_abspath,
                                svn_boolean_t no_wcroot_check,
@@ -1096,6 +1108,58 @@ svn_wc__get_info(svn_wc_context_t *wc_ct
                  void *cancel_baton,
                  apr_pool_t *scratch_pool);
 
+/* Internal version of svn_wc_delete4(). It has one additional parameter,
+ * MOVED_TO_ABSPATH. If not NULL, this parameter indicates that the
+ * delete operation is the delete-half of a move. */
+svn_error_t *
+svn_wc__delete_internal(svn_wc_context_t *wc_ctx,
+                        const char *local_abspath,
+                        svn_boolean_t keep_local,
+                        svn_boolean_t delete_unversioned_target,
+                        const char *moved_to_abspath,
+                        svn_cancel_func_t cancel_func,
+                        void *cancel_baton,
+                        svn_wc_notify_func2_t notify_func,
+                        void *notify_baton,
+                        apr_pool_t *scratch_pool);
+
+/* If the node at LOCAL_ABSPATH was moved away set *MOVED_TO_ABSPATH to
+ * the absolute path of the copied move-target node, and *COPY_OP_ROOT_ABSPATH
+ * to the absolute path of the root node of the copy operation.
+ *
+ * If the node was not moved, set *MOVED_TO_ABSPATH and *COPY_OP_ROOT_ABSPATH
+ * to NULL.
+ *
+ * Either MOVED_TO_ABSPATH or OP_ROOT_ABSPATH may be NULL to indicate
+ * that the caller is not interested in the result.
+ */
+svn_error_t *
+svn_wc__node_was_moved_away(const char **moved_to_abspath,
+                            const char **copy_op_root_abspath,
+                            svn_wc_context_t *wc_ctx,
+                            const char *local_abspath,
+                            apr_pool_t *result_pool,
+                            apr_pool_t *scratch_pool);
+
+/* If the node at LOCAL_ABSPATH was moved here set *MOVED_FROM_ABSPATH to
+ * the absolute path of the deleted move-source node, and set
+ * *DELETE_OP_ROOT_ABSPATH to the absolute path of the root node of the
+ * delete operation.
+ *
+ * If the node was not moved, set *MOVED_FROM_ABSPATH and
+ * *DELETE_OP_ROOT_ABSPATH to NULL.
+ *
+ * Either MOVED_FROM_ABSPATH or OP_ROOT_ABSPATH may be NULL to indicate
+ * that the caller is not interested in the result.
+ */
+svn_error_t *
+svn_wc__node_was_moved_here(const char **moved_from_abspath,
+                            const char **delete_op_root_abspath,
+                            svn_wc_context_t *wc_ctx,
+                            const char *local_abspath,
+                            apr_pool_t *result_pool,
+                            apr_pool_t *scratch_pool);
+
 #ifdef __cplusplus
 }
 #endif /* __cplusplus */

Modified: subversion/branches/svn-bisect/subversion/include/svn_auth.h
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/include/svn_auth.h?rev=1158171&r1=1158170&r2=1158171&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/include/svn_auth.h (original)
+++ subversion/branches/svn-bisect/subversion/include/svn_auth.h Tue Aug 16 09:38:37 2011
@@ -785,8 +785,8 @@ svn_auth_get_simple_provider(svn_auth_pr
  * svn_auth_provider_object_t, or return @c NULL if the provider is not
  * available for the requested platform or the requested provider is unknown.
  *
- * Valid @a provider_name values are: "gnome_keyring", "keychain", "kwallet"
- * and "windows".
+ * Valid @a provider_name values are: "gnome_keyring", "keychain", "kwallet",
+ * "gpg_agent", and "windows".
  *
  * Valid @a provider_type values are: "simple", "ssl_client_cert_pw" and
  * "ssl_server_trust".
@@ -820,7 +820,8 @@ svn_auth_get_platform_specific_provider(
  *   1. gnome-keyring
  *   2. kwallet
  *   3. keychain
- *   4. windows-cryptoapi
+ *   4. gpg-agent
+ *   5. windows-cryptoapi
  *
  * @since New in 1.6.
  */
@@ -1071,6 +1072,28 @@ svn_auth_get_kwallet_ssl_client_cert_pw_
   apr_pool_t *pool);
 #endif /* (!DARWIN && !WIN32) || DOXYGEN */
 
+#if !defined(WIN32) || defined(DOXYGEN)
+/**
+ * Set @a *provider to an authentication provider of type @c
+ * svn_auth_cred_simple_t that gets/sets information from the user's
+ * ~/.subversion configuration directory.
+ *
+ * This is like svn_client_get_simple_provider(), except that the
+ * password is obtained from gpg_agent, which will keep it in
+ * a memory cache.
+ *
+ * Allocate @a *provider in @a pool.
+ *
+ * @since New in 1.8
+ * @note This function actually works only on systems with
+ * GNU Privacy Guard installed.
+ */
+void
+svn_auth_get_gpg_agent_simple_provider
+    (svn_auth_provider_object_t **provider,
+     apr_pool_t *pool);
+#endif /* !defined(WIN32) || defined(DOXYGEN) */
+
 
 /** Set @a *provider to an authentication provider of type @c
  * svn_auth_cred_username_t that gets/sets information from a user's

Modified: subversion/branches/svn-bisect/subversion/include/svn_client.h
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/include/svn_client.h?rev=1158171&r1=1158170&r2=1158171&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/include/svn_client.h (original)
+++ subversion/branches/svn-bisect/subversion/include/svn_client.h Tue Aug 16 09:38:37 2011
@@ -2105,11 +2105,11 @@ typedef struct svn_client_status_t
    * svn_wc_status_modified and svn_wc_status_conflicted. */
   enum svn_wc_status_kind prop_status;
 
-  /** a node can be 'locked' if a working copy update is in progress or
+  /** A node can be 'locked' if a working copy update is in progress or
    * was interrupted. */
   svn_boolean_t wc_is_locked;
 
-  /** a file or directory can be 'copied' if it's scheduled for
+  /** A file or directory can be 'copied' if it's scheduled for
    * addition-with-history (or part of a subtree that is scheduled as such.).
    */
   svn_boolean_t copied;
@@ -2135,7 +2135,7 @@ typedef struct svn_client_status_t
   /** Last commit author of this item */
   const char *changed_author;
 
-    /** a file or directory can be 'switched' if the switch command has been
+  /** A file or directory can be 'switched' if the switch command has been
    * used.  If this is TRUE, then file_external will be FALSE.
    */
   svn_boolean_t switched;
@@ -2201,11 +2201,24 @@ typedef struct svn_client_status_t
 
   /** @} */
 
-  /** Reserved for libsvn_client's internal use; this value is only to be used for
-   * libsvn_client backwards compatibility wrappers. This value may be NULL or
-   * to other data in future versions. */
+  /** Reserved for libsvn_client's internal use; this value is only to be used
+   * for libsvn_client backwards compatibility wrappers. This value may be NULL
+   * or to other data in future versions. */
   const void *backwards_compatibility_baton;
 
+  /** Set to the local absolute path that this node was moved from, if this
+   * file or directory has been moved here locally. */
+  const char *moved_from_abspath;
+
+  /** Set to the local absolute path that this node was moved to, if this file
+   * or directory has been moved away locally. */
+  const char *moved_to_abspath;
+
+  /* If this file or directory has been moved away locally, set this to the
+   * local absolute path that was the root of the move-away, i.e. to the
+   * op-root of the delete-half of the move operation. */
+  const char *moved_to_op_root_abspath;
+
   /* NOTE! Please update svn_client_status_dup() when adding new fields here. */
 } svn_client_status_t;
 

Modified: subversion/branches/svn-bisect/subversion/include/svn_config.h
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/include/svn_config.h?rev=1158171&r1=1158170&r2=1158171&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/include/svn_config.h (original)
+++ subversion/branches/svn-bisect/subversion/include/svn_config.h Tue Aug 16 09:38:37 2011
@@ -146,7 +146,7 @@ typedef struct svn_config_t svn_config_t
  * but we don't want the # character to end up in the variable.
  */
 #define SVN_CONFIG__DEFAULT_GLOBAL_IGNORES_LINE_1 \
-  "*.o *.lo *.la *.al .libs *.so *.so.[0-9]* *.a *.pyc *.pyo"
+  "*.o *.lo *.la *.al .libs *.so *.so.[0-9]* *.a *.pyc *.pyo __pycache__"
 #define SVN_CONFIG__DEFAULT_GLOBAL_IGNORES_LINE_2 \
   "*.rej *~ #*# .#* .*.swp .DS_Store"
 

Modified: subversion/branches/svn-bisect/subversion/include/svn_error.h
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/include/svn_error.h?rev=1158171&r1=1158170&r2=1158171&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/include/svn_error.h (original)
+++ subversion/branches/svn-bisect/subversion/include/svn_error.h Tue Aug 16 09:38:37 2011
@@ -391,7 +391,8 @@ svn_error_t *svn_error_purge_tracing(svn
 #define SVN_ERR_IS_LOCK_ERROR(err)                          \
   (err->apr_err == SVN_ERR_FS_PATH_ALREADY_LOCKED ||        \
    err->apr_err == SVN_ERR_FS_NOT_FOUND           ||        \
-   err->apr_err == SVN_ERR_FS_OUT_OF_DATE)
+   err->apr_err == SVN_ERR_FS_OUT_OF_DATE         ||        \
+   err->apr_err == SVN_ERR_FS_BAD_LOCK_TOKEN)
 
 /**
  * Return TRUE if @a err is an error specifically related to unlocking

Modified: subversion/branches/svn-bisect/subversion/include/svn_mergeinfo.h
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/include/svn_mergeinfo.h?rev=1158171&r1=1158170&r2=1158171&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/include/svn_mergeinfo.h (original)
+++ subversion/branches/svn-bisect/subversion/include/svn_mergeinfo.h Tue Aug 16 09:38:37 2011
@@ -270,20 +270,38 @@ svn_rangelist_diff(apr_array_header_t **
                    apr_pool_t *pool);
 
 /** Merge two rangelists consisting of @c svn_merge_range_t *
- * elements, @a *rangelist and @a changes, placing the results in
- * @a *rangelist.  Either rangelist may be empty.
+ * elements, @a rangelist and @a changes, placing the results in
+ * @a rangelist. New elements added to @a rangelist are allocated
+ * in @a result_pool. Either rangelist may be empty.
  *
  * When intersecting rangelists are merged, the inheritability of
  * the resulting svn_merge_range_t depends on the inheritability of the
  * operands: see svn_mergeinfo_merge().
  *
- * Note: @a *rangelist and @a changes must be sorted as said by @c
- * svn_sort_compare_ranges().  @a *rangelist is guaranteed to remain
+ * Note: @a rangelist and @a changes must be sorted as said by @c
+ * svn_sort_compare_ranges().  @a rangelist is guaranteed to remain
  * in sorted order and be compacted to the minimal number of ranges
  * needed to represent the merged result.
  *
+ * Use @a scratch_pool for temporary allocations.
+ *
+ * @since New in 1.8.
+ */
+svn_error_t *
+svn_rangelist_merge2(apr_array_header_t *rangelist,
+                     const apr_array_header_t *changes,
+                     apr_pool_t *result_pool,
+                     apr_pool_t *scratch_pool);
+
+/** Like svn_rangelist_merge2(), but with @a rangelist as an input/output
+ * argument. This function always allocates a new rangelist in @a pool and
+ * returns its result in @a *rangelist. It does not modify @a *rangelist
+ * in place. If not used carefully, this function can use up a lot of memory
+ * if called in a loop.
+ *
  * @since New in 1.5.
  */
+SVN_DEPRECATED
 svn_error_t *
 svn_rangelist_merge(apr_array_header_t **rangelist,
                     const apr_array_header_t *changes,

Modified: subversion/branches/svn-bisect/subversion/include/svn_wc.h
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/include/svn_wc.h?rev=1158171&r1=1158170&r2=1158171&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/include/svn_wc.h (original)
+++ subversion/branches/svn-bisect/subversion/include/svn_wc.h Tue Aug 16 09:38:37 2011
@@ -1755,7 +1755,7 @@ typedef struct svn_wc_conflict_descripti
   /** Info on the "merge-right source" or "their" version of incoming change. */
   const svn_wc_conflict_version_t *src_right_version;
 
-  /* Remember to adjust svn_wc__conflict_description_dup()
+  /* Remember to adjust svn_wc__conflict_description2_dup()
    * if you add new fields to this struct. */
 } svn_wc_conflict_description2_t;
 
@@ -1849,8 +1849,6 @@ typedef struct svn_wc_conflict_descripti
    * @since New in 1.6. */
   svn_wc_conflict_version_t *src_right_version;
 
-  /* Remember to adjust svn_wc__conflict_description_dup()
-   * if you add new fields to this struct. */
 } svn_wc_conflict_description_t;
 
 /**
@@ -3068,6 +3066,13 @@ typedef struct svn_wc_info_t
   /** The local absolute path of the working copy root.  */
   const char *wcroot_abspath;
 
+  /** The path the node was moved from, if it was moved here. Else NULL.
+   * @since New in 1.8. */
+  const char *moved_from_abspath;
+
+  /** The path the node was moved to, if it was moved away. Else NULL.
+   * @since New in 1.8. */
+  const char *moved_to_abspath;
 } svn_wc_info_t;
 
 /**
@@ -3612,6 +3617,19 @@ typedef struct svn_wc_status3_t
 
   /** @} */
 
+  /** Set to the local absolute path that this node was moved from, if this
+   * file or directory has been moved here locally. */
+  const char *moved_from_abspath;
+
+  /** Set to the local absolute path that this node was moved to, if this file
+   * or directory has been moved away locally. */
+  const char *moved_to_abspath;
+
+  /* If this file or directory has been moved away locally, set this to the
+   * local absolute path that was the root of the move-away, i.e. to the
+   * op-root of the delete-half of the move operation. */
+  const char *moved_to_op_root_abspath;
+
   /* NOTE! Please update svn_wc_dup_status3() when adding new fields here. */
 } svn_wc_status3_t;
 

Modified: subversion/branches/svn-bisect/subversion/libsvn_client/blame.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_client/blame.c?rev=1158171&r1=1158170&r2=1158171&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_client/blame.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_client/blame.c Tue Aug 16 09:38:37 2011
@@ -85,7 +85,7 @@ struct file_rev_baton {
   struct rev *rev;     /* the rev for which blame is being assigned
                           during a diff */
   struct blame_chain *chain;      /* the original blame chain. */
-  const char *tmp_path; /* temp file name to feed svn_io_open_unique_file */
+  const char *repos_root_url;    /* To construct a url */
   apr_pool_t *mainpool;  /* lives during the whole sequence of calls */
   apr_pool_t *lastpool;  /* pool used during previous call */
   apr_pool_t *currpool;  /* pool used during this call */
@@ -107,6 +107,7 @@ struct delta_baton {
   svn_txdelta_window_handler_t wrapped_handler;
   void *wrapped_baton;
   struct file_rev_baton *file_rev_baton;
+  svn_stream_t *source_stream;  /* the delta source */
   const char *filename;
 };
 
@@ -319,6 +320,13 @@ window_handler(svn_txdelta_window_t *win
   if (window)
     return SVN_NO_ERROR;
 
+  /* Close the source file used for the delta.
+     It is important to do this early, since otherwise, they will be deleted
+     before all handles are closed, which leads to failures on some platforms
+     when new tempfiles are to be created. */
+  if (dbaton->source_stream)
+    SVN_ERR(svn_stream_close(dbaton->source_stream));
+
   /* If we are including merged revisions, we need to add each rev to the
      merged chain. */
   if (frb->include_merged_revisions)
@@ -416,7 +424,11 @@ file_rev_handler(void *baton, const char
   if (frb->ctx->notify_func2)
     {
       svn_wc_notify_t *notify
-        = svn_wc_create_notify(path, svn_wc_notify_blame_revision, pool);
+            = svn_wc_create_notify_url(
+                            svn_path_url_add_component2(frb->repos_root_url,
+                                                        path+1, pool),
+                            svn_wc_notify_blame_revision, pool);
+      notify->path = path;
       notify->kind = svn_node_none;
       notify->content_state = notify->prop_state
         = svn_wc_notify_state_inapplicable;
@@ -445,11 +457,12 @@ file_rev_handler(void *baton, const char
 
   /* Prepare the text delta window handler. */
   if (frb->last_filename)
-    SVN_ERR(svn_stream_open_readonly(&last_stream, frb->last_filename,
+    SVN_ERR(svn_stream_open_readonly(&delta_baton->source_stream, frb->last_filename,
                                      frb->currpool, pool));
   else
     /* Means empty stream below. */
-    last_stream = NULL;
+    delta_baton->source_stream = NULL;
+  last_stream = svn_stream_disown(delta_baton->source_stream, pool);
 
   if (frb->include_merged_revisions && !frb->merged_revision)
     filepool = frb->filepool;
@@ -633,8 +646,7 @@ svn_client_blame5(const char *target,
       frb.merged_chain->pool = pool;
     }
 
-  SVN_ERR(svn_io_temp_dir(&frb.tmp_path, pool));
-  frb.tmp_path = svn_dirent_join(frb.tmp_path, "tmp", pool),
+  SVN_ERR(svn_ra_get_repos_root2(ra_session, &frb.repos_root_url, pool));
 
   frb.mainpool = pool;
   /* The callback will flip the following two pools, because it needs

Modified: subversion/branches/svn-bisect/subversion/libsvn_client/client.h
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_client/client.h?rev=1158171&r1=1158170&r2=1158171&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_client/client.h (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_client/client.h Tue Aug 16 09:38:37 2011
@@ -595,8 +595,6 @@ svn_client__switch_internal(svn_revnum_t
 
    DEPTH is the depth to recurse.
 
-   DRY_RUN is set if this is a dry-run merge. It is not relevant for diff.
-
    RA_SESSION defines the additional RA session for requesting file
    contents.
 
@@ -615,15 +613,13 @@ svn_client__get_diff_editor(const svn_de
                             svn_ra_session_t *ra_session,
                             svn_revnum_t revision,
                             svn_boolean_t walk_deleted_dirs,
-                            svn_boolean_t dry_run,
                             const svn_wc_diff_callbacks4_t *diff_callbacks,
                             void *diff_cmd_baton,
                             svn_cancel_func_t cancel_func,
                             void *cancel_baton,
                             svn_wc_notify_func2_t notify_func,
                             void *notify_baton,
-                            apr_pool_t *result_pool,
-                            apr_pool_t *scratch_pool);
+                            apr_pool_t *result_pool);
 
 
 /* ---------------------------------------------------------------- */

Modified: subversion/branches/svn-bisect/subversion/libsvn_client/cmdline.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_client/cmdline.c?rev=1158171&r1=1158170&r2=1158171&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_client/cmdline.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_client/cmdline.c Tue Aug 16 09:38:37 2011
@@ -292,7 +292,9 @@ svn_client_args_to_target_array2(apr_arr
                                                   original_target, pool));
                   err2 = svn_wc_read_kind(&kind, ctx->wc_ctx, target_abspath,
                                           FALSE, pool);
-                  if (err2 && err2->apr_err == SVN_ERR_WC_NOT_WORKING_COPY)
+                  if (err2
+                      && (err2->apr_err == SVN_ERR_WC_NOT_WORKING_COPY
+                          || err2->apr_err == SVN_ERR_WC_UPGRADE_REQUIRED))
                     {
                       svn_error_clear(err2);
                     }

Modified: subversion/branches/svn-bisect/subversion/libsvn_client/commit.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_client/commit.c?rev=1158171&r1=1158170&r2=1158171&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_client/commit.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_client/commit.c Tue Aug 16 09:38:37 2011
@@ -696,7 +696,6 @@ svn_client_import4(const char *path,
   apr_hash_t *excludes = apr_hash_make(pool);
   svn_node_kind_t kind;
   const char *local_abspath;
-  const char *base_dir_abspath;
   apr_array_header_t *new_entries = apr_array_make(pool, 4,
                                                    sizeof(const char *));
   const char *temp;
@@ -708,7 +707,6 @@ svn_client_import4(const char *path,
                              _("'%s' is not a local path"), path);
 
   SVN_ERR(svn_dirent_get_absolute(&local_abspath, path, pool));
-  base_dir_abspath = local_abspath;
 
   /* Create a new commit item and add it to the array. */
   if (SVN_CLIENT__HAS_LOG_MSG_FUNC(ctx))
@@ -739,8 +737,6 @@ svn_client_import4(const char *path,
     }
 
   SVN_ERR(svn_io_check_path(local_abspath, &kind, pool));
-  if (kind == svn_node_file)
-    base_dir_abspath = svn_dirent_dirname(local_abspath, pool);
 
   /* Figure out all the path components we need to create just to have
      a place to stick our imported tree. */
@@ -770,7 +766,7 @@ svn_client_import4(const char *path,
         }
     }
   while ((err = get_ra_editor(&ra_session,
-                              &editor, &edit_baton, ctx, url, base_dir_abspath,
+                              &editor, &edit_baton, ctx, url, NULL,
                               log_msg, NULL, revprop_table, FALSE, NULL, TRUE,
                               commit_callback, commit_baton, subpool)));
 
@@ -1356,6 +1352,128 @@ svn_client_commit5(const apr_array_heade
       goto cleanup;
   }
 
+  /* For every target that was moved verify that both halves of the
+   * move are part of the commit. */
+  for (i = 0; i < commit_items->nelts; i++)
+    {
+      svn_client_commit_item3_t *item =
+        APR_ARRAY_IDX(commit_items, i, svn_client_commit_item3_t *);
+
+      svn_pool_clear(iterpool);
+
+      if (item->state_flags & SVN_CLIENT_COMMIT_ITEM_IS_COPY)
+        {
+          const char *moved_from_abspath;
+          const char *delete_op_root_abspath;
+
+          cmt_err = svn_error_trace(svn_wc__node_was_moved_here(
+                                      &moved_from_abspath,
+                                      &delete_op_root_abspath,
+                                      ctx->wc_ctx, item->path,
+                                      iterpool, iterpool));
+          if (cmt_err)
+            goto cleanup;
+
+          if (moved_from_abspath && delete_op_root_abspath &&
+              strcmp(moved_from_abspath, delete_op_root_abspath) == 0)
+
+            {
+              svn_boolean_t found_delete_half =
+                (apr_hash_get(committables->by_path, delete_op_root_abspath,
+                               APR_HASH_KEY_STRING) != NULL);
+              
+              if (!found_delete_half)
+                {
+                  const char *delete_half_parent_abspath;
+
+                  /* The delete-half isn't in the commit target list.
+                   * However, it might itself be the child of a deleted node,
+                   * either because of another move or a deletion.
+                   *
+                   * For example, consider: mv A/B B; mv B/C C; commit;
+                   * C's moved-from A/B/C is a child of the deleted A/B.
+                   * A/B/C does not appear in the commit target list, but
+                   * A/B does appear.
+                   * (Note that moved-from information is always stored
+                   * relative to the BASE tree, so we have 'C moved-from
+                   * A/B/C', not 'C moved-from B/C'.)
+                   *
+                   * An example involving a move and a delete would be:
+                   * mv A/B C; rm A; commit;
+                   * Now C is moved-from A/B which does not appear in the
+                   * commit target list, but A does appear.
+                   */
+
+                  /* Scan upwards for a deletion op-root from the
+                   * delete-half's parent directory. */
+                  delete_half_parent_abspath =
+                    svn_dirent_dirname(delete_op_root_abspath, iterpool);
+                  if (strcmp(delete_op_root_abspath,
+                             delete_half_parent_abspath) != 0)
+                    {
+                      const char *parent_delete_op_root_abspath;
+
+                      cmt_err = svn_error_trace(
+                                  svn_wc__node_get_deleted_ancestor(
+                                    &parent_delete_op_root_abspath,
+                                    ctx->wc_ctx, delete_half_parent_abspath,
+                                    iterpool, iterpool));
+                      if (cmt_err)
+                        goto cleanup;
+
+                      if (parent_delete_op_root_abspath)
+                        found_delete_half =
+                          (apr_hash_get(committables->by_path,
+                                        parent_delete_op_root_abspath,
+                                        APR_HASH_KEY_STRING) != NULL);
+                    }
+                }
+
+              if (!found_delete_half)
+                {
+                  cmt_err = svn_error_createf(
+                              SVN_ERR_ILLEGAL_TARGET, NULL,
+                              _("Cannot commit '%s' because it was moved from "
+                                "'%s' which is not part of the commit; both "
+                                "sides of the move must be committed together"),
+                              svn_dirent_local_style(item->path, iterpool),
+                              svn_dirent_local_style(delete_op_root_abspath,
+                                                     iterpool));
+                  goto cleanup;
+                }
+            }
+        }
+      else if (item->state_flags & SVN_CLIENT_COMMIT_ITEM_DELETE)
+        {
+          const char *moved_to_abspath;
+          const char *copy_op_root_abspath;
+
+          cmt_err = svn_error_trace(svn_wc__node_was_moved_away(
+                                      &moved_to_abspath,
+                                      &copy_op_root_abspath,
+                                      ctx->wc_ctx, item->path,
+                                      iterpool, iterpool));
+          if (cmt_err)
+            goto cleanup;
+
+          if (moved_to_abspath && copy_op_root_abspath &&
+              strcmp(moved_to_abspath, copy_op_root_abspath) == 0 &&
+              apr_hash_get(committables->by_path, copy_op_root_abspath,
+                           APR_HASH_KEY_STRING) == NULL)
+            {
+              cmt_err = svn_error_createf(
+                          SVN_ERR_ILLEGAL_TARGET, NULL,
+                         _("Cannot commit '%s' because it was moved to '%s' "
+                           "which is not part of the commit; both sides of "
+                           "the move must be committed together"),
+                         svn_dirent_local_style(item->path, iterpool),
+                         svn_dirent_local_style(copy_op_root_abspath,
+                                                iterpool));
+              goto cleanup;
+            }
+        }
+    }
+
   /* Go get a log message.  If an error occurs, or no log message is
      specified, abort the operation. */
   if (SVN_CLIENT__HAS_LOG_MSG_FUNC(ctx))
@@ -1451,8 +1569,10 @@ svn_client_commit5(const apr_array_heade
 
  cleanup:
   /* Abort the commit if it is still in progress. */
+  svn_pool_clear(iterpool); /* Close open handles before aborting */
   if (commit_in_progress)
-    svn_error_clear(editor->abort_edit(edit_baton, pool));
+    cmt_err = svn_error_compose_create(cmt_err,
+                                       editor->abort_edit(edit_baton, pool));
 
   /* A bump error is likely to occur while running a working copy log file,
      explicitly unlocking and removing temporary files would be wrong in

Modified: subversion/branches/svn-bisect/subversion/libsvn_client/commit_util.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_client/commit_util.c?rev=1158171&r1=1158170&r2=1158171&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_client/commit_util.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_client/commit_util.c Tue Aug 16 09:38:37 2011
@@ -587,7 +587,7 @@ harvest_committables(svn_wc_context_t *w
   /* Check for the deletion case.
      * We delete explicitly deleted nodes (duh!)
      * We delete not-present children of copies
-     * We delete nodes that directly replace a node in it's ancestor
+     * We delete nodes that directly replace a node in its ancestor
    */
 
   if (is_deleted || is_replaced)
@@ -1845,11 +1845,14 @@ svn_client__do_commit(const char *base_u
                                          result_pool, iterpool);
 
       if (err)
-        return svn_error_trace(fixup_commit_error(item->path,
-                                                  base_url,
-                                                  item->session_relpath,
-                                                  svn_node_file,
-                                                  err, ctx, iterpool));
+        {
+          svn_pool_destroy(iterpool); /* Close tempfiles */
+          return svn_error_trace(fixup_commit_error(item->path,
+                                                    base_url,
+                                                    item->session_relpath,
+                                                    svn_node_file,
+                                                    err, ctx, scratch_pool));
+        }
 
       if (md5_checksums)
         apr_hash_set(*md5_checksums, item->path, APR_HASH_KEY_STRING,

Modified: subversion/branches/svn-bisect/subversion/libsvn_client/diff.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_client/diff.c?rev=1158171&r1=1158170&r2=1158171&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_client/diff.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_client/diff.c Tue Aug 16 09:38:37 2011
@@ -400,15 +400,22 @@ print_git_diff_header_deleted(svn_stream
  * OS using HEADER_ENCODING. All allocations are done in RESULT_POOL. */
 static svn_error_t *
 print_git_diff_header_copied(svn_stream_t *os, const char *header_encoding,
-                             const char *copyfrom_path, const char *path,
+                             const char *copyfrom_path,
+                             svn_revnum_t copyfrom_rev,
+                             const char *path,
                              apr_pool_t *result_pool)
 {
   SVN_ERR(svn_stream_printf_from_utf8(os, header_encoding, result_pool,
                                       "diff --git a/%s b/%s%s",
                                       copyfrom_path, path, APR_EOL_STR));
-  SVN_ERR(svn_stream_printf_from_utf8(os, header_encoding, result_pool,
-                                      "copy from %s%s", copyfrom_path,
-                                      APR_EOL_STR));
+  if (copyfrom_rev != SVN_INVALID_REVNUM)
+    SVN_ERR(svn_stream_printf_from_utf8(os, header_encoding, result_pool,
+                                        "copy from %s@%ld%s", copyfrom_path,
+                                        copyfrom_rev, APR_EOL_STR));
+  else
+    SVN_ERR(svn_stream_printf_from_utf8(os, header_encoding, result_pool,
+                                        "copy from %s%s", copyfrom_path,
+                                        APR_EOL_STR));
   SVN_ERR(svn_stream_printf_from_utf8(os, header_encoding, result_pool,
                                       "copy to %s%s", path, APR_EOL_STR));
   return SVN_NO_ERROR;
@@ -450,9 +457,10 @@ print_git_diff_header_modified(svn_strea
  * HEADER_ENCODING. Return suitable diff labels for the git diff in *LABEL1
  * and *LABEL2. REPOS_RELPATH1 and REPOS_RELPATH2 are relative to reposroot.
  * are the paths passed to the original diff command. REV1 and REV2 are
- * revisions being diffed. COPYFROM_PATH indicates where the diffed item
- * was copied from. RA_SESSION and WC_CTX are used to adjust paths in the
- * headers to be relative to the repository root.
+ * revisions being diffed. COPYFROM_PATH and COPYFROM_REV indicate where the
+ * diffed item was copied from.
+ * RA_SESSION and WC_CTX are used to adjust paths in the headers to be
+ * relative to the repository root.
  * WC_ROOT_ABSPATH is the absolute path to the root directory of a working
  * copy involved in a repos-wc diff, and may be NULL.
  * Use SCRATCH_POOL for temporary allocations. */
@@ -465,6 +473,7 @@ print_git_diff_header(svn_stream_t *os,
                       svn_revnum_t rev1,
                       svn_revnum_t rev2,
                       const char *copyfrom_path,
+                      svn_revnum_t copyfrom_rev,
                       const char *header_encoding,
                       svn_ra_session_t *ra_session,
                       svn_wc_context_t *wc_ctx,
@@ -484,7 +493,8 @@ print_git_diff_header(svn_stream_t *os,
   else if (operation == svn_diff_op_copied)
     {
       SVN_ERR(print_git_diff_header_copied(os, header_encoding,
-                                           copyfrom_path, repos_relpath2,
+                                           copyfrom_path, copyfrom_rev,
+                                           repos_relpath2,
                                            scratch_pool));
       *label1 = diff_label(apr_psprintf(scratch_pool, "a/%s", copyfrom_path),
                            rev1, scratch_pool);
@@ -605,6 +615,7 @@ display_prop_diffs(const apr_array_heade
           SVN_ERR(print_git_diff_header(os, &label1, &label2,
                                         svn_diff_op_modified,
                                         path1, path2, rev1, rev2, NULL,
+                                        SVN_INVALID_REVNUM,
                                         encoding, ra_session, wc_ctx,
                                         wc_root_abspath, pool));
           SVN_ERR(svn_stream_close(os));
@@ -778,6 +789,9 @@ struct diff_cmd_baton {
   /* Whether we're producing a git-style diff. */
   svn_boolean_t use_git_diff_format;
 
+  /* Whether deletion of a file is summarized versus showing a full diff. */
+  svn_boolean_t no_diff_deleted;
+
   svn_wc_context_t *wc_ctx;
 
   /* The RA session used during diffs involving the repository. */
@@ -896,6 +910,7 @@ diff_content_changed(const char *path,
                      const char *mimetype2,
                      svn_diff_operation_kind_t operation,
                      const char *copyfrom_path,
+                     svn_revnum_t copyfrom_rev,
                      void *diff_baton)
 {
   struct diff_cmd_baton *diff_cmd_baton = diff_baton;
@@ -1025,6 +1040,7 @@ diff_content_changed(const char *path,
               SVN_ERR(print_git_diff_header(os, &label1, &label2, operation,
                                             tmp_path1, tmp_path2, rev1, rev2,
                                             copyfrom_path,
+                                            copyfrom_rev,
                                             diff_cmd_baton->header_encoding,
                                             diff_cmd_baton->ra_session,
                                             diff_cmd_baton->wc_ctx,
@@ -1095,7 +1111,8 @@ diff_file_changed(svn_wc_notify_state_t 
     SVN_ERR(diff_content_changed(path,
                                  tmpfile1, tmpfile2, rev1, rev2,
                                  mimetype1, mimetype2,
-                                 svn_diff_op_modified, NULL, diff_baton));
+                                 svn_diff_op_modified, NULL,
+                                 SVN_INVALID_REVNUM, diff_baton));
   if (prop_changes->nelts > 0)
     SVN_ERR(diff_props_changed(prop_state, tree_conflicted,
                                path, FALSE, prop_changes,
@@ -1149,12 +1166,13 @@ diff_file_added(svn_wc_notify_state_t *c
                                  tmpfile1, tmpfile2, rev1, rev2,
                                  mimetype1, mimetype2,
                                  svn_diff_op_copied, copyfrom_path,
-                                 diff_baton));
+                                 copyfrom_revision, diff_baton));
   else if (tmpfile1)
     SVN_ERR(diff_content_changed(path,
                                  tmpfile1, tmpfile2, rev1, rev2,
                                  mimetype1, mimetype2,
-                                 svn_diff_op_added, NULL, diff_baton));
+                                 svn_diff_op_added, NULL, SVN_INVALID_REVNUM,
+                                 diff_baton));
   if (prop_changes->nelts > 0)
     SVN_ERR(diff_props_changed(prop_state, tree_conflicted,
                                path, FALSE, prop_changes,
@@ -1173,28 +1191,41 @@ diff_file_added(svn_wc_notify_state_t *c
 
 /* An svn_wc_diff_callbacks4_t function. */
 static svn_error_t *
-diff_file_deleted_with_diff(svn_wc_notify_state_t *state,
-                            svn_boolean_t *tree_conflicted,
-                            const char *path,
-                            const char *tmpfile1,
-                            const char *tmpfile2,
-                            const char *mimetype1,
-                            const char *mimetype2,
-                            apr_hash_t *original_props,
-                            void *diff_baton,
-                            apr_pool_t *scratch_pool)
+diff_file_deleted(svn_wc_notify_state_t *state,
+                  svn_boolean_t *tree_conflicted,
+                  const char *path,
+                  const char *tmpfile1,
+                  const char *tmpfile2,
+                  const char *mimetype1,
+                  const char *mimetype2,
+                  apr_hash_t *original_props,
+                  void *diff_baton,
+                  apr_pool_t *scratch_pool)
 {
   struct diff_cmd_baton *diff_cmd_baton = diff_baton;
 
   if (diff_cmd_baton->anchor)
     path = svn_dirent_join(diff_cmd_baton->anchor, path, scratch_pool);
 
-  if (tmpfile1)
-    SVN_ERR(diff_content_changed(path,
-                                 tmpfile1, tmpfile2, diff_cmd_baton->revnum1,
-                                 diff_cmd_baton->revnum2,
-                                 mimetype1, mimetype2,
-                                 svn_diff_op_deleted, NULL, diff_baton));
+  if (diff_cmd_baton->no_diff_deleted)
+    {
+      SVN_ERR(file_printf_from_utf8(
+                diff_cmd_baton->outfile,
+                diff_cmd_baton->header_encoding,
+                "Index: %s (deleted)" APR_EOL_STR "%s" APR_EOL_STR,
+                path, equal_string));
+    }
+  else
+    {
+      if (tmpfile1)
+        SVN_ERR(diff_content_changed(path,
+                                     tmpfile1, tmpfile2,
+                                     diff_cmd_baton->revnum1,
+                                     diff_cmd_baton->revnum2,
+                                     mimetype1, mimetype2,
+                                     svn_diff_op_deleted, NULL,
+                                     SVN_INVALID_REVNUM, diff_baton));
+    }
 
   /* We don't list all the deleted properties. */
 
@@ -1208,36 +1239,6 @@ diff_file_deleted_with_diff(svn_wc_notif
 
 /* An svn_wc_diff_callbacks4_t function. */
 static svn_error_t *
-diff_file_deleted_no_diff(svn_wc_notify_state_t *state,
-                          svn_boolean_t *tree_conflicted,
-                          const char *path,
-                          const char *tmpfile1,
-                          const char *tmpfile2,
-                          const char *mimetype1,
-                          const char *mimetype2,
-                          apr_hash_t *original_props,
-                          void *diff_baton,
-                          apr_pool_t *scratch_pool)
-{
-  struct diff_cmd_baton *diff_cmd_baton = diff_baton;
-
-  if (diff_cmd_baton->anchor)
-    path = svn_dirent_join(diff_cmd_baton->anchor, path, scratch_pool);
-
-  if (state)
-    *state = svn_wc_notify_state_unknown;
-  if (tree_conflicted)
-    *tree_conflicted = FALSE;
-
-  return file_printf_from_utf8
-          (diff_cmd_baton->outfile,
-           diff_cmd_baton->header_encoding,
-           "Index: %s (deleted)" APR_EOL_STR "%s" APR_EOL_STR,
-           path, equal_string);
-}
-
-/* An svn_wc_diff_callbacks4_t function. */
-static svn_error_t *
 diff_dir_added(svn_wc_notify_state_t *state,
                svn_boolean_t *tree_conflicted,
                svn_boolean_t *skip,
@@ -1313,6 +1314,18 @@ diff_dir_closed(svn_wc_notify_state_t *c
   return SVN_NO_ERROR;
 }
 
+static const svn_wc_diff_callbacks4_t diff_callbacks =
+{
+  diff_file_opened,
+  diff_file_changed,
+  diff_file_added,
+  diff_file_deleted,
+  diff_dir_deleted,
+  diff_dir_opened,
+  diff_dir_added,
+  diff_dir_props_changed,
+  diff_dir_closed    
+};
 
 /*-----------------------------------------------------------------*/
 
@@ -1740,11 +1753,11 @@ diff_repos_repos(const svn_wc_diff_callb
   SVN_ERR(svn_client__get_diff_editor(
                 &diff_editor, &diff_edit_baton,
                 NULL, "", depth,
-                extra_ra_session, rev1, TRUE, FALSE,
+                extra_ra_session, rev1, TRUE,
                 callbacks, callback_baton,
                 ctx->cancel_func, ctx->cancel_baton,
                 NULL /* no notify_func */, NULL /* no notify_baton */,
-                pool, pool));
+                pool));
 
   /* We want to switch our txn into URL2 */
   SVN_ERR(svn_ra_do_diff3
@@ -2214,24 +2227,12 @@ svn_client_diff5(const apr_array_header_
                  apr_pool_t *pool)
 {
   struct diff_cmd_baton diff_cmd_baton = { 0 };
-  svn_wc_diff_callbacks4_t diff_callbacks;
 
   /* We will never do a pegged diff from here. */
   svn_opt_revision_t peg_revision;
   peg_revision.kind = svn_opt_revision_unspecified;
 
   /* setup callback and baton */
-  diff_callbacks.file_opened = diff_file_opened;
-  diff_callbacks.file_changed = diff_file_changed;
-  diff_callbacks.file_added = diff_file_added;
-  diff_callbacks.file_deleted = no_diff_deleted ? diff_file_deleted_no_diff :
-                                                  diff_file_deleted_with_diff;
-  diff_callbacks.dir_added =  diff_dir_added;
-  diff_callbacks.dir_deleted = diff_dir_deleted;
-  diff_callbacks.dir_props_changed = diff_dir_props_changed;
-  diff_callbacks.dir_opened = diff_dir_opened;
-  diff_callbacks.dir_closed = diff_dir_closed;
-
   diff_cmd_baton.orig_path_1 = path1;
   diff_cmd_baton.orig_path_2 = path2;
 
@@ -2248,6 +2249,7 @@ svn_client_diff5(const apr_array_header_
   diff_cmd_baton.force_binary = ignore_content_type;
   diff_cmd_baton.relative_to_dir = relative_to_dir;
   diff_cmd_baton.use_git_diff_format = use_git_diff_format;
+  diff_cmd_baton.no_diff_deleted = no_diff_deleted;
   diff_cmd_baton.wc_ctx = ctx->wc_ctx;
   diff_cmd_baton.visited_paths = apr_hash_make(pool);
   diff_cmd_baton.ra_session = NULL;
@@ -2281,20 +2283,8 @@ svn_client_diff_peg5(const apr_array_hea
                      apr_pool_t *pool)
 {
   struct diff_cmd_baton diff_cmd_baton = { 0 };
-  svn_wc_diff_callbacks4_t diff_callbacks;
 
   /* setup callback and baton */
-  diff_callbacks.file_opened = diff_file_opened;
-  diff_callbacks.file_changed = diff_file_changed;
-  diff_callbacks.file_added = diff_file_added;
-  diff_callbacks.file_deleted = no_diff_deleted ? diff_file_deleted_no_diff :
-                                                  diff_file_deleted_with_diff;
-  diff_callbacks.dir_added =  diff_dir_added;
-  diff_callbacks.dir_deleted = diff_dir_deleted;
-  diff_callbacks.dir_props_changed = diff_dir_props_changed;
-  diff_callbacks.dir_opened = diff_dir_opened;
-  diff_callbacks.dir_closed = diff_dir_closed;
-
   diff_cmd_baton.orig_path_1 = path;
   diff_cmd_baton.orig_path_2 = path;
 
@@ -2311,6 +2301,7 @@ svn_client_diff_peg5(const apr_array_hea
   diff_cmd_baton.force_binary = ignore_content_type;
   diff_cmd_baton.relative_to_dir = relative_to_dir;
   diff_cmd_baton.use_git_diff_format = use_git_diff_format;
+  diff_cmd_baton.no_diff_deleted = no_diff_deleted;
   diff_cmd_baton.wc_ctx = ctx->wc_ctx;
   diff_cmd_baton.visited_paths = apr_hash_make(pool);
   diff_cmd_baton.ra_session = NULL;

Modified: subversion/branches/svn-bisect/subversion/libsvn_client/externals.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_client/externals.c?rev=1158171&r1=1158170&r2=1158171&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_client/externals.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_client/externals.c Tue Aug 16 09:38:37 2011
@@ -898,6 +898,11 @@ handle_external_item_change(const struct
                    scratch_pool));
           break;
         case svn_node_file:
+          if (strcmp(eb->repos_root_url, ra_cache.repos_root_url))
+            return svn_error_createf(SVN_ERR_UNSUPPORTED_FEATURE, NULL,
+                      _("Unsupported external: "
+                        "url of file external '%s' is not in repository '%s'"),
+                      new_url, eb->repos_root_url);
           SVN_ERR(switch_file_external(local_abspath,
                                        new_url,
                                        &new_item->peg_revision,
@@ -947,6 +952,11 @@ handle_external_item_change(const struct
                                       scratch_pool));
           break;
         case svn_node_file:
+          if (strcmp(eb->repos_root_url, ra_cache.repos_root_url))
+            return svn_error_createf(SVN_ERR_UNSUPPORTED_FEATURE, NULL,
+                      _("Unsupported external: "
+                        "url of file external '%s' is not in repository '%s'"),
+                      new_url, eb->repos_root_url);
           SVN_ERR(switch_file_external(local_abspath,
                                        new_url,
                                        &new_item->peg_revision,
@@ -1044,6 +1054,9 @@ handle_externals_change(const struct ext
 
       svn_pool_clear(iterpool);
 
+      if (eb->ctx->cancel_func)
+        SVN_ERR(eb->ctx->cancel_func(eb->ctx->cancel_baton));
+
       target_abspath = svn_dirent_join(local_abspath, new_item->target_dir,
                                        iterpool);