You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2013/04/27 23:30:43 UTC
svn commit: r1476675 [4/17] - in /subversion/branches/fsfs-format7: ./
build/ build/ac-macros/ build/generator/ build/generator/templates/
contrib/hook-scripts/ contrib/server-side/svncutter/
subversion/bindings/cxxhl/include/ subversion/bindings/cxxhl...
Modified: subversion/branches/fsfs-format7/subversion/include/svn_ra.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/include/svn_ra.h?rev=1476675&r1=1476674&r2=1476675&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/include/svn_ra.h (original)
+++ subversion/branches/fsfs-format7/subversion/include/svn_ra.h Sat Apr 27 21:30:36 2013
@@ -1104,6 +1104,12 @@ svn_ra_get_mergeinfo(svn_ra_session_t *s
* (Note: this means that any subsequent txdeltas coming from the
* server are presumed to apply against the copied file!)
*
+ * Use @a ignore_ancestry to control whether or not items being
+ * updated will be checked for relatedness first. Unrelated items
+ * are typically transmitted to the editor as a deletion of one thing
+ * and the addition of another, but if this flag is @c TRUE,
+ * unrelated items will be diffed as if they were related.
+ *
* The working copy will be updated to @a revision_to_update_to, or the
* "latest" revision if this arg is invalid.
*
@@ -1111,7 +1117,8 @@ svn_ra_get_mergeinfo(svn_ra_session_t *s
* finishing the report, and may not perform any RA operations using
* @a session from within the editing operations of @a update_editor.
*
- * Use @a pool for memory allocation.
+ * Allocate @a *reporter and @a *report_baton in @a result_pool. Use
+ * @a scratch_pool for temporary allocations.
*
* @note The reporter provided by this function does NOT supply copy-
* from information to the diff editor callbacks.
@@ -1120,13 +1127,36 @@ svn_ra_get_mergeinfo(svn_ra_session_t *s
* needed, and sending too much data back, a pre-1.5 'recurse'
* directive may be sent to the server, based on @a depth.
*
+ * @note Pre Subversion 1.8 svnserve based servers never ignore ancestry.
+ *
* @note This differs from calling svn_ra_do_switch3() with the current
* URL of the target node. Update changes only the revision numbers,
* leaving any switched subtrees still switched, whereas switch changes
* every node in the tree to a child of the same URL.
*
+ * @since New in 1.8.
+ */
+svn_error_t *
+svn_ra_do_update3(svn_ra_session_t *session,
+ const svn_ra_reporter3_t **reporter,
+ void **report_baton,
+ svn_revnum_t revision_to_update_to,
+ const char *update_target,
+ svn_depth_t depth,
+ svn_boolean_t send_copyfrom_args,
+ svn_boolean_t ignore_ancestry,
+ const svn_delta_editor_t *update_editor,
+ void *update_baton,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool);
+
+/**
+ * Similar to svn_ra_do_update3(), but always ignoring ancestry.
+ *
* @since New in 1.5.
+ * @deprecated Provided for compatibility with the 1.4 API.
*/
+SVN_DEPRECATED
svn_error_t *
svn_ra_do_update2(svn_ra_session_t *session,
const svn_ra_reporter3_t **reporter,
@@ -1163,22 +1193,11 @@ svn_ra_do_update(svn_ra_session_t *sessi
/**
* Ask the RA layer to switch a working copy to a new revision and URL.
*
- * This is similar to svn_ra_do_update2(), but also changes the URL of
+ * This is similar to svn_ra_do_update3(), but also changes the URL of
* every node in the target tree to a child of the @a switch_url. In
* contrast, update changes only the revision numbers, leaving any
* switched subtrees still switched.
*
- * The other differences from svn_ra_do_update2() are:
- *
- * Use @a ignore_ancestry to control whether or not items being
- * switched will be checked for relatedness first. Unrelated items
- * are typically transmitted to the editor as a deletion of one thing
- * and the addition of another, but if this flag is @c TRUE,
- * unrelated items will be diffed as if they were related.
- *
- * Use @a result_pool for memory allocation and @a scratch_pool for
- * temporary work.
- *
* @note Pre Subversion 1.8 svnserve based servers always ignore ancestry
* and never send copyfrom data.
*
@@ -1320,7 +1339,7 @@ svn_ra_do_status(svn_ra_session_t *sessi
* it's another form of svn_ra_do_update2().
*
* @note This function cannot be used to diff a single file, only a
- * working copy directory. See the svn_ra_do_switch2() function
+ * working copy directory. See the svn_ra_do_switch3() function
* for more details.
*
* The client initially provides a @a diff_editor/@a diff_baton to the RA
@@ -1949,7 +1968,7 @@ svn_ra_get_deleted_rev(svn_ra_session_t
* paths relative to the repository root URL (of the repository which
* @a ra_session is associated).
*
- * Allocated @a *inherited_props in @a result_pool, use @a scratch_pool
+ * Allocate @a *inherited_props in @a result_pool. Use @a scratch_pool
* for temporary allocations.
*
* @since New in 1.8.
Modified: subversion/branches/fsfs-format7/subversion/include/svn_ra_svn.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/include/svn_ra_svn.h?rev=1476675&r1=1476674&r2=1476675&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/include/svn_ra_svn.h (original)
+++ subversion/branches/fsfs-format7/subversion/include/svn_ra_svn.h Sat Apr 27 21:30:36 2013
@@ -164,66 +164,6 @@ typedef struct svn_ra_svn_item_t
typedef svn_error_t *(*svn_ra_svn_edit_callback)(void *baton);
-/**
- * List of all commands supported by the SVN:// protocol.
- *
- * @since New in 1.8
- */
-typedef enum svn_ra_svn_cmd_t
-{
- svn_ra_svn_cmd_target_rev,
- svn_ra_svn_cmd_open_root,
- svn_ra_svn_cmd_delete_entry,
- svn_ra_svn_cmd_add_dir,
- svn_ra_svn_cmd_open_dir,
- svn_ra_svn_cmd_change_dir_prop,
- svn_ra_svn_cmd_close_dir,
- svn_ra_svn_cmd_absent_dir,
- svn_ra_svn_cmd_add_file,
- svn_ra_svn_cmd_open_file,
- svn_ra_svn_cmd_change_file_prop,
- svn_ra_svn_cmd_close_file,
- svn_ra_svn_cmd_absent_file,
- svn_ra_svn_cmd_textdelta_chunk,
- svn_ra_svn_cmd_textdelta_end,
- svn_ra_svn_cmd_apply_textdelta,
- svn_ra_svn_cmd_close_edit,
- svn_ra_svn_cmd_abort_edit,
-
- svn_ra_svn_cmd_set_path,
- svn_ra_svn_cmd_delete_path,
- svn_ra_svn_cmd_link_path,
- svn_ra_svn_cmd_finish_report,
- svn_ra_svn_cmd_abort_report,
-
- svn_ra_svn_cmd_reparent,
- svn_ra_svn_cmd_get_latest_rev,
- svn_ra_svn_cmd_get_dated_rev,
- svn_ra_svn_cmd_change_rev_prop2,
- svn_ra_svn_cmd_change_rev_prop,
- svn_ra_svn_cmd_rev_proplist,
- svn_ra_svn_cmd_rev_prop,
- svn_ra_svn_cmd_get_file,
- svn_ra_svn_cmd_update,
- svn_ra_svn_cmd_switch,
- svn_ra_svn_cmd_status,
- svn_ra_svn_cmd_diff,
- svn_ra_svn_cmd_check_path,
- svn_ra_svn_cmd_stat,
- svn_ra_svn_cmd_get_file_revs,
- svn_ra_svn_cmd_lock,
- svn_ra_svn_cmd_unlock,
- svn_ra_svn_cmd_get_lock,
- svn_ra_svn_cmd_get_locks,
- svn_ra_svn_cmd_replay,
- svn_ra_svn_cmd_replay_range,
- svn_ra_svn_cmd_get_deleted_rev,
- svn_ra_svn_cmd_get_iprops,
- svn_ra_svn_cmd_finish_replay,
-
- svn_ra_svn_cmd__last
-} svn_ra_svn_cmd_t;
-
/** Initialize a connection structure for the given socket or
* input/output files.
*
@@ -263,6 +203,7 @@ svn_ra_svn_conn_t *svn_ra_svn_create_con
*
* @deprecated Provided for backward compatibility with the 1.7 API.
*/
+SVN_DEPRECATED
svn_ra_svn_conn_t *
svn_ra_svn_create_conn2(apr_socket_t *sock,
apr_file_t *in_file,
@@ -322,10 +263,82 @@ svn_ra_svn_zero_copy_limit(svn_ra_svn_co
const char *
svn_ra_svn_conn_remote_host(svn_ra_svn_conn_t *conn);
+/** Set @a *editor and @a *edit_baton to an editor which will pass editing
+ * operations over the network, using @a conn and @a pool.
+ *
+ * Upon successful completion of the edit, the editor will invoke @a callback
+ * with @a callback_baton as an argument.
+ */
+void
+svn_ra_svn_get_editor(const svn_delta_editor_t **editor,
+ void **edit_baton,
+ svn_ra_svn_conn_t *conn,
+ apr_pool_t *pool,
+ svn_ra_svn_edit_callback callback,
+ void *callback_baton);
+
+/** Receive edit commands over the network and use them to drive @a editor
+ * with @a edit_baton. On return, @a *aborted will be set if the edit was
+ * aborted. The drive can be terminated with a finish-replay command only
+ * if @a for_replay is TRUE.
+ *
+ * @since New in 1.4.
+ */
+svn_error_t *
+svn_ra_svn_drive_editor2(svn_ra_svn_conn_t *conn,
+ apr_pool_t *pool,
+ const svn_delta_editor_t *editor,
+ void *edit_baton,
+ svn_boolean_t *aborted,
+ svn_boolean_t for_replay);
+
+/** Like svn_ra_svn_drive_editor2, but with @a for_replay always FALSE.
+ *
+ * @deprecated Provided for backward compatibility with the 1.3 API.
+ */
+SVN_DEPRECATED
+svn_error_t *
+svn_ra_svn_drive_editor(svn_ra_svn_conn_t *conn,
+ apr_pool_t *pool,
+ const svn_delta_editor_t *editor,
+ void *edit_baton,
+ svn_boolean_t *aborted);
+
+/** This function is only intended for use by svnserve.
+ *
+ * Perform CRAM-MD5 password authentication. On success, return
+ * SVN_NO_ERROR with *user set to the username and *success set to
+ * TRUE. On an error which can be reported to the client, report the
+ * error and return SVN_NO_ERROR with *success set to FALSE. On
+ * communications failure, return an error.
+ */
+svn_error_t *
+svn_ra_svn_cram_server(svn_ra_svn_conn_t *conn,
+ apr_pool_t *pool,
+ svn_config_t *pwdb,
+ const char **user,
+ svn_boolean_t *success);
+
+/**
+ * Get libsvn_ra_svn version information.
+ * @since New in 1.1.
+ */
+const svn_version_t *
+svn_ra_svn_version(void);
+
+/**
+ * @defgroup ra_svn_deprecated ra_svn low-level functions
+ * @{
+ */
+
/** Write a number over the net.
*
* Writes will be buffered until the next read or flush.
+ *
+ * @deprecated Provided for backward compatibility with the 1.7 API.
+ * RA_SVN low-level functions are no longer considered public.
*/
+SVN_DEPRECATED
svn_error_t *
svn_ra_svn_write_number(svn_ra_svn_conn_t *conn,
apr_pool_t *pool,
@@ -334,7 +347,11 @@ svn_ra_svn_write_number(svn_ra_svn_conn_
/** Write a string over the net.
*
* Writes will be buffered until the next read or flush.
+ *
+ * @deprecated Provided for backward compatibility with the 1.7 API.
+ * RA_SVN low-level functions are no longer considered public.
*/
+SVN_DEPRECATED
svn_error_t *
svn_ra_svn_write_string(svn_ra_svn_conn_t *conn,
apr_pool_t *pool,
@@ -343,7 +360,11 @@ svn_ra_svn_write_string(svn_ra_svn_conn_
/** Write a cstring over the net.
*
* Writes will be buffered until the next read or flush.
+ *
+ * @deprecated Provided for backward compatibility with the 1.7 API.
+ * RA_SVN low-level functions are no longer considered public.
*/
+SVN_DEPRECATED
svn_error_t *
svn_ra_svn_write_cstring(svn_ra_svn_conn_t *conn,
apr_pool_t *pool,
@@ -352,7 +373,11 @@ svn_ra_svn_write_cstring(svn_ra_svn_conn
/** Write a word over the net.
*
* Writes will be buffered until the next read or flush.
+ *
+ * @deprecated Provided for backward compatibility with the 1.7 API.
+ * RA_SVN low-level functions are no longer considered public.
*/
+SVN_DEPRECATED
svn_error_t *
svn_ra_svn_write_word(svn_ra_svn_conn_t *conn,
apr_pool_t *pool,
@@ -362,18 +387,32 @@ svn_ra_svn_write_word(svn_ra_svn_conn_t
* in which case an empty list will be written out.
*
* @since New in 1.5.
+ *
+ * @deprecated Provided for backward compatibility with the 1.7 API.
+ * RA_SVN low-level functions are no longer considered public.
*/
+SVN_DEPRECATED
svn_error_t *
svn_ra_svn_write_proplist(svn_ra_svn_conn_t *conn,
apr_pool_t *pool,
apr_hash_t *props);
-/** Begin a list. Writes will be buffered until the next read or flush. */
+/** Begin a list. Writes will be buffered until the next read or flush.
+ *
+ * @deprecated Provided for backward compatibility with the 1.7 API.
+ * RA_SVN low-level functions are no longer considered public.
+ */
+SVN_DEPRECATED
svn_error_t *
svn_ra_svn_start_list(svn_ra_svn_conn_t *conn,
apr_pool_t *pool);
-/** End a list. Writes will be buffered until the next read or flush. */
+/** End a list. Writes will be buffered until the next read or flush.
+ *
+ * @deprecated Provided for backward compatibility with the 1.7 API.
+ * RA_SVN low-level functions are no longer considered public.
+ */
+SVN_DEPRECATED
svn_error_t *
svn_ra_svn_end_list(svn_ra_svn_conn_t *conn,
apr_pool_t *pool);
@@ -382,7 +421,11 @@ svn_ra_svn_end_list(svn_ra_svn_conn_t *c
*
* Normally this shouldn't be necessary, since the write buffer is flushed
* when a read is attempted.
+ *
+ * @deprecated Provided for backward compatibility with the 1.7 API.
+ * RA_SVN low-level functions are no longer considered public.
*/
+SVN_DEPRECATED
svn_error_t *
svn_ra_svn_flush(svn_ra_svn_conn_t *conn,
apr_pool_t *pool);
@@ -425,13 +468,22 @@ svn_ra_svn_flush(svn_ra_svn_conn_t *conn
for (i = 0; i < n; i++)
SVN_ERR(svn_ra_svn_write_word(conn, pool, words[i]));
SVN_ERR(svn_ra_svn_write_tuple(conn, pool, "!)b", flag)); @endcode
+ *
+ * @deprecated Provided for backward compatibility with the 1.7 API.
+ * RA_SVN low-level functions are no longer considered public.
*/
+SVN_DEPRECATED
svn_error_t *
svn_ra_svn_write_tuple(svn_ra_svn_conn_t *conn,
apr_pool_t *pool,
const char *fmt, ...);
-/** Read an item from the network into @a *item. */
+/** Read an item from the network into @a *item.
+ *
+ * @deprecated Provided for backward compatibility with the 1.7 API.
+ * RA_SVN low-level functions are no longer considered public.
+ */
+SVN_DEPRECATED
svn_error_t *
svn_ra_svn_read_item(svn_ra_svn_conn_t *conn,
apr_pool_t *pool,
@@ -443,7 +495,11 @@ svn_ra_svn_read_item(svn_ra_svn_conn_t *
* a client connection opened in tunnel mode, since people's dotfiles
* sometimes write output to stdout. It may only be called at the
* beginning of a client connection.
+ *
+ * @deprecated Provided for backward compatibility with the 1.7 API.
+ * RA_SVN low-level functions are no longer considered public.
*/
+SVN_DEPRECATED
svn_error_t *
svn_ra_svn_skip_leading_garbage(svn_ra_svn_conn_t *conn,
apr_pool_t *pool);
@@ -479,7 +535,11 @@ svn_ra_svn_skip_leading_garbage(svn_ra_s
* SVN_RA_SVN_UNSPECIFIED_NUMBER, and 's', 'c', 'w', and 'l' values
* will be set to @c NULL. 'b' may not appear inside an optional
* tuple specification; use 'B' instead.
+ *
+ * @deprecated Provided for backward compatibility with the 1.7 API.
+ * RA_SVN low-level functions are no longer considered public.
*/
+SVN_DEPRECATED
svn_error_t *
svn_ra_svn_parse_tuple(const apr_array_header_t *list,
apr_pool_t *pool,
@@ -487,7 +547,11 @@ svn_ra_svn_parse_tuple(const apr_array_h
/** Read a tuple from the network and parse it as a tuple, using the
* format string notation from svn_ra_svn_parse_tuple().
+ *
+ * @deprecated Provided for backward compatibility with the 1.7 API.
+ * RA_SVN low-level functions are no longer considered public.
*/
+SVN_DEPRECATED
svn_error_t *
svn_ra_svn_read_tuple(svn_ra_svn_conn_t *conn,
apr_pool_t *pool,
@@ -497,7 +561,11 @@ svn_ra_svn_read_tuple(svn_ra_svn_conn_t
* properties, storing the properties in a hash table.
*
* @since New in 1.5.
+ *
+ * @deprecated Provided for backward compatibility with the 1.7 API.
+ * RA_SVN low-level functions are no longer considered public.
*/
+SVN_DEPRECATED
svn_error_t *
svn_ra_svn_parse_proplist(const apr_array_header_t *list,
apr_pool_t *pool,
@@ -505,7 +573,11 @@ svn_ra_svn_parse_proplist(const apr_arra
/** Read a command response from the network and parse it as a tuple, using
* the format string notation from svn_ra_svn_parse_tuple().
+ *
+ * @deprecated Provided for backward compatibility with the 1.7 API.
+ * RA_SVN low-level functions are no longer considered public.
*/
+SVN_DEPRECATED
svn_error_t *
svn_ra_svn_read_cmd_response(svn_ra_svn_conn_t *conn,
apr_pool_t *pool,
@@ -524,7 +596,10 @@ svn_ra_svn_read_cmd_response(svn_ra_svn_
*
* @since New in 1.6.
*
+ * @deprecated Provided for backward compatibility with the 1.7 API.
+ * RA_SVN low-level functions are no longer considered public.
*/
+SVN_DEPRECATED
svn_error_t *
svn_ra_svn_handle_commands2(svn_ra_svn_conn_t *conn,
apr_pool_t *pool,
@@ -548,7 +623,7 @@ svn_ra_svn_handle_commands(svn_ra_svn_co
* as svn_ra_svn_write_tuple().
*
* @deprecated Provided for backward compatibility with the 1.7 API.
- * Use svn_ra_svn_write_templated_cmd instead.
+ * RA_SVN low-level functions are no longer considered public.
*/
SVN_DEPRECATED
svn_error_t *
@@ -557,90 +632,34 @@ svn_ra_svn_write_cmd(svn_ra_svn_conn_t *
const char *cmdname,
const char *fmt, ...);
-/** Write a command of type @a cmd over the network connection @a conn.
- * The parameters to be provided are command-specific. @a pool will be
- * used for allocations.
- *
- * @since New in 1.8.
- */
-svn_error_t *
-svn_ra_svn_write_templated_cmd(svn_ra_svn_conn_t *conn,
- apr_pool_t *pool,
- svn_ra_svn_cmd_t cmd, ...);
-
/** Write a successful command response over the network, using the
* same format string notation as svn_ra_svn_write_tuple(). Do not use
* partial tuples with this function; if you need to use partial
* tuples, just write out the "success" and argument tuple by hand.
+ *
+ * @deprecated Provided for backward compatibility with the 1.7 API.
+ * RA_SVN low-level functions are no longer considered public.
*/
+SVN_DEPRECATED
svn_error_t *
svn_ra_svn_write_cmd_response(svn_ra_svn_conn_t *conn,
apr_pool_t *pool,
const char *fmt, ...);
-/** Write an unsuccessful command response over the network. */
+/** Write an unsuccessful command response over the network.
+ *
+ * @deprecated Provided for backward compatibility with the 1.7 API.
+ * RA_SVN low-level functions are no longer considered public.
+ */
+SVN_DEPRECATED
svn_error_t *
svn_ra_svn_write_cmd_failure(svn_ra_svn_conn_t *conn,
apr_pool_t *pool,
svn_error_t *err);
-/** Set @a *editor and @a *edit_baton to an editor which will pass editing
- * operations over the network, using @a conn and @a pool.
- *
- * Upon successful completion of the edit, the editor will invoke @a callback
- * with @a callback_baton as an argument.
- */
-void
-svn_ra_svn_get_editor(const svn_delta_editor_t **editor,
- void **edit_baton,
- svn_ra_svn_conn_t *conn,
- apr_pool_t *pool,
- svn_ra_svn_edit_callback callback,
- void *callback_baton);
-
-/** Receive edit commands over the network and use them to drive @a editor
- * with @a edit_baton. On return, @a *aborted will be set if the edit was
- * aborted. The drive can be terminated with a finish-replay command only
- * if @a for_replay is TRUE.
- */
-svn_error_t *
-svn_ra_svn_drive_editor2(svn_ra_svn_conn_t *conn,
- apr_pool_t *pool,
- const svn_delta_editor_t *editor,
- void *edit_baton,
- svn_boolean_t *aborted,
- svn_boolean_t for_replay);
-
-/** Like svn_ra_svn_drive_editor2, but with @a for_replay always FALSE.
- */
-svn_error_t *
-svn_ra_svn_drive_editor(svn_ra_svn_conn_t *conn,
- apr_pool_t *pool,
- const svn_delta_editor_t *editor,
- void *edit_baton,
- svn_boolean_t *aborted);
-
-/** This function is only intended for use by svnserve.
- *
- * Perform CRAM-MD5 password authentication. On success, return
- * SVN_NO_ERROR with *user set to the username and *success set to
- * TRUE. On an error which can be reported to the client, report the
- * error and return SVN_NO_ERROR with *success set to FALSE. On
- * communications failure, return an error.
- */
-svn_error_t *
-svn_ra_svn_cram_server(svn_ra_svn_conn_t *conn,
- apr_pool_t *pool,
- svn_config_t *pwdb,
- const char **user,
- svn_boolean_t *success);
-
/**
- * Get libsvn_ra_svn version information.
- * @since New in 1.1.
+ * @}
*/
-const svn_version_t *
-svn_ra_svn_version(void);
#ifdef __cplusplus
}
Modified: subversion/branches/fsfs-format7/subversion/include/svn_repos.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/include/svn_repos.h?rev=1476675&r1=1476674&r2=1476675&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/include/svn_repos.h (original)
+++ subversion/branches/fsfs-format7/subversion/include/svn_repos.h Sat Apr 27 21:30:36 2013
@@ -440,6 +440,11 @@ svn_repos_create(svn_repos_t **repos_p,
* It does *not* guarantee the most optimized repository state as a
* dump and subsequent load would.
*
+ * @note On some platforms the exclusive lock does not exclude other
+ * threads in the same process so this function should only be called
+ * by a single threaded process, or by a multi-threaded process when
+ * no other threads are accessing the repository.
+ *
* @since New in 1.7.
*/
svn_error_t *
@@ -490,6 +495,26 @@ svn_repos_has_capability(svn_repos_t *re
apr_pool_t *pool);
/**
+ * Return a set capabilities supported by the running Subversion library and by
+ * @a repos. (Capabilities supported by this version of Subversion but not by
+ * @a repos are not listed. This may happen when svn_repos_upgrade2() has not
+ * been called after a software upgrade.)
+ *
+ * The set is represented as a hash whose keys are the set members. The values
+ * are not defined.
+ *
+ * @see svn_repos_info_format()
+ *
+ * @since New in 1.9.
+ */
+svn_error_t *
+svn_repos_capabilities(apr_hash_t **capabilities,
+ svn_repos_t *repos,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool);
+/** @} */
+
+/**
* The capability of doing the right thing with merge-tracking
* information, both storing it and responding to queries about it.
*
@@ -503,6 +528,8 @@ svn_repos_has_capability(svn_repos_t *re
* colons for their own reasons. While this RA limitation has no
* direct impact on repository capabilities, there's no reason to be
* gratuitously different either.
+ *
+ * If you add a capability, update svn_repos_capabilities().
*/
@@ -657,19 +684,31 @@ svn_repos_recover(const char *path,
apr_pool_t *pool);
/**
+ * Callback for svn_repos_freeze.
+ *
+ * @since New in 1.8.
+ */
+typedef svn_error_t *(*svn_repos_freeze_func_t)(void *baton, apr_pool_t *pool);
+
+/**
* Take an exclusive lock on each of the repositories in @a paths to
* prevent commits and then while holding all the locks invoke @a
- * freeze_body passing @a baton. Each repository may be readable by
+ * freeze_func passing @a freeze_baton. Each repository may be readable by
* Subversion while frozen, or may be unreadable, depending on which
* FS backend the repository uses. Repositories are locked in the
* order in which they are specified in the array.
*
+ * @note On some platforms the exclusive lock does not exclude other
+ * threads in the same process so this function should only be called
+ * by a single threaded process, or by a multi-threaded process when
+ * no other threads are accessing the repositories.
+ *
* @since New in 1.8.
*/
svn_error_t *
svn_repos_freeze(apr_array_header_t *paths,
- svn_error_t *(*freeze_body)(void *baton, apr_pool_t *pool),
- void *baton,
+ svn_repos_freeze_func_t freeze_func,
+ void *freeze_baton,
apr_pool_t *pool);
/** This function is a wrapper around svn_fs_berkeley_logfiles(),
@@ -791,7 +830,6 @@ svn_repos_post_unlock_hook(svn_repos_t *
* If @a hooks_env_path is not absolute, it specifies a path relative
* to the parent of the file's default location.
*
- * @a result_pool should be the same pool that @a repos was allocated in.
* Use @a scratch_pool for temporary allocations.
*
* If this function is not called, or if the specified configuration
@@ -803,7 +841,6 @@ svn_repos_post_unlock_hook(svn_repos_t *
svn_error_t *
svn_repos_hooks_setenv(svn_repos_t *repos,
const char *hooks_env_path,
- apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
/** @} */
@@ -919,9 +956,9 @@ svn_repos_begin_report3(void **report_ba
* always passed as 0.
*
* @since New in 1.5.
- *
* @deprecated Provided for backward compatibility with the 1.7 API.
*/
+SVN_DEPRECATED
svn_error_t *
svn_repos_begin_report2(void **report_baton,
svn_revnum_t revnum,
@@ -2359,7 +2396,6 @@ svn_repos_fs_change_txn_props(svn_fs_txn
const apr_array_header_t *props,
apr_pool_t *pool);
-/** @} */
/* ---------------------------------------------------------------*/
@@ -2450,6 +2486,27 @@ svn_repos_node_editor(const svn_delta_ed
svn_repos_node_t *
svn_repos_node_from_baton(void *edit_baton);
+/**
+ * Return repository format information for @a repos.
+ *
+ * Set @a *repos_format to the repository format number of @a repos, which is
+ * an integer that increases when incompatible changes are made (such as
+ * by #svn_repos_upgrade).
+ *
+ * Set @a *supports_version to the version number of the minimum Subversion GA
+ * release that can read and write @a repos.
+ *
+ * @see svn_fs_info_format(), svn_repos_capabilities()
+ *
+ * @since New in 1.9.
+ */
+svn_error_t *
+svn_repos_info_format(int *repos_format,
+ svn_version_t **supports_version,
+ svn_repos_t *repos,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool);
+
/** @} */
/* ---------------------------------------------------------------*/
@@ -2696,13 +2753,6 @@ svn_repos_dump_fs(svn_repos_t *repos,
* @a cancel_baton as argument to see if the client wishes to cancel
* the load.
*
- * @note If @a start_rev and @a end_rev are valid revisions, this
- * function presumes the revisions as numbered in @a dumpstream only
- * increase from the beginning of the stream to the end. Gaps in the
- * number sequence are ignored, but upon finding a revision number
- * younger than the specified range, this function may stop loading
- * new revisions regardless of their number.
- *
* @since New in 1.8.
*/
svn_error_t *
@@ -2951,13 +3001,6 @@ svn_repos_parse_dumpstream3(svn_stream_t
* loaded nodes, from root to @a parent_dir. The directory @a parent_dir
* must be an existing directory in the repository.
*
- * @note If @a start_rev and @a end_rev are valid revisions, this
- * function presumes the revisions as numbered in @a dumpstream only
- * increase from the beginning of the stream to the end. Gaps in the
- * number sequence are ignored, but upon finding a revision number
- * younger than the specified range, this function may stop loading
- * new revisions regardless of their number.
- *
* @since New in 1.8.
*/
svn_error_t *
@@ -3168,12 +3211,11 @@ svn_repos_get_fs_build_parser(const svn_
typedef struct svn_authz_t svn_authz_t;
/**
- * Read authz configuration data from @a path (a file, repos relative
- * url, an absolute file url, or a registry path) into @a *authz_p,
- * allocated in @a pool.
+ * Read authz configuration data from @a path (a dirent, an absolute file url
+ * or a registry path) into @a *authz_p, allocated in @a pool.
*
- * If @a groups_path (a file, repos relative url, an absolute file url,
- * or a registry path) is set, use the global groups parsed from it.
+ * If @a groups_path (a dirent, an absolute file url, or a registry path) is
+ * set, use the global groups parsed from it.
*
* If @a path or @a groups_path is not a valid authz rule file, then return
* #SVN_ERR_AUTHZ_INVALID_CONFIG. The contents of @a *authz_p is then
@@ -3181,10 +3223,6 @@ typedef struct svn_authz_t svn_authz_t;
* is also an error other than #SVN_ERR_AUTHZ_INVALID_CONFIG (exact error
* depends on the access type).
*
- * If @a path is a repos relative URL then @a repos_root must be set to
- * the root of the repository the authz configuration will be used with.
- * The same applies to @a groups_path if it is being used.
- *
* @since New in 1.8.
*/
svn_error_t *
@@ -3192,11 +3230,10 @@ svn_repos_authz_read2(svn_authz_t **auth
const char *path,
const char *groups_path,
svn_boolean_t must_exist,
- const char *repos_root,
apr_pool_t *pool);
-/**
+/**
* Similar to svn_repos_authz_read2(), but with @a groups_path and @a
* repos_root always passed as @c NULL.
*
@@ -3220,7 +3257,7 @@ svn_repos_authz_read(svn_authz_t **authz
*/
svn_error_t *
svn_repos_authz_parse(svn_authz_t **authz_p,
- svn_stream_t *stream,
+ svn_stream_t *stream,
svn_stream_t *groups_stream,
apr_pool_t *pool);
@@ -3392,7 +3429,6 @@ svn_repos_remember_client_capabilities(s
const apr_array_header_t *capabilities);
-
#ifdef __cplusplus
}
#endif /* __cplusplus */
Modified: subversion/branches/fsfs-format7/subversion/include/svn_subst.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/include/svn_subst.h?rev=1476675&r1=1476674&r2=1476675&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/include/svn_subst.h (original)
+++ subversion/branches/fsfs-format7/subversion/include/svn_subst.h Sat Apr 27 21:30:36 2013
@@ -127,13 +127,32 @@ typedef struct svn_subst_keywords_t
* Set @a *kw to a new keywords hash filled with the appropriate contents
* given a @a keywords_string (the contents of the svn:keywords
* property for the file in question), the revision @a rev, the @a url,
- * the @a date the file was committed on, and the @a author of the last
- * commit.
+ * the @a date the file was committed on, the @a author of the last
+ * commit, and the URL of the repository root @a repos_root_url.
*
- * Any of the inputs @a rev, @a url, @a date and @a author can be @c NULL,
- * or @c 0 for @a date, to indicate that the information is not present.
- * Each piece of information that is not present expands to the empty
- * string wherever it appears in an expanded keyword value. (This can
+ * Custom keywords defined in svn:keywords properties are expanded
+ * using the provided parameters and in accordance with the following
+ * format substitutions in the @a keywords_string:
+ * %a - The author.
+ * %b - The basename of the URL.
+ * %d - Short format of the date.
+ * %D - Long format of the date.
+ * %P - The file's path, relative to the repository root URL.
+ * %r - The revision.
+ * %R - The URL to the root of the repository.
+ * %u - The URL of the file.
+ * %_ - A space (keyword definitions cannot contain a literal space).
+ * %% - A literal '%'.
+ * %H - Equivalent to %P%_%r%_%d%_%a.
+ * %I - Equivalent to %b%_%r%_%d%_%a.
+ *
+ * Custom keywords are defined by appending '=' to the keyword name, followed
+ * by a string containing any combination of the format substitutions.
+ *
+ * Any of the inputs @a rev, @a url, @a date, @a author, and @a repos_root_url
+ * can be @c NULL, or @c 0 for @a date, to indicate that the information is
+ * not present. Each piece of information that is not present expands to the
+ * empty string wherever it appears in an expanded keyword value. (This can
* result in multiple adjacent spaces in the expansion of a multi-valued
* keyword such as "Id".)
*
@@ -142,8 +161,26 @@ typedef struct svn_subst_keywords_t
*
* All memory is allocated out of @a pool.
*
+ * @since New in 1.8.
+ */
+svn_error_t *
+svn_subst_build_keywords3(apr_hash_t **kw,
+ const char *keywords_string,
+ const char *rev,
+ const char *url,
+ const char *repos_root_url,
+ apr_time_t date,
+ const char *author,
+ apr_pool_t *pool);
+
+/** Similar to svn_subst_build_keywords3() except that it does not accept
+ * the @a repos_root_url parameter and hence supports less substitutions,
+ * and also does not support custom keyword definitions.
+ *
* @since New in 1.3.
+ * @deprecated Provided for backward compatibility with the 1.7 API.
*/
+SVN_DEPRECATED
svn_error_t *
svn_subst_build_keywords2(apr_hash_t **kw,
const char *keywords_string,
Modified: subversion/branches/fsfs-format7/subversion/include/svn_utf.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/include/svn_utf.h?rev=1476675&r1=1476674&r2=1476675&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/include/svn_utf.h (original)
+++ subversion/branches/fsfs-format7/subversion/include/svn_utf.h Sat Apr 27 21:30:36 2013
@@ -67,11 +67,12 @@ svn_utf_initialize2(apr_pool_t *pool,
svn_boolean_t assume_native_utf8);
/**
- * Like svn_utf_initialize but without the ability to force the
+ * Like svn_utf_initialize2() but without the ability to force the
* native encoding to UTF-8.
*
* @deprecated Provided for backward compatibility with the 1.7 API.
*/
+SVN_DEPRECATED
void
svn_utf_initialize(apr_pool_t *pool);
Modified: subversion/branches/fsfs-format7/subversion/include/svn_wc.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/include/svn_wc.h?rev=1476675&r1=1476674&r2=1476675&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/include/svn_wc.h (original)
+++ subversion/branches/fsfs-format7/subversion/include/svn_wc.h Sat Apr 27 21:30:36 2013
@@ -1247,7 +1247,7 @@ typedef enum svn_wc_notify_action_t
* @since New in 1.8. */
svn_wc_notify_left_local_modifications,
- /** A copy from a foreign repository has started
+ /** A copy from a foreign repository has started
* @since New in 1.8. */
svn_wc_notify_foreign_copy_begin,
@@ -4423,6 +4423,7 @@ svn_wc_copy(const char *src,
* @deprecated Provided for backward compatibility with the 1.7 API.
* @see svn_client_move7()
*/
+SVN_DEPRECATED
svn_error_t *
svn_wc_move(svn_wc_context_t *wc_ctx,
const char *src_abspath,
Modified: subversion/branches/fsfs-format7/subversion/libsvn_auth_gnome_keyring/gnome_keyring.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_auth_gnome_keyring/gnome_keyring.c?rev=1476675&r1=1476674&r2=1476675&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_auth_gnome_keyring/gnome_keyring.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_auth_gnome_keyring/gnome_keyring.c Sat Apr 27 21:30:36 2013
@@ -29,6 +29,9 @@
#include <apr_pools.h>
#include <apr_strings.h>
+#include <glib.h>
+#include <gnome-keyring.h>
+
#include "svn_auth.h"
#include "svn_config.h"
#include "svn_error.h"
@@ -39,8 +42,6 @@
#include "svn_private_config.h"
-#include <glib.h>
-#include <gnome-keyring.h>
/*-----------------------------------------------------------------------*/
Modified: subversion/branches/fsfs-format7/subversion/libsvn_auth_kwallet/kwallet.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_auth_kwallet/kwallet.cpp?rev=1476675&r1=1476674&r2=1476675&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_auth_kwallet/kwallet.cpp (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_auth_kwallet/kwallet.cpp Sat Apr 27 21:30:36 2013
@@ -33,6 +33,17 @@
#include <apr_pools.h>
#include <apr_strings.h>
+
+#include <dbus/dbus.h>
+#include <QtCore/QCoreApplication>
+#include <QtCore/QString>
+
+#include <kaboutdata.h>
+#include <kcmdlineargs.h>
+#include <kcomponentdata.h>
+#include <klocalizedstring.h>
+#include <kwallet.h>
+
#include "svn_auth.h"
#include "svn_config.h"
#include "svn_error.h"
@@ -45,17 +56,7 @@
#include "svn_private_config.h"
-#include <dbus/dbus.h>
-#include <QtCore/QCoreApplication>
-#include <QtCore/QString>
-
-#include <kaboutdata.h>
-#include <kcmdlineargs.h>
-#include <kcomponentdata.h>
-#include <klocalizedstring.h>
-#include <kwallet.h>
-
/*-----------------------------------------------------------------------*/
/* KWallet simple provider, puts passwords in KWallet */
/*-----------------------------------------------------------------------*/
Modified: subversion/branches/fsfs-format7/subversion/libsvn_client/add.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_client/add.c?rev=1476675&r1=1476674&r2=1476675&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_client/add.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_client/add.c Sat Apr 27 21:30:36 2013
@@ -641,7 +641,7 @@ svn_client__get_all_auto_props(apr_hash_
*autoprops = apr_hash_make(result_pool);
autoprops_baton.result_pool = result_pool;
autoprops_baton.autoprops = *autoprops;
-
+
/* Are "traditional" auto-props enabled? If so grab them from the
config. This is our starting set auto-props, which may be overriden
@@ -1026,7 +1026,7 @@ svn_client_add5(const char *path,
SVN_WC__CALL_WITH_WRITE_LOCK(
add(local_abspath, depth, force, no_ignore, no_autoprops,
existing_parent_abspath, ctx, scratch_pool),
- ctx->wc_ctx, (existing_parent_abspath ? existing_parent_abspath
+ ctx->wc_ctx, (existing_parent_abspath ? existing_parent_abspath
: parent_abspath),
FALSE /* lock_anchor */, scratch_pool);
return SVN_NO_ERROR;
Modified: subversion/branches/fsfs-format7/subversion/libsvn_client/cat.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_client/cat.c?rev=1476675&r1=1476674&r2=1476675&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_client/cat.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_client/cat.c Sat Apr 27 21:30:36 2013
@@ -124,12 +124,18 @@ svn_client__get_normalized_stream(svn_st
const char *author;
const char *url;
apr_time_t tm;
+ const char *repos_root_url;
+ const char *repos_relpath;
SVN_ERR(svn_wc__node_get_changed_info(&changed_rev, &tm, &author, wc_ctx,
local_abspath, scratch_pool,
scratch_pool));
- SVN_ERR(svn_wc__node_get_url(&url, wc_ctx, local_abspath, scratch_pool,
- scratch_pool));
+ SVN_ERR(svn_wc__node_get_repos_info(NULL, &repos_relpath, &repos_root_url,
+ NULL,
+ wc_ctx, local_abspath, scratch_pool,
+ scratch_pool));
+ url = svn_path_url_add_component2(repos_root_url, repos_relpath,
+ scratch_pool);
if (local_mod)
{
@@ -152,8 +158,9 @@ svn_client__get_normalized_stream(svn_st
rev_str = apr_psprintf(scratch_pool, "%ld", changed_rev);
}
- SVN_ERR(svn_subst_build_keywords2(&kw, keywords->data, rev_str, url, tm,
- author, scratch_pool));
+ SVN_ERR(svn_subst_build_keywords3(&kw, keywords->data, rev_str, url,
+ repos_root_url, tm, author,
+ scratch_pool));
}
/* Wrap the output stream if translation is needed. */
@@ -181,6 +188,7 @@ svn_client_cat2(svn_stream_t *out,
svn_string_t *eol_style;
svn_string_t *keywords;
apr_hash_t *props;
+ const char *repos_root_url;
svn_stream_t *output = out;
svn_error_t *err;
@@ -225,6 +233,9 @@ svn_client_cat2(svn_stream_t *out,
peg_revision,
revision, ctx, pool));
+ /* Find the repos root URL */
+ SVN_ERR(svn_ra_get_repos_root2(ra_session, &repos_root_url, pool));
+
/* Grab some properties we need to know in order to figure out if anything
special needs to be done with this file. */
err = svn_ra_get_file(ra_session, "", loc->rev, NULL, NULL, &props, pool);
@@ -272,13 +283,12 @@ svn_client_cat2(svn_stream_t *out,
if (cmt_date)
SVN_ERR(svn_time_from_cstring(&when, cmt_date->data, pool));
- SVN_ERR(svn_subst_build_keywords2
- (&kw, keywords->data,
- cmt_rev->data,
- loc->url,
- when,
- cmt_author ? cmt_author->data : NULL,
- pool));
+ SVN_ERR(svn_subst_build_keywords3(&kw, keywords->data,
+ cmt_rev->data, loc->url,
+ repos_root_url, when,
+ cmt_author ?
+ cmt_author->data : NULL,
+ pool));
}
else
kw = NULL;
Modified: subversion/branches/fsfs-format7/subversion/libsvn_client/checkout.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_client/checkout.c?rev=1476675&r1=1476674&r2=1476675&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_client/checkout.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_client/checkout.c Sat Apr 27 21:30:36 2013
@@ -78,9 +78,6 @@ svn_client__checkout_internal(svn_revnum
svn_client_ctx_t *ctx,
apr_pool_t *pool)
{
- svn_error_t *err = NULL;
- svn_boolean_t sleep_here = FALSE;
- svn_boolean_t *use_sleep = timestamp_sleep ? timestamp_sleep : &sleep_here;
svn_node_kind_t kind;
apr_pool_t *session_pool = svn_pool_create(pool);
svn_ra_session_t *ra_session;
@@ -123,7 +120,7 @@ svn_client__checkout_internal(svn_revnum
entries file should only have an entry for THIS_DIR with a
URL, revnum, and an 'incomplete' flag. */
SVN_ERR(svn_io_make_dir_recursively(local_abspath, pool));
- err = initialize_area(local_abspath, pathrev, depth, ctx, pool);
+ SVN_ERR(initialize_area(local_abspath, pathrev, depth, ctx, pool));
}
else if (kind == svn_node_dir)
{
@@ -133,7 +130,7 @@ svn_client__checkout_internal(svn_revnum
SVN_ERR(svn_wc_check_wc2(&wc_format, ctx->wc_ctx, local_abspath, pool));
if (! wc_format)
{
- err = initialize_area(local_abspath, pathrev, depth, ctx, pool);
+ SVN_ERR(initialize_area(local_abspath, pathrev, depth, ctx, pool));
}
else
{
@@ -160,28 +157,13 @@ svn_client__checkout_internal(svn_revnum
}
/* Have update fix the incompleteness. */
- if (! err)
- {
- err = svn_client__update_internal(result_rev, local_abspath,
- revision, depth, TRUE,
- ignore_externals,
- allow_unver_obstructions,
- TRUE /* adds_as_modification */,
- FALSE, FALSE,
- use_sleep, ctx, pool);
- }
-
- if (err)
- {
- /* Don't rely on the error handling to handle the sleep later, do
- it now */
- svn_io_sleep_for_timestamps(local_abspath, pool);
- return svn_error_trace(err);
- }
- *use_sleep = TRUE;
-
- if (sleep_here)
- svn_io_sleep_for_timestamps(local_abspath, pool);
+ SVN_ERR(svn_client__update_internal(result_rev, local_abspath,
+ revision, depth, TRUE,
+ ignore_externals,
+ allow_unver_obstructions,
+ TRUE /* adds_as_modification */,
+ FALSE, FALSE,
+ timestamp_sleep, ctx, pool));
return SVN_NO_ERROR;
}
@@ -199,12 +181,18 @@ svn_client_checkout3(svn_revnum_t *resul
apr_pool_t *pool)
{
const char *local_abspath;
+ svn_error_t *err;
+ svn_boolean_t sleep_here = FALSE;
SVN_ERR(svn_dirent_get_absolute(&local_abspath, path, pool));
- return svn_client__checkout_internal(result_rev, URL, local_abspath,
- peg_revision, revision, depth,
- ignore_externals,
- allow_unver_obstructions, NULL,
- ctx, pool);
+ err = svn_client__checkout_internal(result_rev, URL, local_abspath,
+ peg_revision, revision, depth,
+ ignore_externals,
+ allow_unver_obstructions, &sleep_here,
+ ctx, pool);
+ if (sleep_here)
+ svn_io_sleep_for_timestamps(local_abspath, pool);
+
+ return svn_error_trace(err);
}
Modified: subversion/branches/fsfs-format7/subversion/libsvn_client/client.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_client/client.h?rev=1476675&r1=1476674&r2=1476675&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_client/client.h (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_client/client.h Sat Apr 27 21:30:36 2013
@@ -467,11 +467,9 @@ svn_client__make_local_parents(const cha
If IGNORE_EXTERNALS is true, do no externals processing.
- If TIMESTAMP_SLEEP is NULL this function will sleep before
- returning to ensure timestamp integrity. If TIMESTAMP_SLEEP is not
- NULL then the function will not sleep but will set *TIMESTAMP_SLEEP
- to TRUE if a sleep is required, and will not change
- *TIMESTAMP_SLEEP if no sleep is required.
+ Set *TIMESTAMP_SLEEP to TRUE if a sleep is required; otherwise do not
+ change *TIMESTAMP_SLEEP. The output will be valid even if the function
+ returns an error.
If ALLOW_UNVER_OBSTRUCTIONS is TRUE, unversioned children of LOCAL_ABSPATH
that obstruct items added from the repos are tolerated; if FALSE,
@@ -522,11 +520,11 @@ svn_client__update_internal(svn_revnum_t
If IGNORE_EXTERNALS is true, do no externals processing.
- If TIMESTAMP_SLEEP is NULL this function will sleep before
- returning to ensure timestamp integrity. If TIMESTAMP_SLEEP is not
- NULL then the function will not sleep but will set *TIMESTAMP_SLEEP
- to TRUE if a sleep is required, and will not change *TIMESTAMP_SLEEP
- if no sleep is required. If ALLOW_UNVER_OBSTRUCTIONS is TRUE,
+ Set *TIMESTAMP_SLEEP to TRUE if a sleep is required; otherwise do not
+ change *TIMESTAMP_SLEEP. The output will be valid even if the function
+ returns an error.
+
+ If ALLOW_UNVER_OBSTRUCTIONS is TRUE,
unversioned children of LOCAL_ABSPATH that obstruct items added from
the repos are tolerated; if FALSE, these obstructions cause the checkout
to fail.
@@ -551,11 +549,9 @@ svn_client__checkout_internal(svn_revnum
acquired and released if not held. Only switch as deeply as DEPTH
indicates.
- If TIMESTAMP_SLEEP is NULL this function will sleep before
- returning to ensure timestamp integrity. If TIMESTAMP_SLEEP is not
- NULL then the function will not sleep but will set *TIMESTAMP_SLEEP
- to TRUE if a sleep is required, and will not change
- *TIMESTAMP_SLEEP if no sleep is required.
+ Set *TIMESTAMP_SLEEP to TRUE if a sleep is required; otherwise do not
+ change *TIMESTAMP_SLEEP. The output will be valid even if the function
+ returns an error.
If IGNORE_EXTERNALS is true, don't process externals.
@@ -975,9 +971,9 @@ svn_client__do_commit(const char *base_u
Pass NOTIFY_FUNC with NOTIFY_BATON along to svn_client_checkout().
- *TIMESTAMP_SLEEP will be set TRUE if a sleep is required to ensure
- timestamp integrity, *TIMESTAMP_SLEEP will be unchanged if no sleep
- is required.
+ Set *TIMESTAMP_SLEEP to TRUE if a sleep is required; otherwise do not
+ change *TIMESTAMP_SLEEP. The output will be valid even if the function
+ returns an error.
Use POOL for temporary allocation. */
svn_error_t *
@@ -1006,10 +1002,6 @@ svn_client__handle_externals(apr_hash_t
NATIVE_EOL is the value passed as NATIVE_EOL when exporting.
- *TIMESTAMP_SLEEP will be set TRUE if a sleep is required to ensure
- timestamp integrity, *TIMESTAMP_SLEEP will be unchanged if no sleep
- is required.
-
Use POOL for temporary allocation. */
svn_error_t *
svn_client__export_externals(apr_hash_t *externals,
@@ -1019,7 +1011,6 @@ svn_client__export_externals(apr_hash_t
svn_depth_t requested_depth,
const char *native_eol,
svn_boolean_t ignore_keywords,
- svn_boolean_t *timestamp_sleep,
svn_client_ctx_t *ctx,
apr_pool_t *pool);
Modified: subversion/branches/fsfs-format7/subversion/libsvn_client/commit.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_client/commit.c?rev=1476675&r1=1476674&r2=1476675&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_client/commit.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_client/commit.c Sat Apr 27 21:30:36 2013
@@ -586,6 +586,7 @@ svn_client_commit6(const apr_array_heade
svn_error_t *bump_err = SVN_NO_ERROR;
svn_error_t *unlock_err = SVN_NO_ERROR;
svn_boolean_t commit_in_progress = FALSE;
+ svn_boolean_t timestamp_sleep = FALSE;
svn_commit_info_t *commit_info = NULL;
apr_pool_t *iterpool = svn_pool_create(pool);
const char *current_abspath;
@@ -945,6 +946,11 @@ svn_client_commit6(const apr_array_heade
/* Make a note that we have a commit-in-progress. */
commit_in_progress = TRUE;
+ /* We'll assume that, once we pass this point, we are going to need to
+ * sleep for timestamps. Really, we may not need to do unless and until
+ * we reach the point where we post-commit 'bump' the WC metadata. */
+ timestamp_sleep = TRUE;
+
/* Perform the commit. */
cmt_err = svn_error_trace(
svn_client__do_commit(base_url, commit_items, editor, edit_baton,
@@ -985,10 +991,11 @@ svn_client_commit6(const apr_array_heade
iterpool);
}
+ cleanup:
/* Sleep to ensure timestamp integrity. */
- svn_io_sleep_for_timestamps(base_abspath, pool);
+ if (timestamp_sleep)
+ svn_io_sleep_for_timestamps(base_abspath, pool);
- cleanup:
/* Abort the commit if it is still in progress. */
svn_pool_clear(iterpool); /* Close open handles before aborting */
if (commit_in_progress)
Modified: subversion/branches/fsfs-format7/subversion/libsvn_client/commit_util.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_client/commit_util.c?rev=1476675&r1=1476674&r2=1476675&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_client/commit_util.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_client/commit_util.c Sat Apr 27 21:30:36 2013
@@ -468,7 +468,7 @@ harvest_not_present_for_copy(svn_wc_cont
SVN_ERR(svn_wc__node_get_children_of_working_node(
&children, wc_ctx, local_abspath, TRUE,
scratch_pool, iterpool));
-
+
for (i = 0; i < children->nelts; i++)
{
const char *this_abspath = APR_ARRAY_IDX(children, i, const char *);
@@ -562,7 +562,7 @@ harvest_status_callback(void *status_bat
svn_boolean_t copy_mode;
struct harvest_baton *baton = status_baton;
- svn_boolean_t is_harvest_root =
+ svn_boolean_t is_harvest_root =
(strcmp(baton->root_abspath, local_abspath) == 0);
svn_client__committables_t *committables = baton->committables;
const char *repos_root_url = status->repos_root_url;
@@ -884,7 +884,7 @@ harvest_status_callback(void *status_bat
}
}
- /* Make sure we check for dangling children on additions
+ /* Make sure we check for dangling children on additions
We perform this operation on the harvest root, and on roots caused by
changelist filtering.
Modified: subversion/branches/fsfs-format7/subversion/libsvn_client/copy.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_client/copy.c?rev=1476675&r1=1476674&r2=1476675&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_client/copy.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_client/copy.c Sat Apr 27 21:30:36 2013
@@ -180,7 +180,8 @@ get_copy_pair_ancestors(const apr_array_
/* The guts of do_wc_to_wc_copies */
static svn_error_t *
-do_wc_to_wc_copies_with_write_lock(const apr_array_header_t *copy_pairs,
+do_wc_to_wc_copies_with_write_lock(svn_boolean_t *timestamp_sleep,
+ const apr_array_header_t *copy_pairs,
const char *dst_parent,
svn_client_ctx_t *ctx,
apr_pool_t *scratch_pool)
@@ -203,6 +204,7 @@ do_wc_to_wc_copies_with_write_lock(const
/* Perform the copy */
dst_abspath = svn_dirent_join(pair->dst_parent_abspath, pair->base_name,
iterpool);
+ *timestamp_sleep = TRUE;
err = svn_wc_copy3(ctx->wc_ctx, pair->src_abspath_or_url, dst_abspath,
FALSE /* metadata_only */,
ctx->cancel_func, ctx->cancel_baton,
@@ -212,7 +214,6 @@ do_wc_to_wc_copies_with_write_lock(const
}
svn_pool_destroy(iterpool);
- svn_io_sleep_for_timestamps(dst_parent, scratch_pool);
SVN_ERR(err);
return SVN_NO_ERROR;
}
@@ -220,7 +221,8 @@ do_wc_to_wc_copies_with_write_lock(const
/* Copy each COPY_PAIR->SRC into COPY_PAIR->DST. Use POOL for temporary
allocations. */
static svn_error_t *
-do_wc_to_wc_copies(const apr_array_header_t *copy_pairs,
+do_wc_to_wc_copies(svn_boolean_t *timestamp_sleep,
+ const apr_array_header_t *copy_pairs,
svn_client_ctx_t *ctx,
apr_pool_t *pool)
{
@@ -233,7 +235,8 @@ do_wc_to_wc_copies(const apr_array_heade
SVN_ERR(svn_dirent_get_absolute(&dst_parent_abspath, dst_parent, pool));
SVN_WC__CALL_WITH_WRITE_LOCK(
- do_wc_to_wc_copies_with_write_lock(copy_pairs, dst_parent, ctx, pool),
+ do_wc_to_wc_copies_with_write_lock(timestamp_sleep, copy_pairs, dst_parent,
+ ctx, pool),
ctx->wc_ctx, dst_parent_abspath, FALSE, pool);
return SVN_NO_ERROR;
@@ -295,7 +298,8 @@ do_wc_to_wc_moves_with_locks1(svn_client
/* Move each COPY_PAIR->SRC into COPY_PAIR->DST, deleting COPY_PAIR->SRC
afterwards. Use POOL for temporary allocations. */
static svn_error_t *
-do_wc_to_wc_moves(const apr_array_header_t *copy_pairs,
+do_wc_to_wc_moves(svn_boolean_t *timestamp_sleep,
+ const apr_array_header_t *copy_pairs,
const char *dst_path,
svn_boolean_t allow_mixed_revisions,
svn_boolean_t metadata_only,
@@ -349,6 +353,8 @@ do_wc_to_wc_moves(const apr_array_header
lock_dst = TRUE;
}
+ *timestamp_sleep = TRUE;
+
/* Perform the copy and then the delete. */
if (lock_src)
SVN_WC__CALL_WITH_WRITE_LOCK(
@@ -369,8 +375,6 @@ do_wc_to_wc_moves(const apr_array_header
}
svn_pool_destroy(iterpool);
- svn_io_sleep_for_timestamps(dst_path, pool);
-
return svn_error_trace(err);
}
@@ -1540,7 +1544,8 @@ notification_adjust_func(void *baton,
Resolve PAIR->src_revnum to a real revision number if it isn't already. */
static svn_error_t *
-repos_to_wc_copy_single(svn_client__copy_pair_t *pair,
+repos_to_wc_copy_single(svn_boolean_t *timestamp_sleep,
+ svn_client__copy_pair_t *pair,
svn_boolean_t same_repositories,
svn_boolean_t ignore_externals,
svn_ra_session_t *ra_session,
@@ -1577,7 +1582,7 @@ repos_to_wc_copy_single(svn_client__copy
/* Find a temporary location in which to check out the copy source. */
SVN_ERR(svn_wc__get_tmpdir(&tmpdir_abspath, ctx->wc_ctx, dst_abspath,
pool, pool));
-
+
SVN_ERR(svn_io_open_unique_file3(NULL, &tmp_abspath, tmpdir_abspath,
svn_io_file_del_on_close, pool, pool));
@@ -1592,14 +1597,14 @@ repos_to_wc_copy_single(svn_client__copy
void *old_notify_baton2 = ctx->notify_baton2;
struct notification_adjust_baton nb;
svn_error_t *err;
-
+
nb.inner_func = ctx->notify_func2;
nb.inner_baton = ctx->notify_baton2;
nb.checkout_abspath = tmp_abspath;
nb.final_abspath = dst_abspath;
ctx->notify_func2 = notification_adjust_func;
ctx->notify_baton2 = &nb;
-
+
err = svn_client__checkout_internal(&pair->src_revnum,
pair->src_original,
tmp_abspath,
@@ -1608,13 +1613,15 @@ repos_to_wc_copy_single(svn_client__copy
svn_depth_infinity,
ignore_externals, FALSE,
&sleep_needed, ctx, pool);
-
+
ctx->notify_func2 = old_notify_func2;
ctx->notify_baton2 = old_notify_baton2;
SVN_ERR(err);
}
+ *timestamp_sleep = TRUE;
+
/* Schedule dst_path for addition in parent, with copy history.
Don't send any notification here.
Then remove the temporary checkout's .svn dir in preparation for
@@ -1637,6 +1644,8 @@ repos_to_wc_copy_single(svn_client__copy
}
else
{
+ *timestamp_sleep = TRUE;
+
SVN_ERR(svn_client__copy_foreign(pair->src_abspath_or_url,
dst_abspath,
&pair->src_peg_revision,
@@ -1668,6 +1677,8 @@ repos_to_wc_copy_single(svn_client__copy
if (new_props && ! same_repositories)
svn_hash_sets(new_props, SVN_PROP_MERGEINFO, NULL);
+ *timestamp_sleep = TRUE;
+
SVN_ERR(svn_wc_add_repos_file4(
ctx->wc_ctx, dst_abspath,
new_base_contents, NULL, new_props, NULL,
@@ -1697,13 +1708,12 @@ repos_to_wc_copy_single(svn_client__copy
(*ctx->notify_func2)(ctx->notify_baton2, notify, pool);
}
- svn_io_sleep_for_timestamps(dst_abspath, pool);
-
return SVN_NO_ERROR;
}
-static svn_error_t*
-repos_to_wc_copy_locked(const apr_array_header_t *copy_pairs,
+static svn_error_t *
+repos_to_wc_copy_locked(svn_boolean_t *timestamp_sleep,
+ const apr_array_header_t *copy_pairs,
const char *top_dst_path,
svn_boolean_t ignore_externals,
svn_ra_session_t *ra_session,
@@ -1766,7 +1776,8 @@ repos_to_wc_copy_locked(const apr_array_
svn_pool_clear(iterpool);
- SVN_ERR(repos_to_wc_copy_single(APR_ARRAY_IDX(copy_pairs, i,
+ SVN_ERR(repos_to_wc_copy_single(timestamp_sleep,
+ APR_ARRAY_IDX(copy_pairs, i,
svn_client__copy_pair_t *),
same_repositories,
ignore_externals,
@@ -1778,7 +1789,8 @@ repos_to_wc_copy_locked(const apr_array_
}
static svn_error_t *
-repos_to_wc_copy(const apr_array_header_t *copy_pairs,
+repos_to_wc_copy(svn_boolean_t *timestamp_sleep,
+ const apr_array_header_t *copy_pairs,
svn_boolean_t make_parents,
svn_boolean_t ignore_externals,
svn_client_ctx_t *ctx,
@@ -1887,7 +1899,8 @@ repos_to_wc_copy(const apr_array_header_
svn_pool_destroy(iterpool);
SVN_WC__CALL_WITH_WRITE_LOCK(
- repos_to_wc_copy_locked(copy_pairs, top_dst_path, ignore_externals,
+ repos_to_wc_copy_locked(timestamp_sleep,
+ copy_pairs, top_dst_path, ignore_externals,
ra_session, ctx, pool),
ctx->wc_ctx, lock_abspath, FALSE, pool);
return SVN_NO_ERROR;
@@ -1897,9 +1910,17 @@ repos_to_wc_copy(const apr_array_header_
((revision.kind != svn_opt_revision_unspecified) \
&& (revision.kind != svn_opt_revision_working))
-/* Perform all allocations in POOL. */
+/* ...
+ *
+ * Set *TIMESTAMP_SLEEP to TRUE if a sleep is required; otherwise do not
+ * change *TIMESTAMP_SLEEP. This output will be valid even if the
+ * function returns an error.
+ *
+ * Perform all allocations in POOL.
+ */
static svn_error_t *
-try_copy(const apr_array_header_t *sources,
+try_copy(svn_boolean_t *timestamp_sleep,
+ const apr_array_header_t *sources,
const char *dst_path_in,
svn_boolean_t is_move,
svn_boolean_t allow_mixed_revisions,
@@ -2193,7 +2214,8 @@ try_copy(const apr_array_header_t *sourc
/* Copy or move all targets. */
if (is_move)
- return svn_error_trace(do_wc_to_wc_moves(copy_pairs, dst_path_in,
+ return svn_error_trace(do_wc_to_wc_moves(timestamp_sleep,
+ copy_pairs, dst_path_in,
allow_mixed_revisions,
metadata_only,
ctx, pool));
@@ -2201,7 +2223,8 @@ try_copy(const apr_array_header_t *sourc
{
/* We ignore these values, so assert the default value */
SVN_ERR_ASSERT(allow_mixed_revisions && !metadata_only);
- return svn_error_trace(do_wc_to_wc_copies(copy_pairs, ctx, pool));
+ return svn_error_trace(do_wc_to_wc_copies(timestamp_sleep,
+ copy_pairs, ctx, pool));
}
}
else if ((! srcs_are_urls) && (dst_is_url))
@@ -2213,7 +2236,8 @@ try_copy(const apr_array_header_t *sourc
else if ((srcs_are_urls) && (! dst_is_url))
{
return svn_error_trace(
- repos_to_wc_copy(copy_pairs, make_parents, ignore_externals,
+ repos_to_wc_copy(timestamp_sleep,
+ copy_pairs, make_parents, ignore_externals,
ctx, pool));
}
else
@@ -2241,13 +2265,15 @@ svn_client_copy6(const apr_array_header_
apr_pool_t *pool)
{
svn_error_t *err;
+ svn_boolean_t timestamp_sleep = FALSE;
apr_pool_t *subpool = svn_pool_create(pool);
if (sources->nelts > 1 && !copy_as_child)
return svn_error_create(SVN_ERR_CLIENT_MULTIPLE_SOURCES_DISALLOWED,
NULL, NULL);
- err = try_copy(sources, dst_path,
+ err = try_copy(×tamp_sleep,
+ sources, dst_path,
FALSE /* is_move */,
TRUE /* allow_mixed_revisions */,
FALSE /* metadata_only */,
@@ -2275,12 +2301,13 @@ svn_client_copy6(const apr_array_header_
src_basename = src_is_url ? svn_uri_basename(src_path, subpool)
: svn_dirent_basename(src_path, subpool);
+ dst_path
+ = dst_is_url ? svn_path_url_add_component2(dst_path, src_basename,
+ subpool)
+ : svn_dirent_join(dst_path, src_basename, subpool);
- err = try_copy(sources,
- dst_is_url
- ? svn_path_url_add_component2(dst_path, src_basename,
- subpool)
- : svn_dirent_join(dst_path, src_basename, subpool),
+ err = try_copy(×tamp_sleep,
+ sources, dst_path,
FALSE /* is_move */,
TRUE /* allow_mixed_revisions */,
FALSE /* metadata_only */,
@@ -2292,6 +2319,10 @@ svn_client_copy6(const apr_array_header_
subpool);
}
+ /* Sleep if required. DST_PATH is not a URL in these cases. */
+ if (timestamp_sleep)
+ svn_io_sleep_for_timestamps(dst_path, subpool);
+
svn_pool_destroy(subpool);
return svn_error_trace(err);
}
@@ -2313,6 +2344,7 @@ svn_client_move7(const apr_array_header_
const svn_opt_revision_t head_revision
= { svn_opt_revision_head, { 0 } };
svn_error_t *err;
+ svn_boolean_t timestamp_sleep = FALSE;
int i;
apr_pool_t *subpool = svn_pool_create(pool);
apr_array_header_t *sources = apr_array_make(pool, src_paths->nelts,
@@ -2335,7 +2367,8 @@ svn_client_move7(const apr_array_header_
APR_ARRAY_PUSH(sources, svn_client_copy_source_t *) = copy_source;
}
- err = try_copy(sources, dst_path,
+ err = try_copy(×tamp_sleep,
+ sources, dst_path,
TRUE /* is_move */,
allow_mixed_revisions,
metadata_only,
@@ -2362,12 +2395,13 @@ svn_client_move7(const apr_array_header_
src_basename = src_is_url ? svn_uri_basename(src_path, pool)
: svn_dirent_basename(src_path, pool);
+ dst_path
+ = dst_is_url ? svn_path_url_add_component2(dst_path, src_basename,
+ subpool)
+ : svn_dirent_join(dst_path, src_basename, subpool);
- err = try_copy(sources,
- dst_is_url
- ? svn_path_url_add_component2(dst_path,
- src_basename, pool)
- : svn_dirent_join(dst_path, src_basename, pool),
+ err = try_copy(×tamp_sleep,
+ sources, dst_path,
TRUE /* is_move */,
allow_mixed_revisions,
metadata_only,
@@ -2379,6 +2413,10 @@ svn_client_move7(const apr_array_header_
subpool);
}
+ /* Sleep if required. DST_PATH is not a URL in these cases. */
+ if (timestamp_sleep)
+ svn_io_sleep_for_timestamps(dst_path, subpool);
+
svn_pool_destroy(subpool);
return svn_error_trace(err);
}
Modified: subversion/branches/fsfs-format7/subversion/libsvn_client/copy_foreign.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_client/copy_foreign.c?rev=1476675&r1=1476674&r2=1476675&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_client/copy_foreign.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_client/copy_foreign.c Sat Apr 27 21:30:36 2013
@@ -22,7 +22,7 @@
*/
/* ==================================================================== */
-
+
/*** Includes. ***/
#include <string.h>
@@ -428,10 +428,10 @@ copy_foreign_dir(svn_ra_session_t *ra_se
&wrapped_editor, &wrapped_baton,
scratch_pool));
- SVN_ERR(svn_ra_do_update2(ra_session, &reporter, &reporter_baton,
+ SVN_ERR(svn_ra_do_update3(ra_session, &reporter, &reporter_baton,
location->rev, "", svn_depth_infinity,
- FALSE, wrapped_editor, wrapped_baton,
- scratch_pool));
+ FALSE, FALSE, wrapped_editor, wrapped_baton,
+ scratch_pool, scratch_pool));
SVN_ERR(reporter->set_path(reporter_baton, "", location->rev, depth,
TRUE /* incomplete */,
Modified: subversion/branches/fsfs-format7/subversion/libsvn_client/ctx.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_client/ctx.c?rev=1476675&r1=1476674&r2=1476675&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_client/ctx.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_client/ctx.c Sat Apr 27 21:30:36 2013
@@ -82,7 +82,7 @@ svn_client_create_context2(svn_client_ct
apr_pool_t *pool)
{
svn_config_t *cfg_config;
-
+
*ctx = apr_pcalloc(pool, sizeof(svn_client_ctx_t));
(*ctx)->notify_func2 = call_notify_func;
Modified: subversion/branches/fsfs-format7/subversion/libsvn_client/delete.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_client/delete.c?rev=1476675&r1=1476674&r2=1476675&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_client/delete.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_client/delete.c Sat Apr 27 21:30:36 2013
@@ -99,26 +99,23 @@ find_undeletables(void *baton,
return SVN_NO_ERROR;
}
-/* Verify that the path can be deleted without losing stuff,
- i.e. ensure that there are no modified or unversioned resources
- under PATH. This is similar to checking the output of the status
- command. CTX is used for the client's config options. POOL is
- used for all temporary allocations. */
+/* Check whether LOCAL_ABSPATH is an external and raise an error if it is.
+
+ A file external should not be deleted since the file external is
+ implemented as a switched file and it would delete the file the
+ file external is switched to, which is not the behavior the user
+ would probably want.
+
+ A directory external should not be deleted since it is the root
+ of a different working copy. */
static svn_error_t *
-can_delete_node(svn_boolean_t *target_missing,
- const char *local_abspath,
- svn_client_ctx_t *ctx,
- apr_pool_t *scratch_pool)
+check_external(const char *local_abspath,
+ svn_client_ctx_t *ctx,
+ apr_pool_t *scratch_pool)
{
svn_node_kind_t external_kind;
const char *defining_abspath;
- apr_array_header_t *ignores;
- struct can_delete_baton_t cdt;
- /* A file external should not be deleted since the file external is
- implemented as a switched file and it would delete the file the
- file external is switched to, which is not the behavior the user
- would probably want. */
SVN_ERR(svn_wc__read_external_info(&external_kind, &defining_abspath, NULL,
NULL, NULL,
ctx->wc_ctx, local_abspath,
@@ -135,6 +132,22 @@ can_delete_node(svn_boolean_t *target_mi
svn_dirent_local_style(defining_abspath,
scratch_pool));
+ return SVN_NO_ERROR;
+}
+
+/* Verify that the path can be deleted without losing stuff,
+ i.e. ensure that there are no modified or unversioned resources
+ under PATH. This is similar to checking the output of the status
+ command. CTX is used for the client's config options. POOL is
+ used for all temporary allocations. */
+static svn_error_t *
+can_delete_node(svn_boolean_t *target_missing,
+ const char *local_abspath,
+ svn_client_ctx_t *ctx,
+ apr_pool_t *scratch_pool)
+{
+ apr_array_header_t *ignores;
+ struct can_delete_baton_t cdt;
/* Use an infinite-depth status check to see if there's anything in
or under PATH which would make it unsafe for deletion. The
@@ -383,7 +396,7 @@ delete_urls_multi_repos(const apr_array_
svn_uri_split(&base_uri, &target_relpath, base_uri, iterpool);
APR_ARRAY_IDX(target_relpaths, 0, const char *) = target_relpath;
}
-
+
SVN_ERR(svn_ra_reparent(repos_deletables->ra_session, base_uri, pool));
SVN_ERR(single_repos_delete(repos_deletables->ra_session, repos_root,
target_relpaths,
@@ -409,6 +422,8 @@ svn_client__wc_delete(const char *local_
SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
+ SVN_ERR(check_external(local_abspath, ctx, pool));
+
if (!force && !keep_local)
/* Verify that there are no "awkward" files */
SVN_ERR(can_delete_node(&target_missing, local_abspath, ctx, pool));
@@ -444,6 +459,8 @@ svn_client__wc_delete_many(const apr_arr
SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
+ SVN_ERR(check_external(local_abspath, ctx, pool));
+
if (!force && !keep_local)
{
svn_boolean_t missing;
Modified: subversion/branches/fsfs-format7/subversion/libsvn_client/deprecated.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_client/deprecated.c?rev=1476675&r1=1476674&r2=1476675&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_client/deprecated.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_client/deprecated.c Sat Apr 27 21:30:36 2013
@@ -1328,7 +1328,7 @@ list_func_wrapper(void *baton,
struct list_func_wrapper_baton *lfwb = baton;
if (lfwb->list_func1)
- return lfwb->list_func1(lfwb->list_func1_baton, path, dirent,
+ return lfwb->list_func1(lfwb->list_func1_baton, path, dirent,
lock, abs_path, scratch_pool);
return SVN_NO_ERROR;
@@ -1344,7 +1344,7 @@ wrap_list_func(svn_client_list_func2_t *
void *baton,
apr_pool_t *result_pool)
{
- struct list_func_wrapper_baton *lfwb = apr_palloc(result_pool,
+ struct list_func_wrapper_baton *lfwb = apr_palloc(result_pool,
sizeof(*lfwb));
/* Set the user provided old format callback in the baton. */
@@ -1372,8 +1372,8 @@ svn_client_list2(const char *path_or_url
wrap_list_func(&list_func2, &list_func2_baton, list_func, baton, pool);
- return svn_client_list3(path_or_url, peg_revision, revision, depth,
- dirent_fields, fetch_locks,
+ return svn_client_list3(path_or_url, peg_revision, revision, depth,
+ dirent_fields, fetch_locks,
FALSE /* include externals */,
list_func2, list_func2_baton, ctx, pool);
}
Modified: subversion/branches/fsfs-format7/subversion/libsvn_client/diff.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_client/diff.c?rev=1476675&r1=1476674&r2=1476675&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_client/diff.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_client/diff.c Sat Apr 27 21:30:36 2013
@@ -67,7 +67,7 @@
* and WC_CTX, and return the result in *REPOS_RELPATH.
* ORIG_TARGET is the related original target passed to the diff command,
* and may be used to derive leading path components missing from PATH.
- * ANCHOR is the local path where the diff editor is anchored.
+ * ANCHOR is the local path where the diff editor is anchored.
* Do all allocations in POOL. */
static svn_error_t *
make_repos_relpath(const char **repos_relpath,
@@ -183,7 +183,7 @@ adjust_paths_for_diff_labels(const char
not for file URLs. Nor can we just use anchor1 and anchor2
from do_diff(), at least not without some more logic here.
What a nightmare.
-
+
For now, to distinguish the two paths, we'll just put the
unique portions of the original targets in parentheses after
the received path, with ellipses for handwaving. This makes
@@ -692,7 +692,7 @@ diff_dir_props_changed(svn_wc_notify_sta
/* Show differences between TMPFILE1 and TMPFILE2. DIFF_RELPATH, REV1, and
REV2 are used in the headers to indicate the file and revisions. If either
MIMETYPE1 or MIMETYPE2 indicate binary content, don't show a diff,
- but instead print a warning message.
+ but instead print a warning message.
If FORCE_DIFF is TRUE, always write a diff, even for empty diffs.
@@ -954,7 +954,7 @@ diff_file_changed(svn_wc_notify_state_t
if (tmpfile1)
SVN_ERR(diff_content_changed(&wrote_header, diff_relpath,
tmpfile1, tmpfile2, rev1, rev2,
- mimetype1, mimetype2,
+ mimetype1, mimetype2,
svn_diff_op_modified, FALSE,
NULL,
SVN_INVALID_REVNUM, diff_cmd_baton,
@@ -1764,7 +1764,7 @@ diff_repos_repos(const svn_wc_diff_callb
SVN_ERR(svn_client__get_diff_editor2(
&diff_editor, &diff_edit_baton,
extra_ra_session, depth,
- rev1,
+ rev1,
TRUE /* text_deltas */,
diff_processor,
ctx->cancel_func, ctx->cancel_baton,
@@ -1972,7 +1972,7 @@ diff_repos_wc(const char *path_or_url1,
}
SVN_ERR(svn_ra_reparent(ra_session, copyfrom_parent_url, pool));
- /* Tell the RA layer we want a delta to change our txn to URL1 */
+ /* Tell the RA layer we want a delta to change our txn to URL1 */
SVN_ERR(svn_ra_do_diff3(ra_session,
&reporter, &reporter_baton,
rev,
@@ -2008,7 +2008,7 @@ diff_repos_wc(const char *path_or_url1,
}
else
{
- /* Tell the RA layer we want a delta to change our txn to URL1 */
+ /* Tell the RA layer we want a delta to change our txn to URL1 */
SVN_ERR(svn_ra_do_diff3(ra_session,
&reporter, &reporter_baton,
rev,
Modified: subversion/branches/fsfs-format7/subversion/libsvn_client/export.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_client/export.c?rev=1476675&r1=1476674&r2=1476675&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_client/export.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_client/export.c Sat Apr 27 21:30:36 2013
@@ -193,7 +193,7 @@ export_node(void *baton,
svn_stream_t *dst_stream;
const char *dst_tmp;
svn_error_t *err;
-
+
const char *to_abspath = svn_dirent_join(
eib->to_path,
svn_dirent_skip_ancestor(eib->origin_abspath,
@@ -392,10 +392,11 @@ export_node(void *baton,
suffix = "";
}
- SVN_ERR(svn_subst_build_keywords2
- (&kw, keywords->data,
- apr_psprintf(scratch_pool, "%ld%s", changed_rev, suffix),
- url, tm, author, scratch_pool));
+ SVN_ERR(svn_subst_build_keywords3(&kw, keywords->data,
+ apr_psprintf(scratch_pool, "%ld%s",
+ changed_rev, suffix),
+ url, status->repos_root_url, tm,
+ author, scratch_pool));
}
/* For atomicity, we translate to a tmp file and then rename the tmp file
@@ -495,6 +496,7 @@ open_root_internal(const char *path,
struct edit_baton
{
+ const char *repos_root_url;
const char *root_path;
const char *root_url;
svn_boolean_t force;
@@ -541,6 +543,7 @@ struct file_baton
/* Any keyword vals to be substituted */
const char *revision;
const char *url;
+ const char *repos_root_url;
const char *author;
apr_time_t date;
@@ -662,6 +665,7 @@ add_file(const char *path,
fb->edit_baton = eb;
fb->path = full_path;
fb->url = full_url;
+ fb->repos_root_url = eb->repos_root_url;
fb->pool = pool;
*baton = fb;
@@ -827,8 +831,9 @@ close_file(void *file_baton,
}
if (fb->keywords_val)
- SVN_ERR(svn_subst_build_keywords2(&final_kw, fb->keywords_val->data,
- fb->revision, fb->url, fb->date,
+ SVN_ERR(svn_subst_build_keywords3(&final_kw, fb->keywords_val->data,
+ fb->revision, fb->url,
+ fb->repos_root_url, fb->date,
fb->author, pool));
SVN_ERR(svn_subst_copy_and_translate4(fb->tmppath, fb->path,
@@ -898,7 +903,7 @@ get_editor_ev1(const svn_delta_editor_t
apr_pool_t *scratch_pool)
{
svn_delta_editor_t *editor = svn_delta_default_editor(result_pool);
-
+
editor->set_target_revision = set_target_revision;
editor->open_root = open_root;
editor->add_directory = add_directory;
@@ -948,7 +953,7 @@ add_file_ev2(void *baton,
/* Any keyword vals to be substituted */
const char *revision = NULL;
const char *author = NULL;
- apr_time_t date = 0;
+ apr_time_t date = 0;
/* Look at any properties for additional information. */
if ( (val = svn_hash_gets(props, SVN_PROP_EOL_STYLE)) )
@@ -959,14 +964,14 @@ add_file_ev2(void *baton,
if ( (val = svn_hash_gets(props, SVN_PROP_EXECUTABLE)) )
executable_val = val;
-
+
/* Try to fill out the baton's keywords-structure too. */
if ( (val = svn_hash_gets(props, SVN_PROP_ENTRY_COMMITTED_REV)) )
revision = val->data;
if ( (val = svn_hash_gets(props, SVN_PROP_ENTRY_COMMITTED_DATE)) )
SVN_ERR(svn_time_from_cstring(&date, val->data, scratch_pool));
-
+
if ( (val = svn_hash_gets(props, SVN_PROP_ENTRY_LAST_AUTHOR)) )
author = val->data;
@@ -1012,9 +1017,10 @@ add_file_ev2(void *baton,
}
if (keywords_val)
- SVN_ERR(svn_subst_build_keywords2(&final_kw, keywords_val->data,
- revision, full_url, date,
- author, scratch_pool));
+ SVN_ERR(svn_subst_build_keywords3(&final_kw, keywords_val->data,
+ revision, full_url,
+ eb->repos_root_url,
+ date, author, scratch_pool));
/* Writing through a translated stream is more efficient than
reading through one, so we wrap TMP_STREAM and not CONTENTS. */
@@ -1076,7 +1082,7 @@ add_directory_ev2(void *baton,
if ( (val = svn_hash_gets(props, SVN_PROP_EXTERNALS)) )
SVN_ERR(add_externals(eb->externals, full_path, val));
-
+
if (eb->notify_func)
{
svn_wc_notify_t *notify = svn_wc_create_notify(full_path,
@@ -1247,6 +1253,7 @@ export_file(const char *from_path_or_url
fb->path = eb->root_path;
fb->url = eb->root_url;
fb->pool = scratch_pool;
+ fb->repos_root_url = eb->repos_root_url;
/* Copied from apply_textdelta(). */
SVN_ERR(svn_stream_open_unique(&fb->tmp_stream, &fb->tmppath,
@@ -1296,7 +1303,6 @@ export_directory(const char *from_path_o
const svn_delta_editor_t *export_editor;
const svn_ra_reporter3_t *reporter;
void *report_baton;
- svn_boolean_t use_sleep = FALSE;
svn_node_kind_t kind;
if (!ENABLE_EV2_IMPL)
@@ -1307,13 +1313,15 @@ export_directory(const char *from_path_o
scratch_pool, scratch_pool));
/* Manufacture a basic 'report' to the update reporter. */
- SVN_ERR(svn_ra_do_update2(ra_session,
+ SVN_ERR(svn_ra_do_update3(ra_session,
&reporter, &report_baton,
loc->rev,
"", /* no sub-target */
depth,
FALSE, /* don't want copyfrom-args */
- export_editor, edit_baton, scratch_pool));
+ FALSE, /* don't want ignore_ancestry */
+ export_editor, edit_baton,
+ scratch_pool, scratch_pool));
SVN_ERR(reporter->set_path(report_baton, "", loc->rev,
/* Depth is irrelevant, as we're
@@ -1341,17 +1349,14 @@ export_directory(const char *from_path_o
if (! ignore_externals && depth == svn_depth_infinity)
{
- const char *repos_root_url;
const char *to_abspath;
- SVN_ERR(svn_ra_get_repos_root2(ra_session, &repos_root_url,
- scratch_pool));
SVN_ERR(svn_dirent_get_absolute(&to_abspath, to_path, scratch_pool));
SVN_ERR(svn_client__export_externals(eb->externals,
from_path_or_url,
- to_abspath, repos_root_url,
+ to_abspath, eb->repos_root_url,
depth, native_eol,
- ignore_keywords, &use_sleep,
+ ignore_keywords,
ctx, scratch_pool));
}
@@ -1403,6 +1408,7 @@ svn_client_export5(svn_revnum_t *result_
peg_revision,
revision, ctx, pool));
+ SVN_ERR(svn_ra_get_repos_root2(ra_session, &eb->repos_root_url, pool));
eb->root_path = to_path;
eb->root_url = loc->url;
eb->force = overwrite;