Modified: subversion/branches/compressed-pristines/subversion/include/svn_delta.h URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/subversion/include/svn_delta.h?rev=1413258&r1=1413257&r2=1413258&view=diff ============================================================================== --- subversion/branches/compressed-pristines/subversion/include/svn_delta.h (original) +++ subversion/branches/compressed-pristines/subversion/include/svn_delta.h Sat Nov 24 20:29:11 2012 @@ -452,6 +452,20 @@ svn_txdelta_send_txstream(svn_txdelta_st apr_pool_t *pool); +/** Send the @a contents of length @a len as a txdelta against an empty + * source directly to window-handler @a handler/@a handler_baton. + * + * All temporary allocation is performed in @a pool. + * + * @since New in 1.8. + */ +svn_error_t * +svn_txdelta_send_contents(const unsigned char *contents, + apr_size_t len, + svn_txdelta_window_handler_t handler, + void *handler_baton, + apr_pool_t *pool); + /** Prepare to apply a text delta. @a source is a readable generic stream * yielding the source data, @a target is a writable generic stream to * write target data to, and allocation takes place in a sub-pool of @@ -483,6 +497,7 @@ svn_txdelta_apply(svn_stream_t *source, + /*** Producing and consuming svndiff-format text deltas. ***/ /** Prepare to produce an svndiff-format diff from text delta windows. @@ -1309,8 +1324,9 @@ typedef svn_error_t *(*svn_delta_path_dr * Each path in @a paths is a const char *. The editor drive will be * performed in the same order as @a paths. The paths should be sorted * using something like svn_sort_compare_paths to ensure that a depth-first - * pattern is observed for directory/file baton creation. Some callers may - * need further customization of the order (ie. libsvn_delta/compat.c). + * pattern is observed for directory/file baton creation. If @a sort_paths + * is set, the function will sort the paths for you. Some callers may need + * further customization of the order (ie. libsvn_delta/compat.c). * * Use @a scratch_pool for all necessary allocations. * @@ -1320,6 +1336,7 @@ svn_error_t * svn_delta_path_driver2(const svn_delta_editor_t *editor, void *edit_baton, const apr_array_header_t *paths, + svn_boolean_t sort_paths, svn_delta_path_driver_cb_func_t callback_func, void *callback_baton, apr_pool_t *scratch_pool);
Modified: subversion/branches/compressed-pristines/subversion/include/svn_diff.h URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/subversion/include/svn_diff.h?rev=1413258&r1=1413257&r2=1413258&view=diff ============================================================================== --- subversion/branches/compressed-pristines/subversion/include/svn_diff.h (original) +++ subversion/branches/compressed-pristines/subversion/include/svn_diff.h Sat Nov 24 20:29:11 2012 @@ -1063,12 +1063,12 @@ typedef struct svn_patch_t { svn_boolean_t reverse; } svn_patch_t; -/* An opaque type representing an open patch file. +/** An opaque type representing an open patch file. * * @since New in 1.7. */ typedef struct svn_patch_file_t svn_patch_file_t; -/* Open @a patch_file at @a local_abspath. +/** Open @a patch_file at @a local_abspath. * Allocate @a patch_file in @a result_pool. * * @since New in 1.7. */ Modified: subversion/branches/compressed-pristines/subversion/include/svn_error_codes.h URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/subversion/include/svn_error_codes.h?rev=1413258&r1=1413257&r2=1413258&view=diff ============================================================================== --- subversion/branches/compressed-pristines/subversion/include/svn_error_codes.h (original) +++ subversion/branches/compressed-pristines/subversion/include/svn_error_codes.h Sat Nov 24 20:29:11 2012 @@ -540,6 +540,11 @@ SVN_ERROR_START SVN_ERR_WC_CATEGORY_START + 39, "Couldn't open a working copy file because access was denied") + /** @since New in 1.8. */ + SVN_ERRDEF(SVN_ERR_WC_MIXED_REVISIONS, + SVN_ERR_WC_CATEGORY_START + 40, + "Mixed-revision working copy was found but not expected") + /* fs errors */ SVN_ERRDEF(SVN_ERR_FS_GENERAL, @@ -777,6 +782,11 @@ SVN_ERROR_START SVN_ERR_FS_CATEGORY_START + 51, "A packed revprop could not be read") + /** @since New in 1.8. */ + SVN_ERRDEF(SVN_ERR_FS_REPPROP_CACHE_INIT_FAILURE, + SVN_ERR_FS_CATEGORY_START + 52, + "Could not initialize the revprop caching infrastructure.") + /* repos errors */ SVN_ERRDEF(SVN_ERR_REPOS_LOCKED, @@ -1410,6 +1420,11 @@ SVN_ERROR_START SVN_ERR_MISC_CATEGORY_START + 36, "too many memcached servers configured") + /** @since New in 1.8. */ + SVN_ERRDEF(SVN_ERR_MALFORMED_VERSION_STRING, + SVN_ERR_MISC_CATEGORY_START + 37, + "failed to parse version number string") + /* command-line client errors */ SVN_ERRDEF(SVN_ERR_CL_ARG_PARSING_ERROR, Modified: subversion/branches/compressed-pristines/subversion/include/svn_fs.h URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/subversion/include/svn_fs.h?rev=1413258&r1=1413257&r2=1413258&view=diff ============================================================================== --- subversion/branches/compressed-pristines/subversion/include/svn_fs.h (original) +++ subversion/branches/compressed-pristines/subversion/include/svn_fs.h Sat Nov 24 20:29:11 2012 @@ -402,6 +402,24 @@ svn_fs_recover(const char *path, apr_pool_t *pool); +/** + * Take an exclusive lock on @a fs to prevent commits and then invoke + * @a freeze_body passing @a baton. + * + * @note The BDB backend doesn't implement this feature so most + * callers should not call this function directly but should use the + * higher level #svn_repos_freeze instead. + * + * @since New in 1.8. + */ +svn_error_t * +svn_fs_freeze(svn_fs_t *fs, + svn_error_t *(*freeze_body)(void *baton, apr_pool_t *pool), + void *baton, + apr_pool_t *pool); + + + /** Subversion filesystems based on Berkeley DB. * * The following functions are specific to Berkeley DB filesystems. @@ -1957,6 +1975,44 @@ svn_fs_file_contents(svn_stream_t **cont const char *path, apr_pool_t *pool); +/** + * Callback function type that gets presented with a immutable non-NULL + * @a contents of @a len bytes. Further parameters may be passed through + * in @a baton. + * + * Allocations must be made in @a pool. + * + * @since New in 1.8. + */ +typedef svn_error_t * +(*svn_fs_process_contents_func_t)(const unsigned char *contents, + apr_size_t len, + void *baton, + apr_pool_t *pool); + +/** Attempts to efficiently provide the contents of the file @a path in + * @a root. If that succeeds, @a *success will be set to #TRUE and the + * contents will be passed to the the @a processor along with the given + * @a baton. Allocations take place in @a pool. + * + * This function is intended to support zero copy data processing. It may + * not be implemented for all data backends or not applicable for certain + * content. In that case, @a *success will always be #FALSE. Also, this + * is a best-effort function which means there is no guarantee that e.g. + * @a processor gets called at for any content. + * + * @note @a processor is expected to be relatively short function with + * at most O(content size) runtime. + * + * @since New in 1.8. + */ +svn_error_t * +svn_fs_try_process_file_contents(svn_boolean_t *success, + svn_fs_root_t *root, + const char *path, + svn_fs_process_contents_func_t processor, + void* baton, + apr_pool_t *pool); /** Create a new file named @a path in @a root. The file's initial contents * are the empty string, and it has no properties. @a root must be the Modified: subversion/branches/compressed-pristines/subversion/include/svn_io.h URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/subversion/include/svn_io.h?rev=1413258&r1=1413257&r2=1413258&view=diff ============================================================================== --- subversion/branches/compressed-pristines/subversion/include/svn_io.h (original) +++ subversion/branches/compressed-pristines/subversion/include/svn_io.h Sat Nov 24 20:29:11 2012 @@ -610,13 +610,13 @@ svn_io_filesizes_different_p(svn_boolean /** Set @a *different_p12 to non-zero if @a file1 and @a file2 have different * sizes, else set to zero. Do the similar for @a *different_p23 with * @a file2 and @a file3, and @a *different_p13 for @a file1 and @a file3. - * All three of @a file1, @a file2 and @a file3 are utf8-encoded. + * The filenames @a file1, @a file2 and @a file3 are utf8-encoded. * * Setting @a *different_p12 to zero does not mean the files definitely * have the same size, it merely means that the sizes are not * definitely different. That is, if the size of one or both files - * cannot be determined, then the sizes are not known to be different, - * so @a *different_p12 is set to 0. + * cannot be determined (due to stat() returning an error), then the sizes + * are not known to be different, so @a *different_p12 is set to 0. */ svn_error_t * svn_io_filesizes_three_different_p(svn_boolean_t *different_p12, @@ -1155,9 +1155,9 @@ svn_stream_write(svn_stream_t *stream, svn_error_t * svn_stream_close(svn_stream_t *stream); -/** Reset a generic stream back to its origin. E.g. On a file this would be +/** Reset a generic stream back to its origin. (E.g. On a file this would be * implemented as a seek to position 0). This function returns a - * #SVN_ERR_STREAM_RESET_NOT_SUPPORTED error when the stream doesn't + * #SVN_ERR_STREAM_SEEK_NOT_SUPPORTED error when the stream doesn't * implement resetting. * * @since New in 1.7. @@ -2200,9 +2200,9 @@ svn_io_write_version_file(const char *pa int version, apr_pool_t *pool); -/* Read a line of text from a file, up to a specified length. +/** Read a line of text from a file, up to a specified length. * - * Allocate @a *stringbuf in @a result_pool, and read into it one line + * Allocate @a *stringbuf in @a result_pool, and read into it one line * from @a file. Reading stops either after a line-terminator was found * or after @a max_len bytes have been read. * Modified: subversion/branches/compressed-pristines/subversion/include/svn_mergeinfo.h URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/subversion/include/svn_mergeinfo.h?rev=1413258&r1=1413257&r2=1413258&view=diff ============================================================================== --- subversion/branches/compressed-pristines/subversion/include/svn_mergeinfo.h (original) +++ subversion/branches/compressed-pristines/subversion/include/svn_mergeinfo.h Sat Nov 24 20:29:11 2012 @@ -332,6 +332,7 @@ svn_rangelist_merge2(svn_rangelist_t *ra * if called in a loop. * * @since New in 1.5. + * @deprecated Provided for backward compatibility with the 1.7 API. */ SVN_DEPRECATED svn_error_t * Modified: subversion/branches/compressed-pristines/subversion/include/svn_props.h URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/subversion/include/svn_props.h?rev=1413258&r1=1413257&r2=1413258&view=diff ============================================================================== --- subversion/branches/compressed-pristines/subversion/include/svn_props.h (original) +++ subversion/branches/compressed-pristines/subversion/include/svn_props.h Sat Nov 24 20:29:11 2012 @@ -85,6 +85,23 @@ svn_prop_array_dup(const apr_array_heade apr_pool_t *pool); +/** A structure to represent inherited properties. + * + * @since New in 1.8. + */ +typedef struct svn_prop_inherited_item_t +{ + /** The absolute working copy path, relative filesystem path, or URL from + * which the properties in @a prop_hash are inherited. */ + const char *path_or_url; + + /** A hash of (const char *) inherited property names, and (svn_string_t *) + * property values. */ + apr_hash_t *prop_hash; + +} svn_prop_inherited_item_t; + + /** * Given a hash (keys <tt>const char *</tt> and values <tt>const * svn_string_t</tt>) of properties, returns an array of svn_prop_t @@ -367,6 +384,14 @@ svn_prop_name_is_valid(const char *prop_ */ #define SVN_PROP_MERGEINFO SVN_PROP_PREFIX "mergeinfo" +/** Prefix for all Subersion inhertiable properties. */ +#define SVN_PROP_INHERITABLE_PREFIX SVN_PROP_PREFIX "inheritable-" + +/** Property used to record inheritable configuration auto-props. */ +#define SVN_PROP_INHERITABLE_AUTO_PROPS SVN_PROP_INHERITABLE_PREFIX "auto-props" + +/** Property used to record inheritable configuration ignores. */ +#define SVN_PROP_INHERITABLE_IGNORES SVN_PROP_INHERITABLE_PREFIX "ignores" /** Meta-data properties. * @@ -540,6 +565,44 @@ svn_prop_name_is_valid(const char *prop_ /** @} */ +/** + * These are reserved properties attached to a "transaction" object in + * the repository filesystem in advance of the pre-commit hook script + * running on the server, but then automatically removed from the + * transaction before its promotion to a new revision. + * + * @defgroup svn_props_ephemeral_txnprops Ephemeral transaction properties + * @{ + */ + +/** The prefix used for all (ephemeral) transaction properties. */ +#define SVN_PROP_TXN_PREFIX SVN_PROP_PREFIX "txn-" + +/** Identifies the client version compability level. For clients + * compiled against Subversion libraries, this is @c SVN_VER_NUMBER. + * Third-party implementations are advised to use similar formatting + * for values of this property. + */ +#define SVN_PROP_TXN_CLIENT_COMPAT_VERSION \ + SVN_PROP_TXN_PREFIX "client-compat-version" + +/** Identifies the client's user agent string, if any. */ +#define SVN_PROP_TXN_USER_AGENT \ + SVN_PROP_TXN_PREFIX "user-agent" + +/** The prefix reserved for copies of (ephemeral) transaction + * properties designed to outlive the transaction. Administrators may + * choose to, in their pre-commit hook scripts, copy the values of one + * or more properties named @c SVN_PROP_TXN_PREFIX + "something" + * to new properties named @c SVN_PROP_REVISION_PREFIX + "something", + * allowing that information to survive the commit-time removal of + * ephemeral transaction properties. + */ +#define SVN_PROP_REVISION_PREFIX SVN_PROP_PREFIX "revision-" + + +/** @} */ + /** @} */ Modified: subversion/branches/compressed-pristines/subversion/include/svn_ra.h URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/subversion/include/svn_ra.h?rev=1413258&r1=1413257&r2=1413258&view=diff ============================================================================== --- subversion/branches/compressed-pristines/subversion/include/svn_ra.h (original) +++ subversion/branches/compressed-pristines/subversion/include/svn_ra.h Sat Nov 24 20:29:11 2012 @@ -874,12 +874,12 @@ svn_ra_rev_prop(svn_ra_session_t *sessio * or @c SVN_PROP_REVISION_AUTHOR. * * Before @c close_edit returns, but after the commit has succeeded, - * it will invoke @a callback (if non-NULL) with the new revision number, - * the commit date (as a <tt>const char *</tt>), commit author (as a - * <tt>const char *</tt>), and @a callback_baton as arguments. If - * @a callback returns an error, that error will be returned from @c - * close_edit, otherwise @c close_edit will return successfully - * (unless it encountered an error before invoking @a callback). + * it will invoke @a commit_callback (if non-NULL) with filled-in + * #svn_commit_info_t *, @a commit_baton, and @a pool or some subpool + * thereof as arguments. If @a commit_callback returns an error, that error + * will be returned from @c * close_edit, otherwise @c close_edit will return + * successfully (unless it encountered an error before invoking + * @a commit_callback). * * The callback will not be called if the commit was a no-op * (i.e. nothing was committed); @@ -905,8 +905,8 @@ svn_ra_get_commit_editor3(svn_ra_session const svn_delta_editor_t **editor, void **edit_baton, apr_hash_t *revprop_table, - svn_commit_callback2_t callback, - void *callback_baton, + svn_commit_callback2_t commit_callback, + void *commit_baton, apr_hash_t *lock_tokens, svn_boolean_t keep_locks, apr_pool_t *pool); @@ -926,8 +926,8 @@ svn_ra_get_commit_editor2(svn_ra_session const svn_delta_editor_t **editor, void **edit_baton, const char *log_msg, - svn_commit_callback2_t callback, - void *callback_baton, + svn_commit_callback2_t commit_callback, + void *commit_baton, apr_hash_t *lock_tokens, svn_boolean_t keep_locks, apr_pool_t *pool); @@ -1922,6 +1922,28 @@ svn_ra_get_deleted_rev(svn_ra_session_t apr_pool_t *pool); /** + * Set @a *inherited_props to a depth-first ordered array of + * #svn_prop_inherited_item_t * structures representing the properties + * inherited by @a path at @a revision (or the 'head' revision if + * @a revision is @c SVN_INVALID_REVNUM). Interpret @a path relative to + * the URL in @a session. Use @a pool for all allocations. If no + * inheritable properties are found, then set @a *inherited_props to + * an empty array. + * + * Allocated @a *inherited_props in @a result_pool, use @a scratch_pool + * for temporary allocations. + * + * @since New in 1.8. + */ +svn_error_t * +svn_ra_get_inherited_props(svn_ra_session_t *session, + apr_array_header_t **inherited_props, + const char *path, + svn_revnum_t revision, + apr_pool_t *result_pool, + apr_pool_t *scratch_pool); + +/** * @defgroup Capabilities Dynamically query the server's capabilities. * * @{ @@ -1993,6 +2015,21 @@ svn_ra_has_capability(svn_ra_session_t * */ #define SVN_RA_CAPABILITY_ATOMIC_REVPROPS "atomic-revprops" +/** + * The capability to get inherited properties. + * + * @since New in 1.8. + */ +#define SVN_RA_CAPABILITY_INHERITED_PROPS "inherited-props" + +/** + * The capability of a server to automatically remove transaction + * properties prefixed with SVN_PROP_EPHEMERAL_PREFIX. + * + * @since New in 1.8. + */ +#define SVN_RA_CAPABILITY_EPHEMERAL_TXNPROPS "ephemeral-txnprops" + /* *** PLEASE READ THIS IF YOU ADD A NEW CAPABILITY *** * * RA layers generally fetch all capabilities when asked about any Modified: subversion/branches/compressed-pristines/subversion/include/svn_ra_svn.h URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/subversion/include/svn_ra_svn.h?rev=1413258&r1=1413257&r2=1413258&view=diff ============================================================================== --- subversion/branches/compressed-pristines/subversion/include/svn_ra_svn.h (original) +++ subversion/branches/compressed-pristines/subversion/include/svn_ra_svn.h Sat Nov 24 20:29:11 2012 @@ -62,6 +62,10 @@ extern "C" { #define SVN_RA_SVN_CAP_PARTIAL_REPLAY "partial-replay" /* maps to SVN_RA_CAPABILITY_ATOMIC_REVPROPS */ #define SVN_RA_SVN_CAP_ATOMIC_REVPROPS "atomic-revprops" +/* maps to SVN_RA_CAPABILITY_INHERITED_PROPERTIES: */ +#define SVN_RA_SVN_CAP_INHERITED_PROPS "inherited-props" +/* maps to SVN_RA_CAPABILITY_EPHEMERAL_TXNPROPS */ +#define SVN_RA_SVN_CAP_EPHEMERAL_TXNPROPS "ephemeral-txnprops" /** ra_svn passes @c svn_dirent_t fields over the wire as a list of * words, these are the values used to represent each field. @@ -158,6 +162,66 @@ 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; + +/** * Set the shim callbacks to be used by @a conn to @a shim_callbacks. * * @note This is a private API, external consumers should not use it. @@ -170,10 +234,32 @@ svn_ra_svn__set_shim_callbacks(svn_ra_sv * input/output files. * * Either @a sock or @a in_file/@a out_file must be set, not both. - * Specify the desired network data compression level (zlib) from - * 0 (no compression) to 9 (best but slowest). + * @a compression_level specifies the desired network data compression + * level (zlib) from 0 (no compression) to 9 (best but slowest). + * + * To reduce the overhead of checking for cancellation requests from the + * data receiver, set @a error_check_interval to some non-zero value. + * It defines the number of bytes that must have been sent since the last + * check before the next check will be made. + * + * Allocate the result in @a pool. + * + * @since New in 1.8 + */ +svn_ra_svn_conn_t *svn_ra_svn_create_conn3(apr_socket_t *sock, + apr_file_t *in_file, + apr_file_t *out_file, + int compression_level, + apr_size_t zero_copy_limit, + apr_size_t error_check_interval, + apr_pool_t *pool); + +/** Similar to svn_ra_svn_create_conn3() but disables the zero copy code + * path and sets the error checking interval to 0. * * @since New in 1.7. + * + * @deprecated Provided for backward compatibility with the 1.7 API. */ svn_ra_svn_conn_t * svn_ra_svn_create_conn2(apr_socket_t *sock, @@ -182,7 +268,7 @@ svn_ra_svn_create_conn2(apr_socket_t *so int compression_level, apr_pool_t *pool); -/** Similar to svn_ra_svn_create_conn2() but uses default +/** Similar to svn_ra_svn_create_conn2() but uses the default * compression level (#SVN_DELTA_COMPRESSION_LEVEL_DEFAULT) for network * transmissions. * @@ -219,6 +305,13 @@ svn_ra_svn_has_capability(svn_ra_svn_con int svn_ra_svn_compression_level(svn_ra_svn_conn_t *conn); +/** Return the zero-copy data block limit to use for network transmissions + * + * @since New in 1.8. + */ +apr_size_t +svn_ra_svn_zero_copy_limit(svn_ra_svn_conn_t *conn); + /** Returns the remote address of the connection as a string, if known, * or NULL if inapplicable. */ const char * @@ -448,13 +541,28 @@ svn_ra_svn_handle_commands(svn_ra_svn_co /** Write a command over the network, using the same format string notation * as svn_ra_svn_write_tuple(). + * + * @deprecated Provided for backward compatibility with the 1.7 API. + * Use svn_ra_svn_write_templated_cmd instead. */ +SVN_DEPRECATED svn_error_t * svn_ra_svn_write_cmd(svn_ra_svn_conn_t *conn, apr_pool_t *pool, 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 Modified: subversion/branches/compressed-pristines/subversion/include/svn_repos.h URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/subversion/include/svn_repos.h?rev=1413258&r1=1413257&r2=1413258&view=diff ============================================================================== --- subversion/branches/compressed-pristines/subversion/include/svn_repos.h (original) +++ subversion/branches/compressed-pristines/subversion/include/svn_repos.h Sat Nov 24 20:29:11 2012 @@ -653,6 +653,20 @@ svn_error_t * svn_repos_recover(const char *path, apr_pool_t *pool); +/** + * Take an exclusive lock on @a path to prevent commits and then + * invoke @a freeze_body passing @a baton. The repository may be + * readable by Subversion while frozen, or it may be unreadable, + * depending on which FS backend the repository uses. + * + * @since New in 1.8. + */ +svn_error_t * +svn_repos_freeze(const char *path, + svn_error_t *(*freeze_body)(void *baton, apr_pool_t *pool), + void *baton, + apr_pool_t *pool); + /** This function is a wrapper around svn_fs_berkeley_logfiles(), * returning log file paths relative to the root of the repository. * @@ -764,16 +778,25 @@ const char * svn_repos_post_unlock_hook(svn_repos_t *repos, apr_pool_t *pool); -/** Set the environment that @a repos's hooks will inherit to @a hooks_env, - * a hash table where keys and values represent names and values of environment - * variables. @a hooks_env must live at least as long as @a repos. +/** Set the environment that @a repos's hooks will inherit. + * The environment is specified in a file at @a hooks_env_path. + * If @a hooks_env_path is @c NULL, the file is searched at its + * default location in the repository. If @a hooks_env_path is + * not absolute, it specifies a path relative to the parent of + * the file's default location in the repository. + * + * The @a result_pool should be the same pool that @a repos was allocated in. + * The @a scratch_pool is used for temporary allocations. * - * If this function is not called, hooks will run in an empty environment. + * If this function is not called, or if the file does not list any + * environment variables, hooks will run in an empty environment. * * @since New in 1.8. */ -void +svn_error_t * svn_repos_hooks_setenv(svn_repos_t *repos, - apr_hash_t *hooks_env); + const char *hooks_env_path, + apr_pool_t *result_pool, + apr_pool_t *scratch_pool); /** @} */ @@ -819,6 +842,13 @@ svn_repos_hooks_setenv(svn_repos_t *repo * avoid sending data through @a editor/@a edit_baton which is not * authorized for transmission. * + * @a zero_copy_limit controls up to which size in bytes data blocks may + * be sent using the zero-copy code path. On that path, a number of + * in-memory copy operations have been eliminated to maximize throughput. + * However, until the whole block has been pushed to the network stack, + * other clients may get blocked. Thus, be careful when using larger + * values here. 0 disables the optimization. + * * All allocation for the context and collected state will occur in * @a pool. * @@ -851,7 +881,33 @@ svn_repos_hooks_setenv(svn_repos_t *repo * than or equal to the depth of the working copy, then the editor * operations will affect only paths at or above @a depth. * + * @since New in 1.8. + */ +svn_error_t * +svn_repos_begin_report3(void **report_baton, + svn_revnum_t revnum, + svn_repos_t *repos, + const char *fs_base, + const char *target, + const char *tgt_path, + svn_boolean_t text_deltas, + svn_depth_t depth, + svn_boolean_t ignore_ancestry, + svn_boolean_t send_copyfrom_args, + const svn_delta_editor_t *editor, + void *edit_baton, + svn_repos_authz_func_t authz_read_func, + void *authz_read_baton, + apr_size_t zero_copy_limit, + apr_pool_t *pool); + +/** + * The same as svn_repos_begin_report3(), but setting the @a zero_copy_limit + * to 0. + * * @since New in 1.5. + * + * @deprecated Provided for backward compatibility with the 1.7 API. */ svn_error_t * svn_repos_begin_report2(void **report_baton, @@ -903,7 +959,7 @@ svn_repos_begin_report(void **report_bat /** - * Given a @a report_baton constructed by svn_repos_begin_report2(), + * Given a @a report_baton constructed by svn_repos_begin_report3(), * record the presence of @a path, at @a revision with depth @a depth, * in the current tree. * @@ -974,7 +1030,7 @@ svn_repos_set_path(void *report_baton, apr_pool_t *pool); /** - * Given a @a report_baton constructed by svn_repos_begin_report2(), + * Given a @a report_baton constructed by svn_repos_begin_report3(), * record the presence of @a path in the current tree, containing the contents * of @a link_path at @a revision with depth @a depth. * @@ -1040,7 +1096,7 @@ svn_repos_link_path(void *report_baton, svn_boolean_t start_empty, apr_pool_t *pool); -/** Given a @a report_baton constructed by svn_repos_begin_report2(), +/** Given a @a report_baton constructed by svn_repos_begin_report3(), * record the non-existence of @a path in the current tree. * * @a path may not be underneath a path on which svn_repos_set_path3() @@ -1056,7 +1112,7 @@ svn_repos_delete_path(void *report_baton const char *path, apr_pool_t *pool); -/** Given a @a report_baton constructed by svn_repos_begin_report2(), +/** Given a @a report_baton constructed by svn_repos_begin_report3(), * finish the report and drive the editor as specified when the report * baton was constructed. * @@ -1073,7 +1129,7 @@ svn_repos_finish_report(void *report_bat apr_pool_t *pool); -/** Given a @a report_baton constructed by svn_repos_begin_report2(), +/** Given a @a report_baton constructed by svn_repos_begin_report3(), * abort the report. This function can be called anytime before * svn_repos_finish_report() is called. * @@ -1147,7 +1203,7 @@ svn_repos_abort_report(void *report_bato * the total size of the delta. * * ### svn_repos_dir_delta2 is mostly superseded by the reporter - * ### functionality (svn_repos_begin_report2 and friends). + * ### functionality (svn_repos_begin_report3 and friends). * ### svn_repos_dir_delta2 does allow the roots to be transaction * ### roots rather than just revision roots, and it has the * ### entry_props flag. Almost all of Subversion's own code uses the @@ -1284,14 +1340,14 @@ svn_repos_replay(svn_fs_root_t *root, * * Calling @a (*editor)->close_edit completes the commit. * - * If @a callback is non-NULL, then before @c close_edit returns (but + * If @a commit_callback is non-NULL, then before @c close_edit returns (but * after the commit has succeeded) @c close_edit will invoke - * @a callback with a filled-in #svn_commit_info_t *, @a callback_baton, - * and @a pool or some subpool thereof as arguments. If @a callback + * @a commit_callback with a filled-in #svn_commit_info_t *, @a commit_baton, + * and @a pool or some subpool thereof as arguments. If @a commit_callback * returns an error, that error will be returned from @c close_edit, * otherwise if there was a post-commit hook failure, then that error * will be returned with code SVN_ERR_REPOS_POST_COMMIT_HOOK_FAILED. - * (Note that prior to Subversion 1.6, @a callback cannot be NULL; if + * (Note that prior to Subversion 1.6, @a commit_callback cannot be NULL; if * you don't need a callback, pass a dummy function.) * * Calling @a (*editor)->abort_edit aborts the commit, and will also @@ -1312,8 +1368,8 @@ svn_repos_get_commit_editor5(const svn_d const char *repos_url, const char *base_path, apr_hash_t *revprop_table, - svn_commit_callback2_t callback, - void *callback_baton, + svn_commit_callback2_t commit_callback, + void *commit_baton, svn_repos_authz_callback_t authz_callback, void *authz_baton, apr_pool_t *pool); @@ -1338,8 +1394,8 @@ svn_repos_get_commit_editor4(const svn_d const char *base_path, const char *user, const char *log_msg, - svn_commit_callback2_t callback, - void *callback_baton, + svn_commit_callback2_t commit_callback, + void *commit_baton, svn_repos_authz_callback_t authz_callback, void *authz_baton, apr_pool_t *pool); @@ -2293,7 +2349,7 @@ svn_repos_fs_change_txn_props(svn_fs_txn * @{ * * As it turns out, the svn_repos_replay2(), svn_repos_dir_delta2() and - * svn_repos_begin_report2() interfaces can be extremely useful for + * svn_repos_begin_report3() interfaces can be extremely useful for * examining the repository, or more exactly, changes to the repository. * These drivers allows for differences between two trees to be * described using an editor. @@ -2346,7 +2402,7 @@ typedef struct svn_repos_node_t * repos's filesystem. * * The editor can also be driven by svn_repos_dir_delta2() or - * svn_repos_begin_report2(), but unless you have special needs, + * svn_repos_begin_report3(), but unless you have special needs, * svn_repos_replay2() is preferred. * * Invoke svn_repos_node_from_baton() on @a edit_baton to obtain the root @@ -3219,6 +3275,31 @@ svn_repos_check_revision_access(svn_repo void *authz_read_baton, apr_pool_t *pool); +/** + * Set @a *inherited_values to a depth-first ordered array of + * #svn_prop_inherited_item_t * structures (the path_or_url members of + * which are relative filesystem paths) representing the properties + * inherited by @a path in @a root. If no properties are inherited, + * then set @a *inherited_values to an empty array. + * + * If optional @a authz_read_func is non-NULL, then use this function + * (along with optional @a authz_read_baton) to check the readability + * of each parent path from which properties are inherited. Silently omit + * properties for unreadable parent paths. + * + * Allocate @a *inherited_props in @a result_pool. Use @a scratch_pool for + * temporary allocations. + * + * @since New in 1.8. + */ +svn_error_t * +svn_repos_fs_get_inherited_props(apr_array_header_t **inherited_props, + svn_fs_root_t *root, + const char *path, + svn_repos_authz_func_t authz_read_func, + void *authz_read_baton, + apr_pool_t *result_pool, + apr_pool_t *scratch_pool); /** Capabilities **/ Modified: subversion/branches/compressed-pristines/subversion/include/svn_string.h URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/subversion/include/svn_string.h?rev=1413258&r1=1413257&r2=1413258&view=diff ============================================================================== --- subversion/branches/compressed-pristines/subversion/include/svn_string.h (original) +++ subversion/branches/compressed-pristines/subversion/include/svn_string.h Sat Nov 24 20:29:11 2012 @@ -307,6 +307,45 @@ void svn_stringbuf_appendcstr(svn_stringbuf_t *targetstr, const char *cstr); +/** Read @a count bytes from @a bytes and insert them into @a str at + * position @a pos and following. The resulting string will be + * @c count+str->len bytes long. If @c pos is larger or equal to the + * number of bytes currently used in @a str, simply append @a bytes. + * + * Reallocs if necessary. @a str is affected, nothing else is. + * + * @note The inserted string may be a sub-range if @a str. + */ +void +svn_stringbuf_insert(svn_stringbuf_t *str, + apr_size_t pos, + const char *bytes, + apr_size_t count); + +/** Removes @a count bytes from @a str, starting at position @a pos. + * If that range exceeds the current string data, @a str gets truncated + * at @a pos. If the latter is larger or equal to @c str->pos, this will + * be a no-op. Otherwise, the resulting string will be @c str->len-count + * bytes long. + */ +void +svn_stringbuf_remove(svn_stringbuf_t *str, + apr_size_t pos, + apr_size_t count); + +/** Faster but functionally equivalent to the following sequence: + * @code + * svn_stringbuf_remove(str, pos, old_count); + * svn_stringbuf_insert(str, pos, bytes, new_count); + * @endcode + */ +void +svn_stringbuf_replace(svn_stringbuf_t *str, + apr_size_t pos, + apr_size_t old_count, + const char *bytes, + apr_size_t new_count); + /** Return a duplicate of @a original_string. */ svn_stringbuf_t * svn_stringbuf_dup(const svn_stringbuf_t *original_string, apr_pool_t *pool); Modified: subversion/branches/compressed-pristines/subversion/include/svn_types.h URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/subversion/include/svn_types.h?rev=1413258&r1=1413257&r2=1413258&view=diff ============================================================================== --- subversion/branches/compressed-pristines/subversion/include/svn_types.h (original) +++ subversion/branches/compressed-pristines/subversion/include/svn_types.h Sat Nov 24 20:29:11 2012 @@ -509,7 +509,7 @@ svn_depth_to_word(svn_depth_t depth); svn_depth_t svn_depth_from_word(const char *word); -/* Return #svn_depth_infinity if boolean @a recurse is TRUE, else +/** Return #svn_depth_infinity if boolean @a recurse is TRUE, else * return #svn_depth_files. * * @note New code should never need to use this, it is called only @@ -520,7 +520,7 @@ svn_depth_from_word(const char *word); #define SVN_DEPTH_INFINITY_OR_FILES(recurse) \ ((recurse) ? svn_depth_infinity : svn_depth_files) -/* Return #svn_depth_infinity if boolean @a recurse is TRUE, else +/** Return #svn_depth_infinity if boolean @a recurse is TRUE, else * return #svn_depth_immediates. * * @note New code should never need to use this, it is called only @@ -531,7 +531,7 @@ svn_depth_from_word(const char *word); #define SVN_DEPTH_INFINITY_OR_IMMEDIATES(recurse) \ ((recurse) ? svn_depth_infinity : svn_depth_immediates) -/* Return #svn_depth_infinity if boolean @a recurse is TRUE, else +/** Return #svn_depth_infinity if boolean @a recurse is TRUE, else * return #svn_depth_empty. * * @note New code should never need to use this, it is called only @@ -542,7 +542,7 @@ svn_depth_from_word(const char *word); #define SVN_DEPTH_INFINITY_OR_EMPTY(recurse) \ ((recurse) ? svn_depth_infinity : svn_depth_empty) -/* Return a recursion boolean based on @a depth. +/** Return a recursion boolean based on @a depth. * * Although much code has been converted to use depth, some code still * takes a recurse boolean. In most cases, it makes sense to treat @@ -1261,7 +1261,7 @@ svn_location_segment_dup(const svn_locat */ typedef unsigned long svn_linenum_t; -/* The maximum value of an svn_linenum_t. +/** The maximum value of an svn_linenum_t. * * @since New in 1.7. */ Modified: subversion/branches/compressed-pristines/subversion/include/svn_version.h URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/subversion/include/svn_version.h?rev=1413258&r1=1413257&r2=1413258&view=diff ============================================================================== --- subversion/branches/compressed-pristines/subversion/include/svn_version.h (original) +++ subversion/branches/compressed-pristines/subversion/include/svn_version.h Sat Nov 24 20:29:11 2012 @@ -34,6 +34,7 @@ #ifndef APR_STRINGIFY #include <apr_general.h> #endif +#include <apr_tables.h> #include "svn_types.h" @@ -256,6 +257,153 @@ const svn_version_t * svn_subr_version(void); +/** + * Extended version infomation, including info about the running system. + * + * @since New in 1.8. + */ +typedef struct svn_version_extended_t svn_version_extended_t; + +/** + * Return version information for the running program. If @a verbose + * is true, collect extra information that may be expensive to + * retrieve (for example, the OS release name, list of shared + * libraries, etc.). Use @a pool for all allocations. + * + * @since New in 1.8. + */ +const svn_version_extended_t * +svn_version_extended(svn_boolean_t verbose, + apr_pool_t *pool); + + +/** + * Accessor for svn_version_extended_t. + * + * @return The date when the libsvn_subr library was compiled, in the + * format defined by the C standard macro @c __DATE__. + * + * @since New in 1.8. + */ +const char * +svn_version_ext_build_date(const svn_version_extended_t *ext_info); + +/** + * Accessor for svn_version_extended_t. + * + * @return The time when the libsvn_subr library was compiled, in the + * format defined by the C standard macro @c __TIME__. + * + * @since New in 1.8. + */ +const char * +svn_version_ext_build_time(const svn_version_extended_t *ext_info); + +/** + * Accessor for svn_version_extended_t. + * + * @return The canonical host triplet (arch-vendor-osname) of the + * system where libsvn_subr was compiled. + * + * @note On Unix-like systems (includng Mac OS X), this string is the + * same as the output of the config.guess script. + * + * @since New in 1.8. + */ +const char * +svn_version_ext_build_host(const svn_version_extended_t *ext_info); + +/** + * Accessor for svn_version_extended_t. + * + * @return The localized copyright notice. + * + * @since New in 1.8. + */ +const char * +svn_version_ext_copyright(const svn_version_extended_t *ext_info); + +/** + * Accessor for svn_version_extended_t. + * + * @return The canonical host triplet (arch-vendor-osname) of the + * system where the current process is running. + * + * @note This string may not be the same as the output of config.guess + * on the same system. + * + * @since New in 1.8. + */ +const char * +svn_version_ext_runtime_host(const svn_version_extended_t *ext_info); + +/** + * Accessor for svn_version_extended_t. + * + * @return The "commercial" release name of the running operating + * system, if available. Not to be confused with, e.g., the output of + * "uname -v" or "uname -r". The returned value may be @c NULL. + * + * @since New in 1.8. + */ +const char * +svn_version_ext_runtime_osname(const svn_version_extended_t *ext_info); + +/** + * Dependent library information. + * Describes the name and versions of known dependencies + * used by libsvn_subr. + * + * @since New in 1.8. + */ +typedef struct svn_version_ext_linked_lib_t +{ + const char *name; /**< Library name */ + const char *compiled_version; /**< Compile-time version string */ + const char *runtime_version; /**< Run-time version string (optional) */ +} svn_version_ext_linked_lib_t; + +/** + * Accessor for svn_version_extended_t. + * + * @return Array of svn_version_ext_linked_lib_t describing dependent + * libraries. The returned value may be @c NULL. + * + * @since New in 1.8. + */ +const apr_array_header_t * +svn_version_ext_linked_libs(const svn_version_extended_t *ext_info); + + +/** + * Loaded shared library information. + * Describes the name and, where available, version of the shared libraries + * loaded by the running program. + * + * @since New in 1.8. + */ +typedef struct svn_version_ext_loaded_lib_t +{ + const char *name; /**< Library name */ + const char *version; /**< Library version (optional) */ +} svn_version_ext_loaded_lib_t; + + +/** + * Accessor for svn_version_extended_t. + * + * @return Array of svn_version_ext_loaded_lib_t describing loaded + * shared libraries. The returned value may be @c NULL. + * + * @note On Mac OS X, the loaded frameworks, private frameworks and + * system libraries will not be listed. + * + * @since New in 1.8. + */ +const apr_array_header_t * +svn_version_ext_loaded_libs(const svn_version_extended_t *ext_info); + + #ifdef __cplusplus } #endif /* __cplusplus */ Modified: subversion/branches/compressed-pristines/subversion/include/svn_wc.h URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/subversion/include/svn_wc.h?rev=1413258&r1=1413257&r2=1413258&view=diff ============================================================================== --- subversion/branches/compressed-pristines/subversion/include/svn_wc.h (original) +++ subversion/branches/compressed-pristines/subversion/include/svn_wc.h Sat Nov 24 20:29:11 2012 @@ -828,7 +828,7 @@ svn_error_t * svn_wc_external_item2_create(svn_wc_external_item2_t **item, apr_pool_t *pool); -/* Same as svn_wc_external_item2_create() except the pointer to the new +/** Same as svn_wc_external_item2_create() except the pointer to the new * empty item is 'const' which is stupid since the next thing you need to do * is fill in its fields. * @@ -1142,7 +1142,7 @@ typedef enum svn_wc_notify_action_t /** The mergeinfo on path was updated. @since New in 1.7. */ svn_wc_notify_merge_record_info, - /** An working copy directory was upgraded to the latest format + /** A working copy directory was upgraded to the latest format. * @since New in 1.7. */ svn_wc_notify_upgraded_path, @@ -1593,10 +1593,6 @@ typedef enum svn_wc_conflict_reason_t svn_wc_conflict_reason_replaced, /** Object is moved away. @since New in 1.8. */ svn_wc_conflict_reason_moved_away, - /** Object is moved away and was edited post-move. @since New in 1.8. */ - /* ### Do we really need this. The edit state is on a different node, - which might just change while the tree conflict exists? */ - svn_wc_conflict_reason_moved_away_and_edited, /** Object is moved here. @since New in 1.8. */ svn_wc_conflict_reason_moved_here @@ -1954,7 +1950,7 @@ svn_wc_conflict_description_create_text( * * Set the @c local_abspath field of the created struct to @a local_abspath * (which must be an absolute path), the @c kind field - * to #svn_wc_conflict_kind_prop, the @c node_kind to @a node_kind, and + * to #svn_wc_conflict_kind_property, the @c node_kind to @a node_kind, and * the @c property_name to @a property_name. * * @note: It is the caller's responsibility to set the other required fields @@ -3729,7 +3725,7 @@ typedef struct svn_wc_status3_t * @since New in 1.8. */ const char *moved_to_abspath; - /* TRUE iff the item is a file brought in by an svn:externals definition. + /** TRUE iff the item is a file brought in by an svn:externals definition. * @since New in 1.8. */ svn_boolean_t file_external; @@ -3855,7 +3851,7 @@ typedef struct svn_wc_status2_t /** - * Same as #svn_wc_status2_t, but without the #svn_lock_t 'repos_lock' field. + * Same as #svn_wc_status2_t, but without the #svn_lock_t 'repos_lock', const char 'url', #svn_revnum_t 'ood_last_cmt_rev', apr_time_t 'ood_last_cmt_date', #svn_node_kind_t 'ood_kind', const char 'ood_last_cmt_author', #svn_wc_conflict_description_t 'tree_conflict', #svn_boolean_t 'file_external', #svn_wc_status_kind 'pristine_text_status', and #svn_wc_status_kind 'pristine_prop_status' fields. * * @deprecated Provided for backward compatibility with the 1.1 API. */ @@ -3993,11 +3989,6 @@ svn_wc_status(svn_wc_status_t **status, * * @a scratch_pool will be cleared between invocations to the callback. * - * ### we might be revamping the status infrastructure, and this callback - * ### could totally disappear by the end of 1.7 development. however, we - * ### need to mark the STATUS parameter as "const" so that it is easier - * ### to reason about who/what can modify those structures. - * * @since New in 1.7. */ typedef svn_error_t *(*svn_wc_status_func4_t)(void *baton, @@ -4414,6 +4405,8 @@ svn_wc_copy(const char *src, * Use @a scratch_pool for temporary allocations. * * @since New in 1.7. + * @deprecated Provided for backward compatibility with the 1.7 API. + * @see svn_client_move7() */ svn_error_t * svn_wc_move(svn_wc_context_t *wc_ctx, @@ -7062,7 +7055,7 @@ typedef svn_error_t * (*svn_wc_upgrade_g * (typically #SVN_ERR_CANCELLED), return that error immediately. * * For each directory converted, @a notify_func will be called with - * in @a notify_baton action #svn_wc_notify_upgrade_path and as path + * in @a notify_baton action #svn_wc_notify_upgraded_path and as path * the path of the upgraded directory. @a notify_func may be @c NULL * if this notification is not needed. * @@ -7848,7 +7841,8 @@ svn_wc_set_changelist(const char *path, /** - * The callback type used by svn_client_get_changelists(). + * The callback type used by svn_wc_get_changelists() and + * svn_client_get_changelists(). * * On each invocation, @a path is a newly discovered member of the * changelist, and @a baton is a private function closure. @@ -7861,7 +7855,10 @@ typedef svn_error_t *(*svn_changelist_re apr_pool_t *pool); -/* @since New in 1.7. +/** + * ### TODO: Doc string, please. + * + * @since New in 1.7. */ svn_error_t * svn_wc_get_changelists(svn_wc_context_t *wc_ctx, Modified: subversion/branches/compressed-pristines/subversion/include/svn_xml.h URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/subversion/include/svn_xml.h?rev=1413258&r1=1413257&r2=1413258&view=diff ============================================================================== --- subversion/branches/compressed-pristines/subversion/include/svn_xml.h (original) +++ subversion/branches/compressed-pristines/subversion/include/svn_xml.h Sat Nov 24 20:29:11 2012 @@ -297,7 +297,10 @@ svn_xml_make_header2(svn_stringbuf_t **s const char *encoding, apr_pool_t *pool); -/* Like svn_xml_make_header2, but does not emit encoding information. */ +/** Like svn_xml_make_header2(), but does not emit encoding information. + * + * @deprecated Provided for backward compatibility with the 1.6 API. + */ SVN_DEPRECATED void svn_xml_make_header(svn_stringbuf_t **str, Modified: subversion/branches/compressed-pristines/subversion/libsvn_auth_gnome_keyring/gnome_keyring.c URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/subversion/libsvn_auth_gnome_keyring/gnome_keyring.c?rev=1413258&r1=1413257&r2=1413258&view=diff ============================================================================== --- subversion/branches/compressed-pristines/subversion/libsvn_auth_gnome_keyring/gnome_keyring.c (original) +++ subversion/branches/compressed-pristines/subversion/libsvn_auth_gnome_keyring/gnome_keyring.c Sat Nov 24 20:29:11 2012 @@ -28,6 +28,7 @@ /*** Includes. ***/ #include <apr_pools.h> +#include <apr_strings.h> #include "svn_auth.h" #include "svn_config.h" #include "svn_error.h" @@ -38,7 +39,6 @@ #include "svn_private_config.h" #include <glib.h> -#include <dbus/dbus.h> #include <gnome-keyring.h> @@ -138,9 +138,9 @@ callback_default_keyring(GnomeKeyringRes return; } -/* Returns the default keyring name. */ +/* Returns the default keyring name, allocated in RESULT_POOL. */ static char* -get_default_keyring_name(apr_pool_t *pool) +get_default_keyring_name(apr_pool_t *result_pool) { char *def = NULL; struct gnome_keyring_baton key_info; @@ -159,7 +159,7 @@ get_default_keyring_name(apr_pool_t *poo return NULL; } - def = strdup(key_info.keyring_name); + def = apr_pstrdup(result_pool, key_info.keyring_name); callback_destroy_data_keyring(&key_info); return def; @@ -291,7 +291,6 @@ password_get_gnome_keyring(svn_boolean_t svn_boolean_t non_interactive, apr_pool_t *pool) { - char *default_keyring = NULL; GnomeKeyringResult result; GList *items; @@ -299,8 +298,6 @@ password_get_gnome_keyring(svn_boolean_t SVN_ERR(ensure_gnome_keyring_is_unlocked(non_interactive, parameters, pool)); - default_keyring = get_default_keyring_name(pool); - if (! apr_hash_get(parameters, "gnome-keyring-opening-failed", APR_HASH_KEY_STRING)) @@ -339,8 +336,6 @@ password_get_gnome_keyring(svn_boolean_t ""); } - free(default_keyring); - return SVN_NO_ERROR; } @@ -356,7 +351,6 @@ password_set_gnome_keyring(svn_boolean_t svn_boolean_t non_interactive, apr_pool_t *pool) { - char *default_keyring = NULL; GnomeKeyringResult result; guint32 item_id; @@ -364,8 +358,6 @@ password_set_gnome_keyring(svn_boolean_t SVN_ERR(ensure_gnome_keyring_is_unlocked(non_interactive, parameters, pool)); - default_keyring = get_default_keyring_name(pool); - if (! apr_hash_get(parameters, "gnome-keyring-opening-failed", APR_HASH_KEY_STRING)) @@ -388,8 +380,6 @@ password_set_gnome_keyring(svn_boolean_t ""); } - free(default_keyring); - *done = (result == GNOME_KEYRING_RESULT_OK); return SVN_NO_ERROR; } @@ -428,12 +418,14 @@ simple_gnome_keyring_save_creds(svn_bool pool); } +#if GLIB_CHECK_VERSION(2,6,0) static void log_noop(const gchar *log_domain, GLogLevelFlags log_level, const gchar *message, gpointer user_data) { /* do nothing */ } +#endif static void init_gnome_keyring(void) @@ -449,7 +441,9 @@ init_gnome_keyring(void) suppress stderr spam for not only libgnome-keyring, but for anything else the app is linked to that uses glib logging and doesn't specify a log_domain. */ +#if GLIB_CHECK_VERSION(2,6,0) g_log_set_default_handler(log_noop, NULL); +#endif } static const svn_auth_provider_t gnome_keyring_simple_provider = {
