You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by hw...@apache.org on 2010/08/11 18:43:31 UTC
svn commit: r984468 [3/25] - in /subversion/branches/ignore-mergeinfo: ./
build/ build/generator/ build/generator/templates/ notes/
notes/tree-conflicts/ notes/wc-ng/ subversion/bindings/javahl/native/
subversion/bindings/javahl/src/org/apache/subversi...
Modified: subversion/branches/ignore-mergeinfo/subversion/include/svn_client.h
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/include/svn_client.h?rev=984468&r1=984467&r2=984468&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/include/svn_client.h (original)
+++ subversion/branches/ignore-mergeinfo/subversion/include/svn_client.h Wed Aug 11 16:43:22 2010
@@ -947,6 +947,17 @@ typedef struct svn_client_ctx_t
* @since New in 1.7. */
svn_wc_context_t *wc_ctx;
+ /** A commit callback to call when a commit succeeds.
+ * @note There is no @a commit_callback member; this is named
+ * @a commit_callback2 to reflect its type.
+ *
+ * @since New in 1.7.
+ */
+ svn_commit_callback2_t commit_callback2;
+
+ /** Callback baton for #commit_callback2. */
+ void *commit_baton;
+
} svn_client_ctx_t;
/** Initialize a client context.
@@ -1450,8 +1461,7 @@ svn_client_add(const char *path,
*
* If @a paths contains URLs, use the authentication baton in @a ctx
* and @a message to immediately attempt to commit the creation of the
- * directories in @a paths in the repository. If the commit succeeds,
- * allocate (in @a pool) and populate @a *commit_info_p.
+ * directories in @a paths in the repository.
*
* Else, create the directories on disk, and attempt to schedule them
* for addition (using svn_client_add(), whose docstring you should
@@ -1475,8 +1485,27 @@ svn_client_add(const char *path,
* @a ctx->notify_baton2 and the path of the new directory. Note that this is
* only called for items added to the working copy.
*
+ * If @a ctx->commit_callback2 is non-NULL, then for each successful commit,
+ * call @a ctx->commit_callback2 with @a ctx->commit_baton and a
+ * #svn_commit_info_t for the commit.
+ *
+ * @since New in 1.7.
+ */
+svn_error_t *
+svn_client_mkdir4(const apr_array_header_t *paths,
+ svn_boolean_t make_parents,
+ const apr_hash_t *revprop_table,
+ svn_client_ctx_t *ctx,
+ apr_pool_t *pool);
+
+/**
+ * Similar to svn_client_mkdir4(), but returns the @a commit_info_p directly,
+ * rather than through @a ctx->commit_callback2.
+ *
* @since New in 1.5.
+ * @deprecated Provided for backward compatibility with the 1.4 API.
*/
+SVN_DEPRECATED
svn_error_t *
svn_client_mkdir3(svn_commit_info_t **commit_info_p,
const apr_array_header_t *paths,
@@ -1526,9 +1555,7 @@ svn_client_mkdir(svn_client_commit_info_
* If the paths in @a paths are URLs, use the authentication baton in
* @a ctx and @a ctx->log_msg_func3/@a ctx->log_msg_baton3 to
* immediately attempt to commit a deletion of the URLs from the
- * repository. If the commit succeeds, allocate (in @a pool) and
- * populate @a *commit_info_p. Every path must belong to the same
- * repository.
+ * repository. Every path must belong to the same repository.
*
* Else, schedule the working copy paths in @a paths for removal from
* the repository. Each path's parent must be under revision control.
@@ -1561,8 +1588,28 @@ svn_client_mkdir(svn_client_commit_info_
* @a ctx->notify_func2 with @a ctx->notify_baton2 and the path of the deleted
* item.
*
+ * If @a ctx->commit_callback2 is non-NULL, then for each successful commit,
+ * call @a ctx->commit_callback2 with @a ctx->commit_baton and a
+ * #svn_commit_info_t for the commit.
+ *
+ * @since New in 1.7.
+ */
+svn_error_t *
+svn_client_delete4(const apr_array_header_t *paths,
+ svn_boolean_t force,
+ svn_boolean_t keep_local,
+ const apr_hash_t *revprop_table,
+ svn_client_ctx_t *ctx,
+ apr_pool_t *pool);
+
+/**
+ * Similar to svn_client_delete4(), but returns the @a commit_info_p directly,
+ * rather than through @a ctx->commit_callback2.
+ *
* @since New in 1.5.
+ * @deprecated Provided for backward compatibility with the 1.6 API.
*/
+SVN_DEPRECATED
svn_error_t *
svn_client_delete3(svn_commit_info_t **commit_info_p,
const apr_array_header_t *paths,
@@ -1612,8 +1659,7 @@ svn_client_delete(svn_client_commit_info
/** Import file or directory @a path into repository directory @a url at
* head, authenticating with the authentication baton cached in @a ctx,
* and using @a ctx->log_msg_func3/@a ctx->log_msg_baton3 to get a log message
- * for the (implied) commit. Set @a *commit_info_p to the results of the
- * commit, allocated in @a pool. If some components of @a url do not exist
+ * for the (implied) commit. If some components of @a url do not exist
* then create parent directories as necessary.
*
* This function reads an unversioned tree from disk and skips any ".svn"
@@ -1665,8 +1711,30 @@ svn_client_delete(svn_client_commit_info
* If @a ignore_unknown_node_types is @c FALSE, ignore files of which the
* node type is unknown, such as device files and pipes.
*
+ * If @a ctx->commit_callback2 is non-NULL, then for each successful commit,
+ * call @a ctx->commit_callback2 with @a ctx->commit_baton and a
+ * #svn_commit_info_t for the commit.
+ *
+ * @since New in 1.7.
+ */
+svn_error_t *
+svn_client_import4(const char *path,
+ const char *url,
+ svn_depth_t depth,
+ svn_boolean_t no_ignore,
+ svn_boolean_t ignore_unknown_node_types,
+ const apr_hash_t *revprop_table,
+ svn_client_ctx_t *ctx,
+ apr_pool_t *pool);
+
+/**
+ * Similar to svn_client_import4(), but returns the @a commit_info_p directly,
+ * rather than through @a ctx->commit_callback2.
+ *
* @since New in 1.5.
+ * @deprecated Provided for backward compatibility with the 1.6 API.
*/
+SVN_DEPRECATED
svn_error_t *
svn_client_import3(svn_commit_info_t **commit_info_p,
const char *path,
@@ -1767,12 +1835,34 @@ svn_client_import(svn_client_commit_info
*
* Use @a pool for any temporary allocations.
*
- * If no error is returned and @a (*commit_info_p)->revision is set to
+ * If @a ctx->commit_callback2 is non-NULL, then for each successful commit,
+ * call @a ctx->commit_callback2 with @a ctx->commit_baton and a
+ * #svn_commit_info_t for the commit.
+ *
+ * @since New in 1.7.
+ */
+svn_error_t *
+svn_client_commit5(const apr_array_header_t *targets,
+ svn_depth_t depth,
+ svn_boolean_t keep_locks,
+ svn_boolean_t keep_changelists,
+ const apr_array_header_t *changelists,
+ const apr_hash_t *revprop_table,
+ svn_client_ctx_t *ctx,
+ apr_pool_t *pool);
+
+/**
+ * Similar to svn_client_commit5(), but returns the @a commit_info_p directly,
+ * rather than through @a ctx->commit_callback2.
+ *
+ * Also, if no error is returned and @a (*commit_info_p)->revision is set to
* #SVN_INVALID_REVNUM, then the commit was a no-op; nothing needed to
* be committed.
*
* @since New in 1.5.
+ * @deprecated Provided for backward compatibility with the 1.6 API.
*/
+SVN_DEPRECATED
svn_error_t *
svn_client_commit4(svn_commit_info_t **commit_info_p,
const apr_array_header_t *targets,
@@ -2213,9 +2303,6 @@ svn_client_status(svn_revnum_t *result_r
* If @a revprops is NULL, retrieve all revprops; else, retrieve only the
* revprops named in the array (i.e. retrieve none if the array is empty).
*
- * If @a start->kind or @a end->kind is #svn_opt_revision_unspecified,
- * return the error #SVN_ERR_CLIENT_BAD_REVISION.
- *
* Use @a pool for any temporary allocation.
*
* @par Important:
@@ -2591,7 +2678,6 @@ svn_client_diff5(const apr_array_header_
* set to @c FALSE.
*
* @deprecated Provided for backward compatibility with the 1.6 API.
- *
* @since New in 1.5.
*/
SVN_DEPRECATED
@@ -2620,7 +2706,6 @@ svn_client_diff4(const apr_array_header_
* FALSE, set @a depth to #svn_depth_empty.
*
* @deprecated Provided for backward compatibility with the 1.4 API.
- *
* @since New in 1.3.
*/
SVN_DEPRECATED
@@ -2646,7 +2731,6 @@ svn_client_diff3(const apr_array_header_
* @c APR_LOCALE_CHARSET.
*
* @deprecated Provided for backward compatibility with the 1.2 API.
- *
* @since New in 1.2.
*/
SVN_DEPRECATED
@@ -2757,7 +2841,6 @@ svn_client_diff_peg4(const apr_array_hea
* FALSE, set @a depth to #svn_depth_files.
*
* @deprecated Provided for backward compatibility with the 1.4 API.
- *
* @since New in 1.3.
*/
SVN_DEPRECATED
@@ -2782,7 +2865,6 @@ svn_client_diff_peg3(const apr_array_hea
* @c APR_LOCALE_CHARSET.
*
* @deprecated Provided for backward compatibility with the 1.2 API.
- *
* @since New in 1.2.
*/
SVN_DEPRECATED
@@ -3591,10 +3673,7 @@ typedef struct svn_client_copy_source_t
*
* If @a dst_path is a URL, use the authentication baton
* in @a ctx and @a ctx->log_msg_func3/@a ctx->log_msg_baton3 to immediately
- * attempt to commit the copy action in the repository. If the commit
- * succeeds, allocate (in @a pool) and populate @a *commit_info_p. If
- * @a dst_path is not a URL, and the copy succeeds, set @a
- * *commit_info_p to @c NULL.
+ * attempt to commit the copy action in the repository.
*
* If @a dst_path is not a URL, then this is just a variant of
* svn_client_add(), where the @a sources are scheduled for addition
@@ -3621,8 +3700,30 @@ typedef struct svn_client_copy_source_t
* for each item added at the new location, passing the new, relative path of
* the added item.
*
+ * If @a ctx->commit_callback2 is non-NULL, then for each successful commit,
+ * call @a ctx->commit_callback2 with @a ctx->commit_baton and a
+ * #svn_commit_info_t for the commit.
+ *
+ * @since New in 1.7.
+ */
+svn_error_t *
+svn_client_copy6(const apr_array_header_t *sources,
+ const char *dst_path,
+ svn_boolean_t copy_as_child,
+ svn_boolean_t make_parents,
+ svn_boolean_t ignore_externals,
+ const apr_hash_t *revprop_table,
+ svn_client_ctx_t *ctx,
+ apr_pool_t *pool);
+
+/**
+ * Similar to svn_client_copy6(), but returns the @a commit_info_p directly,
+ * rather than through @a ctx->commit_callback2.
+ *
* @since New in 1.6.
+ * @deprecated Provided for backward compatibility with the 1.6 API.
*/
+SVN_DEPRECATED
svn_error_t *
svn_client_copy5(svn_commit_info_t **commit_info_p,
const apr_array_header_t *sources,
@@ -3730,8 +3831,7 @@ svn_client_copy(svn_client_commit_info_t
* - The authentication baton in @a ctx and @a ctx->log_msg_func/@a
* ctx->log_msg_baton are used to commit the move.
*
- * - The move operation will be immediately committed. If the
- * commit succeeds, allocate (in @a pool) and populate @a *commit_info_p.
+ * - The move operation will be immediately committed.
*
* If @a src_paths are working copy paths:
*
@@ -3750,8 +3850,6 @@ svn_client_copy(svn_client_commit_info_t
* items and @a force is not set, the move will fail. If @a force is set
* such items will be removed.
*
- * - If the move succeeds, set @a *commit_info_p to @c NULL.
- *
* The parent of @a dst_path must already exist.
*
* If @a src_paths has only one item, attempt to move it to @a dst_path. If
@@ -3789,8 +3887,30 @@ svn_client_copy(svn_client_commit_info_t
*
* ### Is this really true? What about svn_wc_notify_commit_replaced()? ###
*
+ * If @a ctx->commit_callback2 is non-NULL, then for each successful commit,
+ * call @a ctx->commit_callback2 with @a ctx->commit_baton and a
+ * #svn_commit_info_t for the commit.
+ *
+ * @since New in 1.7.
+ */
+svn_error_t *
+svn_client_move6(const apr_array_header_t *src_paths,
+ const char *dst_path,
+ svn_boolean_t force,
+ svn_boolean_t move_as_child,
+ svn_boolean_t make_parents,
+ const apr_hash_t *revprop_table,
+ svn_client_ctx_t *ctx,
+ apr_pool_t *pool);
+
+/**
+ * Similar to svn_client_move6(), but returns the @a commit_info_p directly,
+ * rather than through @a ctx->commit_callback2.
+ *
* @since New in 1.5.
+ * @deprecated Provided for backward compatibility with the 1.6 API.
*/
+SVN_DEPRECATED
svn_error_t *
svn_client_move5(svn_commit_info_t **commit_info_p,
const apr_array_header_t *src_paths,
@@ -3909,8 +4029,7 @@ svn_client_move(svn_client_commit_info_t
* supported on URLs. The authentication baton in @a ctx and @a
* ctx->log_msg_func3/@a ctx->log_msg_baton3 will be used to
* immediately attempt to commit the property change in the
- * repository. If the commit succeeds, allocate (in @a pool) and
- * populate @a *commit_info_p.
+ * repository.
*
* If @a propname is an svn-controlled property (i.e. prefixed with
* #SVN_PROP_PREFIX), then the caller is responsible for ensuring that
@@ -3938,10 +4057,34 @@ svn_client_move(svn_client_commit_info_t
* If @a ctx->cancel_func is non-NULL, invoke it passing @a
* ctx->cancel_baton at various places during the operation.
*
+ * If @a ctx->commit_callback2 is non-NULL, then for each successful commit,
+ * call @a ctx->commit_callback2 with @a ctx->commit_baton and a
+ * #svn_commit_info_t for the commit.
+ *
* Use @a pool for all memory allocation.
*
+ * @since New in 1.7.
+ */
+svn_error_t *
+svn_client_propset4(const char *propname,
+ const svn_string_t *propval,
+ const char *target,
+ svn_depth_t depth,
+ svn_boolean_t skip_checks,
+ svn_revnum_t base_revision_for_url,
+ const apr_array_header_t *changelists,
+ const apr_hash_t *revprop_table,
+ svn_client_ctx_t *ctx,
+ apr_pool_t *pool);
+
+/**
+ * Similar to svn_client_propset4(), but returns the @a commit_info_p directly,
+ * rather than through @a ctx->commit_callback2.
+ *
* @since New in 1.5.
+ * @deprecated Provided for backward compatibility with the 1.6 API.
*/
+SVN_DEPRECATED
svn_error_t *
svn_client_propset3(svn_commit_info_t **commit_info_p,
const char *propname,
@@ -3954,7 +4097,6 @@ svn_client_propset3(svn_commit_info_t **
const apr_hash_t *revprop_table,
svn_client_ctx_t *ctx,
apr_pool_t *pool);
-
/**
* Like svn_client_propset3(), but with @a base_revision_for_url
* always #SVN_INVALID_REVNUM; @a commit_info_p always @c NULL; @a
Modified: subversion/branches/ignore-mergeinfo/subversion/include/svn_config.h
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/include/svn_config.h?rev=984468&r1=984467&r2=984468&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/include/svn_config.h (original)
+++ subversion/branches/ignore-mergeinfo/subversion/include/svn_config.h Wed Aug 11 16:43:22 2010
@@ -185,6 +185,15 @@ svn_config_get_config(apr_hash_t **cfg_h
apr_pool_t *pool);
+/** Set @a *cfgp to an empty @c svn_config_t structure,
+ * allocated in @a result_pool.
+ *
+ * @since New in 1.7.
+ */
+svn_error_t *
+svn_config_create(svn_config_t **cfgp,
+ apr_pool_t *result_pool);
+
/** Read configuration data from @a file (a file or registry path) into
* @a *cfgp, allocated in @a pool.
*
Modified: subversion/branches/ignore-mergeinfo/subversion/include/svn_diff.h
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/include/svn_diff.h?rev=984468&r1=984467&r2=984468&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/include/svn_diff.h (original)
+++ subversion/branches/ignore-mergeinfo/subversion/include/svn_diff.h Wed Aug 11 16:43:22 2010
@@ -777,6 +777,7 @@ svn_diff_mem_string_output_merge(svn_str
*/
typedef enum svn_diff_operation_kind_e
{
+ svn_diff_op_unchanged,
svn_diff_op_added,
svn_diff_op_deleted,
svn_diff_op_copied,
@@ -786,64 +787,167 @@ typedef enum svn_diff_operation_kind_e
}svn_diff_operation_kind_t;
/**
- * A single hunk inside a patch
+ * A single hunk inside a patch.
+ *
+ * The lines of text comprising the hunk can be interpreted in three ways:
+ * - diff text The hunk as it appears in the unidiff patch file,
+ * including the hunk header line ("@@ ... @@")
+ * - original text The text the patch was based on.
+ * - modified text The result of patching the original text.
+ *
+ * For example, consider a hunk with the following diff text:
+ * @@ -1,5 +1,5 @@
+ * #include <stdio.h>
+ * int main(int argc, char *argv[]) {
+ * - printf("Hello World!\n");
+ * + printf("I like Subversion!\n");
+ * }
+ *
+ * The original text of this hunk is:
+ * #include <stdio.h>
+ * int main(int argc, char *argv[]) {
+ * printf("Hello World!\n");
+ * }
+ *
+ * And the modified text is:
+ * #include <stdio.h>
+ * int main(int argc, char *argv[]) {
+ * printf("I like Subversion!\n");
+ * }
+ *
+ * @see svn_diff_hunk_readline_diff_text()
+ * @see svn_diff_hunk_readline_original_text()
+ * @see svn_diff_hunk_readline_modified_text()
*
* @since New in 1.7. */
-typedef struct svn_hunk_t {
- /** The hunk's unidiff text as it appeared in the patch file,
- * without range information. */
- svn_stream_t *diff_text;
+typedef struct svn_hunk_t svn_hunk_t;
- /**
- * The original and modified texts in the hunk range.
- * Derived from the diff text.
- *
- * For example, consider a hunk such as:
- * @@ -1,5 +1,5 @@
- * #include <stdio.h>
- * int main(int argc, char *argv[])
- * {
- * - printf("Hello World!\n");
- * + printf("I like Subversion!\n");
- * }
- *
- * Then, the original text described by the hunk is:
- * #include <stdio.h>
- * int main(int argc, char *argv[])
- * {
- * printf("Hello World!\n");
- * }
- *
- * And the modified text described by the hunk is:
- * #include <stdio.h>
- * int main(int argc, char *argv[])
- * {
- * printf("I like Subversion!\n");
- * }
- *
- * Because these streams make use of line filtering and transformation,
- * they should only be read line-by-line with svn_stream_readline().
- * Reading them with svn_stream_read() will not yield the expected result,
- * because it will return the unidiff text from the patch file unmodified.
- * The streams support resetting.
- */
- svn_stream_t *original_text;
- svn_stream_t *modified_text;
+/**
+ * Allocate @a *stringbuf in @a result_pool, and read into it one line
+ * of the diff text of @a hunk. The first line returned is the hunk header.
+ * Any subsequent lines are unidiff data (starting with '+', '-', or ' ').
+ * If the @a hunk is being interpreted in reverse (i.e. the reverse
+ * parameter of svn_diff_parse_next_patch() was @c TRUE), the diff
+ * text will be returned in reversed form.
+ * The line-terminator is detected automatically and stored in @a *eol
+ * if @a eol is not NULL.
+ * If EOF is reached and the stream does not end with a newline character,
+ * and @a eol is not NULL, @a *eol is set to NULL.
+ * Temporary allocations will be performed in @a scratch_pool.
+ *
+ * @since New in 1.7.
+ */
+svn_error_t *
+svn_diff_hunk_readline_diff_text(const svn_hunk_t *hunk,
+ svn_stringbuf_t **stringbuf,
+ const char **eol,
+ svn_boolean_t *eof,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool);
+
+/**
+ * Allocate @a *stringbuf in @a result_pool, and read into it one line
+ * of the original text of @a hunk.
+ * The line-terminator is detected automatically and stored in @a *eol
+ * if @a eol is not NULL.
+ * If EOF is reached and the stream does not end with a newline character,
+ * and @a eol is not NULL, @a *eol is set to NULL.
+ * Temporary allocations will be performed in @a scratch_pool.
+ *
+ * @see svn_hunk_t
+ * @since New in 1.7.
+ */
+svn_error_t *
+svn_diff_hunk_readline_original_text(const svn_hunk_t *hunk,
+ svn_stringbuf_t **stringbuf,
+ const char **eol,
+ svn_boolean_t *eof,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool);
+
+/**
+ * Like svn_diff_hunk_readline_original_text(), but it returns lines from
+ * the modified text of the hunk.
+ *
+ * @see svn_hunk_t
+ * @since New in 1.7.
+ */
+svn_error_t *
+svn_diff_hunk_readline_modified_text(const svn_hunk_t *hunk,
+ svn_stringbuf_t **stringbuf,
+ const char **eol,
+ svn_boolean_t *eof,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool);
+
+/* Reset the diff text of @a hunk so it can be read again from the start.
+ * @since New in 1.7. */
+svn_error_t *
+svn_diff_hunk_reset_diff_text(const svn_hunk_t *hunk);
+
+/* Reset the original text of @a hunk so it can be read again from the start.
+ * @since New in 1.7. */
+svn_error_t *
+svn_diff_hunk_reset_original_text(const svn_hunk_t *hunk);
+
+/* Reset the modified text of @a hunk so it can be read again from the start.
+ * @since New in 1.7. */
+svn_error_t *
+svn_diff_hunk_reset_modified_text(const svn_hunk_t *hunk);
+
+/* Return the line offset of the original hunk text,
+ * as parsed from the hunk header.
+ * @since New in 1.7. */
+svn_linenum_t
+svn_diff_hunk_get_original_start(const svn_hunk_t *hunk);
+
+/* Return the number of lines in the original @a hunk text,
+ * as parsed from the hunk header.
+ * @since New in 1.7. */
+svn_linenum_t
+svn_diff_hunk_get_original_length(const svn_hunk_t *hunk);
+
+/* Return the line offset of the modified @a hunk text,
+ * as parsed from the hunk header.
+ * @since New in 1.7. */
+svn_linenum_t
+svn_diff_hunk_get_modified_start(const svn_hunk_t *hunk);
+
+/* Return the number of lines in the modified @a hunk text,
+ * as parsed from the hunk header.
+ * @since New in 1.7. */
+svn_linenum_t
+svn_diff_hunk_get_modified_length(const svn_hunk_t *hunk);
+
+/* Return the number of lines of leading context of @a hunk,
+ * i.e. the number of lines starting with ' ' before the first line
+ * that starts with a '+' or '-'.
+ * @since New in 1.7. */
+svn_linenum_t
+svn_diff_hunk_get_leading_context(const svn_hunk_t *hunk);
+
+/* Return the number of lines of trailing context of @a hunk,
+ * i.e. the number of lines starting with ' ' after the last line
+ * that starts with a '+' or '-'.
+ * @since New in 1.7. */
+svn_linenum_t
+svn_diff_hunk_get_trailing_context(const svn_hunk_t *hunk);
+
+/**
+ * Data type to manage parsing of properties in patches.
+ *
+ * @since New in 1.7. */
+typedef struct svn_prop_patch_t {
+ const char *name;
+
+ /** Represents the operation performed on the property */
+ svn_diff_operation_kind_t operation;
/**
- * Hunk ranges as they appeared in the patch file.
- * All numbers are lines, not bytes. */
- svn_linenum_t original_start;
- svn_linenum_t original_length;
- svn_linenum_t modified_start;
- svn_linenum_t modified_length;
-
- /** Number of lines starting with ' ' before first '+' or '-'. */
- svn_linenum_t leading_context;
-
- /** Number of lines starting with ' ' after last '+' or '-'. */
- svn_linenum_t trailing_context;
-} svn_hunk_t;
+ * An array containing an svn_hunk_t object for each hunk parsed from the
+ * patch associated with our property name */
+ apr_array_header_t *hunks;
+} svn_prop_patch_t;
/**
* Data type to manage parsing of patches.
@@ -869,9 +973,9 @@ typedef struct svn_patch_t {
apr_array_header_t *hunks;
/**
- * A hash table containing an array of svn_hunk_t object for each property
- * parsed from the patch. The property names act as keys. */
- apr_hash_t *property_hunks;
+ * A hash table keyed by property names containing svn_prop_patch_t
+ * object for each property parsed from the patch. */
+ apr_hash_t *prop_patches;
/**
* Represents the operation performed on the file. */
Modified: subversion/branches/ignore-mergeinfo/subversion/include/svn_dirent_uri.h
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/include/svn_dirent_uri.h?rev=984468&r1=984467&r2=984468&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/include/svn_dirent_uri.h (original)
+++ subversion/branches/ignore-mergeinfo/subversion/include/svn_dirent_uri.h Wed Aug 11 16:43:22 2010
@@ -561,19 +561,19 @@ svn_dirent_get_absolute(const char **pab
const char *relative,
apr_pool_t *pool);
-/** Test if @a uri2 is a child of @a uri1.
+/** Test if @a child_uri is a child of @a parent_uri.
* If not, return @c NULL.
* If so, return a copy of the remainder uri, allocated in @a pool.
- * (The remainder is the component which, added to @a uri1, yields
- * @a uri2. The remainder does not begin with a dir separator.)
+ * (The remainder is the component which, added to @a parent_uri, yields
+ * @a child_uri. The remainder does not begin with a dir separator.)
*
* Both uris must be in canonical form, and must either be absolute,
* or contain no ".." components.
*
- * If @a uri2 is the same as @a uri1, it is not considered a child,
+ * If @a child_uri is the same as @a parent_uri, it is not considered a child,
* so the result is @c NULL; an empty string is never returned.
*
- * If @a pool is @c NULL , a pointer into @a uri2 will be returned to
+ * If @a pool is @c NULL , a pointer into @a child_uri will be returned to
* identify the remainder uri.
*
* ### @todo the ".." restriction is unfortunate, and would ideally
@@ -584,12 +584,12 @@ svn_dirent_get_absolute(const char **pab
* @since New in 1.7.
*/
const char *
-svn_uri_is_child(const char *uri1,
- const char *uri2,
+svn_uri_is_child(const char *parent_uri,
+ const char *child_uri,
apr_pool_t *pool);
/**
- * This function is similar as svn_uri_is_child(), except that it supports
+ * This function is similar to svn_uri_is_child(), except that it supports
* Windows dirents and UNC paths on Windows.
*
* ### @todo Makes no attempt to handle one absolute and one relative
@@ -598,88 +598,90 @@ svn_uri_is_child(const char *uri1,
* @since New in 1.6.
*/
const char *
-svn_dirent_is_child(const char *dirent1,
- const char *dirent2,
+svn_dirent_is_child(const char *parent_dirent,
+ const char *child_dirent,
apr_pool_t *pool);
/**
- * This function is similar as svn_uri_is_child(), except that it supports
+ * This function is similar to svn_uri_is_child(), except that it supports
* only relative paths.
*
* @since New in 1.7.
*/
const char *
-svn_relpath_is_child(const char *relpath1,
- const char *relpath2,
+svn_relpath_is_child(const char *parent_relpath,
+ const char *child_relpath,
apr_pool_t *pool);
-/** Return TRUE if @a dirent1 is an ancestor of @a dirent2 or the dirents are
- * equal and FALSE otherwise.
+/** Return TRUE if @a parent_dirent is an ancestor of @a child_dirent or
+ * the dirents are equal, and FALSE otherwise.
*
* @since New in 1.6.
*/
svn_boolean_t
-svn_dirent_is_ancestor(const char *path1,
- const char *path2);
+svn_dirent_is_ancestor(const char *parent_dirent,
+ const char *child_dirent);
-/** Return TRUE if @a relpath1 is an ancestor of @a relpath2 or the relpaths
- * are equal and FALSE otherwise.
+/** Return TRUE if @a parent_relpath is an ancestor of @a child_relpath or
+ * the relpaths are equal, and FALSE otherwise.
*
* This function supports only relative paths.
*
* @since New in 1.7.
*/
svn_boolean_t
-svn_relpath_is_ancestor(const char *relpath1,
- const char *relpath2);
+svn_relpath_is_ancestor(const char *parent_relpath,
+ const char *child_relpath);
-/** Return TRUE if @a uri1 is an ancestor of @a uri2 or the uris are
- * equal and FALSE otherwise.
+/** Return TRUE if @a parent_uri is an ancestor of @a child_uri or
+ * the uris are equal, and FALSE otherwise.
*
* This function supports URLs.
*
* @since New in 1.7.
*/
svn_boolean_t
-svn_uri_is_ancestor(const char *uri1,
- const char *uri2);
+svn_uri_is_ancestor(const char *parent_uri,
+ const char *child_uri);
-/** Returns the relative path part of @a dirent2 that is below @a dirent1,
- * or just "" iif @a dirent1 is equal to @a dirent2. If @a dirent2 is not
- * below @a path1, return @a dirent2 completely.
+/** Return the relative path part of @a child_dirent that is below
+ * @a parent_dirent, or just "" if @a parent_dirent is equal to
+ * @a child_dirent. If @a child_dirent is not below @a parent_dirent,
+ * return @a child_dirent completely.
*
- * This function assumes @a dirent1 and @a dirent2 are both absolute or
- * relative in the same way.
+ * This function assumes @a parent_dirent and @a child_dirent are both
+ * absolute or relative in the same way.
*
* @since New in 1.7.
*/
const char *
-svn_dirent_skip_ancestor(const char *dirent1,
- const char *dirent2);
+svn_dirent_skip_ancestor(const char *parent_dirent,
+ const char *child_dirent);
-/** Returns the relative path part of @a relpath2 that is below @a relpath1,
- * or just "" iif @a relpath1 is equal to @a relpath2. If @a relpath2 is not
- * below @a relpath1, return @a relpath2.
+/** Return the relative path part of @a child_relpath that is below
+ * @a parent_relpath, or just "" if @a parent_relpath is equal to
+ * @a child_relpath. If @a child_relpath is not below @a parent_relpath,
+ * return @a child_relpath.
*
* @since New in 1.7.
*/
const char *
-svn_relpath_skip_ancestor(const char *relpath1,
- const char *relpath2);
+svn_relpath_skip_ancestor(const char *parent_relpath,
+ const char *child_relpath);
-/** Returns the relative path part of @a uri2 that is below @a uri1, or just
- * "" iif @a uri1 is equal to @a uri2. If @a uri2 is not below @a uri1,
- * return @a uri2.
+/** Return the relative path part of @a child_uri that is below
+ * @a parent_uri, or just "" if @a parent_uri is equal to @a child_uri. If
+ * @a child_uri is not below @a parent_uri, return @a child_uri.
*
- * This function assumes @a uri1 and @a uri2 are both absolute or relative
- * in the same way.
+ * This function assumes @a parent_uri and @a child_uri are both absolute or
+ * relative in the same way.
*
* @since New in 1.7.
*/
const char *
-svn_uri_skip_ancestor(const char *uri1,
- const char *uri2);
+svn_uri_skip_ancestor(const char *parent_uri,
+ const char *child_uri);
/** Find the common prefix of the canonicalized dirents in @a targets
* (an array of <tt>const char *</tt>'s), and remove redundant dirents if @a
@@ -764,20 +766,22 @@ svn_uri_condense_targets(const char **pc
apr_pool_t *scratch_pool);
/** Check that when @a path is joined to @a base_path, the resulting path
- * is still under BASE_PATH in the local filesystem. If not, return @c FALSE.
- * If @c TRUE is returned, @a *full_path will be set to the absolute path
- * of @a path, allocated in @a pool.
+ * is still under BASE_PATH in the local filesystem. If not, set @a under_root
+ * to @c FALSE. If @a under_root is @c TRUE is returned, and @a result_path is
+ * not @c NULL, then @a *result_path will be set to the absolute path of @a
+ * path, allocated in @a result_pool.
*
* Note: Use of this function is strongly encouraged. Do not roll your own.
* (http://cve.mitre.org/cgi-bin/cvename.cgi?name=2007-3846)
*
* @since New in 1.7.
*/
-svn_boolean_t
-svn_dirent_is_under_root(char **full_path,
+svn_error_t *
+svn_dirent_is_under_root(svn_boolean_t *under_root,
+ const char **result_path,
const char *base_path,
const char *path,
- apr_pool_t *pool);
+ apr_pool_t *result_pool);
/** Set @a *dirent to the path corresponding to the file:// URL @a url, using
* the platform-specific file:// rules.
Modified: subversion/branches/ignore-mergeinfo/subversion/include/svn_error.h
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/include/svn_error.h?rev=984468&r1=984467&r2=984468&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/include/svn_error.h (original)
+++ subversion/branches/ignore-mergeinfo/subversion/include/svn_error.h Wed Aug 11 16:43:22 2010
@@ -444,6 +444,9 @@ svn_error_t *svn_error_purge_tracing(svn
} \
} while (0)
+/** Report a "Not implemented" malfunction. Internal use only. */
+#define SVN__NOT_IMPLEMENTED() \
+ return svn_error__malfunction(TRUE, __FILE__, __LINE__, "Not implemented.")
/** A helper function for the macros that report malfunctions. Handle a
* malfunction by calling the current "malfunction handler" which may have
Modified: subversion/branches/ignore-mergeinfo/subversion/include/svn_error_codes.h
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/include/svn_error_codes.h?rev=984468&r1=984467&r2=984468&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/include/svn_error_codes.h (original)
+++ subversion/branches/ignore-mergeinfo/subversion/include/svn_error_codes.h Wed Aug 11 16:43:22 2010
@@ -289,13 +289,8 @@ SVN_ERROR_START
"Unrecognized stream data")
/** @since New in 1.7. */
- SVN_ERRDEF(SVN_ERR_STREAM_RESET_NOT_SUPPORTED,
- SVN_ERR_STREAM_CATEGORY_START + 3,
- "Stream doesn't support resetting")
-
- /** @since New in 1.7. */
SVN_ERRDEF(SVN_ERR_STREAM_SEEK_NOT_SUPPORTED,
- SVN_ERR_STREAM_CATEGORY_START + 4,
+ SVN_ERR_STREAM_CATEGORY_START + 3,
"Stream doesn't support seeking")
/* node errors */
@@ -842,6 +837,11 @@ SVN_ERROR_START
SVN_ERR_RA_CATEGORY_START + 10,
"Repository root URL does not match expected root URL")
+ /** @since New in 1.7. */
+ SVN_ERRDEF(SVN_ERR_RA_SESSION_URL_MISMATCH,
+ SVN_ERR_RA_CATEGORY_START + 11,
+ "Session URL does not match expected session URL")
+
/* ra_dav errors */
SVN_ERRDEF(SVN_ERR_RA_DAV_SOCK_INIT,
@@ -974,6 +974,11 @@ SVN_ERROR_START
SVN_ERR_RA_SERF_CATEGORY_START + 2,
"Initialization of the GSSAPI context failed")
+ /** @since New in 1.7. */
+ SVN_ERRDEF(SVN_ERR_RA_SERF_WRAPPED_ERROR,
+ SVN_ERR_RA_SERF_CATEGORY_START + 3,
+ "While handling serf response:")
+
/* libsvn_auth errors */
/* this error can be used when an auth provider doesn't have
@@ -1165,6 +1170,11 @@ SVN_ERROR_START
SVN_ERR_CLIENT_CATEGORY_START + 18,
"Invalid path component strip count specified")
+ /** @since New in 1.7. */
+ SVN_ERRDEF(SVN_ERR_CLIENT_CYCLE_DETECTED,
+ SVN_ERR_CLIENT_CATEGORY_START + 19,
+ "Detected a cycle while processing the operation")
+
/* misc errors */
SVN_ERRDEF(SVN_ERR_BASE,
@@ -1313,6 +1323,17 @@ SVN_ERROR_START
SVN_ERR_MISC_CATEGORY_START + 32,
"Unsupported schema found in SQLite db")
+/** @since New in 1.7. */
+ SVN_ERRDEF(SVN_ERR_SQLITE_BUSY,
+ SVN_ERR_MISC_CATEGORY_START + 33,
+ "The SQLite db is busy")
+
+/** @since New in 1.7. */
+ SVN_ERRDEF(SVN_ERR_SQLITE_RESETTING_FOR_ROLLBACK,
+ SVN_ERR_MISC_CATEGORY_START + 34,
+ "SQLite busy at transaction rollback; "
+ "resetting all busy SQLite statements to allow rollback")
+
/* command-line client errors */
SVN_ERRDEF(SVN_ERR_CL_ARG_PARSING_ERROR,
Modified: subversion/branches/ignore-mergeinfo/subversion/include/svn_io.h
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/include/svn_io.h?rev=984468&r1=984467&r2=984468&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/include/svn_io.h (original)
+++ subversion/branches/ignore-mergeinfo/subversion/include/svn_io.h Wed Aug 11 16:43:22 2010
@@ -65,10 +65,59 @@ typedef enum svn_io_file_del_t
svn_io_file_del_on_pool_cleanup
} svn_io_file_del_t;
+/** A set of directory entry data elements as returned by svn_io_get_dirents
+ *
+ * Note that the first two fields are exactly identical to svn_io_dirent_t
+ * to allow returning a svn_io_dirent2_t as a svn_io_dirent_t.
+ *
+ * Use svn_io_dirent2_create() to create new svn_dirent2_t instances or
+ * svn_io_dirent2_dup() to duplicate an existing instance.
+ *
+ * @since New in 1.7.
+ */
+typedef struct svn_io_dirent2_t {
+ /* New fields must be added at the end to preserve binary compatibility */
+
+ /** The kind of this entry. */
+ svn_node_kind_t kind;
+
+ /** If @c kind is #svn_node_file, whether this entry is a special file;
+ * else FALSE.
+ *
+ * @see svn_io_check_special_path().
+ */
+ svn_boolean_t special;
+
+ /** The filesize of this entry or undefined for a directory */
+ svn_filesize_t filesize;
+
+ /** The time the file was last modified */
+ apr_time_t mtime;
+
+ /* Don't forget to update svn_io_dirent2_dup() when adding new fields */
+} svn_io_dirent2_t;
+
+
+/** Creates a new @a svn_io_dirent2_t structure
+ *
+ * @since New in 1.7.
+ */
+svn_io_dirent2_t *
+svn_io_dirent2_create(apr_pool_t *result_pool);
+
+/** Duplicates a @c svn_io_dirent2_t structure into @a result_pool.
+ *
+ * @since New in 1.7.
+ */
+svn_io_dirent2_t *
+svn_io_dirent2_dup(const svn_io_dirent2_t *item,
+ apr_pool_t *result_pool);
-
/** Represents the kind and special status of a directory entry.
*
+ * Note that the first two fields are exactly identical to svn_io_dirent2_t
+ * to allow returning a svn_io_dirent2_t as a svn_io_dirent_t.
+ *
* @since New in 1.3.
*/
typedef struct svn_io_dirent_t {
@@ -700,13 +749,6 @@ typedef svn_error_t *(*svn_write_fn_t)(v
/** Close handler function for a generic stream. @see svn_stream_t. */
typedef svn_error_t *(*svn_close_fn_t)(void *baton);
-/** Reset handler function for a generic stream. @see svn_stream_t and
- * svn_stream_reset().
- *
- * @since New in 1.7.
- */
-typedef svn_error_t *(*svn_io_reset_fn_t)(void *baton);
-
/** An opaque type which represents a mark on a stream.
*
* @see svn_stream_mark().
@@ -731,41 +773,6 @@ typedef svn_error_t *(*svn_io_mark_fn_t)
typedef svn_error_t *(*svn_io_seek_fn_t)(void *baton,
svn_stream_mark_t *mark);
-/** Line-filtering callback function for a generic stream.
- * @a baton is the stream's baton.
- * @see svn_stream_t, svn_stream_set_baton() and svn_stream_readline().
- *
- * @since New in 1.7.
- */
-typedef svn_error_t *(*svn_io_line_filter_cb_t)(svn_boolean_t *filtered,
- const char *line,
- void *baton,
- apr_pool_t *scratch_pool);
-
-/** A callback function, invoked by svn_stream_readline(), which can perform
- * arbitary transformations on the line before it is passed back to the caller
- * of svn_stream_readline().
- *
- * Returns a transformed stringbuf in @a buf, allocated in @a result_pool.
- * This callback gets invoked on lines which were not filtered by the
- * line-filtering callback function.
- *
- * Implementations should always at least return an empty stringbuf.
- * It is a fatal error if an implementation returns @a *buf as NULL.
- *
- * @a baton is the stream's baton.
- *
- * @see svn_stream_t, svn_stream_set_baton(), svn_io_line_filter_cb_t and
- * svn_stream_readline().
- *
- * @since New in 1.7.
- */
-typedef svn_error_t *(*svn_io_line_transformer_cb_t)(svn_stringbuf_t **buf,
- const char *line,
- void *baton,
- apr_pool_t *result_pool,
- apr_pool_t *scratch_pool);
-
/** Create a generic stream. @see svn_stream_t. */
svn_stream_t *
svn_stream_create(void *baton,
@@ -791,14 +798,6 @@ void
svn_stream_set_close(svn_stream_t *stream,
svn_close_fn_t close_fn);
-/** Set @a stream's reset function to @a reset_fn
- *
- * @since New in 1.7.
- */
-void
-svn_stream_set_reset(svn_stream_t *stream,
- svn_io_reset_fn_t reset_fn);
-
/** Set @a stream's mark function to @a mark_fn
*
* @since New in 1.7.
@@ -815,24 +814,6 @@ void
svn_stream_set_seek(svn_stream_t *stream,
svn_io_seek_fn_t seek_fn);
-/** Set @a stream's line-filtering callback function to @a line_filter_cb
- *
- * @since New in 1.7.
- */
-void
-svn_stream_set_line_filter_callback(svn_stream_t *stream,
- svn_io_line_filter_cb_t line_filter_cb);
-
-/** Set @a streams's line-transforming callback function to
- * @a line_transformer_cb.
- *
- * @since New in 1.7.
- */
-void
-svn_stream_set_line_transformer_callback(
- svn_stream_t *stream,
- svn_io_line_transformer_cb_t line_transformer_cb);
-
/** Create a stream that is empty for reading and infinite for writing. */
svn_stream_t *
svn_stream_empty(apr_pool_t *pool);
@@ -1098,7 +1079,8 @@ svn_stream_mark(svn_stream_t *stream,
/** Seek to a @a mark in a generic @a stream.
* This function returns the #SVN_ERR_STREAM_SEEK_NOT_SUPPORTED error
- * if the stream doesn't implement seeking.
+ * if the stream doesn't implement seeking. Passing NULL as @a mark,
+ * seeks to the start of the stream.
*
* @see svn_stream_mark()
* @since New in 1.7.
@@ -1154,19 +1136,6 @@ svn_stream_printf_from_utf8(svn_stream_t
*
* If @a stream runs out of bytes before encountering a line-terminator,
* then set @a *eof to @c TRUE, otherwise set @a *eof to FALSE.
- *
- * If a line-filter callback function was set on the stream using
- * svn_stream_set_line_filter_callback(), lines will only be returned
- * if they pass the filtering decision of the callback function.
- * If end-of-file is encountered while reading the line and the line
- * is filtered, @a *stringbuf will be empty.
- *
- * If a line-transformer callback function was set on the stream using
- * svn_stream_set_line_transformer_callback(), lines will be returned
- * transformed, in a way determined by the callback.
- *
- * Note that the line-transformer callback gets called after the line-filter
- * callback, not before.
*/
svn_error_t *
svn_stream_readline(svn_stream_t *stream,
@@ -1388,7 +1357,9 @@ svn_io_remove_dir(const char *path,
* apr_dir_read() are NOT returned in the hash.
*
* @since New in 1.4.
+ * @deprecated Provided for backward compatibility with the 1.6 API.
*/
+SVN_DEPRECATED
svn_error_t *
svn_io_get_dir_filenames(apr_hash_t **dirents,
const char *path,
@@ -1396,16 +1367,33 @@ svn_io_get_dir_filenames(apr_hash_t **di
/** Read all of the disk entries in directory @a path, a utf8-encoded
* path. Set @a *dirents to a hash mapping dirent names (<tt>char *</tt>) to
- * #svn_io_dirent_t structures, allocated in @a pool.
+ * #svn_io_dirent2_t structures, allocated in @a pool.
+ *
+ * If @a only_check_type is set to @c TRUE, only the kind and special
+ * fields of the svn_io_dirent2_t are filled.
*
* @note The `.' and `..' directories normally returned by
* apr_dir_read() are NOT returned in the hash.
*
* @note The kind field in the @a dirents is set according to the mapping
- * as documented for svn_io_check_path()
+ * as documented for svn_io_check_path().
+ *
+ * @since New in 1.7.
+ */
+svn_error_t *
+svn_io_get_dirents3(apr_hash_t **dirents,
+ const char *path,
+ svn_boolean_t only_check_type,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool);
+
+
+/** Similar to svn_io_get_dirents3, but returns a mapping to svn_io_dirent_t
+ * structures instead of svn_io_dirent2_t and with only a single pool.
*
* @since New in 1.3.
*/
+SVN_DEPRECATED
svn_error_t *
svn_io_get_dirents2(apr_hash_t **dirents,
const char *path,
@@ -1422,6 +1410,21 @@ svn_io_get_dirents(apr_hash_t **dirents,
const char *path,
apr_pool_t *pool);
+/** Create a svn_io_dirent2_t instance for path. Specialized variant of
+ * svn_io_stat() that directly translates node_kind and special.
+ *
+ * If @a ignore_enoent is set to @c TRUE, set *dirent_p->kind to
+ * svn_node_none instead of returning an error.
+ *
+ * @since New in 1.7.
+ */
+svn_error_t *
+svn_io_stat_dirent(const svn_io_dirent2_t **dirent_p,
+ const char *path,
+ svn_boolean_t ignore_enoent,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool);
+
/** Callback function type for svn_io_dir_walk() */
typedef svn_error_t * (*svn_io_walk_func_t)(void *baton,
@@ -1429,19 +1432,38 @@ typedef svn_error_t * (*svn_io_walk_func
const apr_finfo_t *finfo,
apr_pool_t *pool);
-/** This function will recursively walk over the files and directories
- * rooted at @a dirname, a utf8-encoded path. For each file or directory,
- * @a walk_func is invoked, passing in the @a walk_baton, the utf8-encoded
- * full path to the entry, an @c apr_finfo_t structure, and a temporary
- * pool for allocations. For any directory, @a walk_func will be invoked
- * on the directory itself before being invoked on any subdirectories or
- * files within the directory.
+/** Recursively walk the directory rooted at @a dirname, a
+ * utf8-encoded path, invoking @a walk_func (with @a walk_baton) for
+ * each item in the tree. For a given directory, invoke @a walk_func
+ * on the directory itself before invoking it on any children thereof.
+ *
+ * Deliver to @a walk_func the information specified by @a wanted,
+ * plus the items specified by @c APR_FINFO_TYPE and @c APR_FINFO_NAME.
+ *
+ * Use @a pool for all allocations.
+ *
+ * @note This function does not currently pass all file types to @a
+ * walk_func -- only APR_DIR, APR_REG, and APR_LNK. We reserve the
+ * right to pass additional file types through this interface in the
+ * future, though, so implementations of this callback should
+ * explicitly test FINFO->filetype. See the APR library's
+ * apr_filetype_e enum for the various filetypes and their meanings.
*
- * The set of information passed to @a walk_func is specified by @a wanted,
- * and the items specified by @c APR_FINFO_TYPE and @c APR_FINFO_NAME.
+ * @since New in 1.7.
+ */
+svn_error_t *
+svn_io_dir_walk2(const char *dirname,
+ apr_int32_t wanted,
+ svn_io_walk_func_t walk_func,
+ void *walk_baton,
+ apr_pool_t *pool);
+
+/** Similar to svn_io_dir_walk(), but only calls @a walk_func for
+ * files of type APR_DIR (directory) and APR_REG (regular file).
*
- * All allocations will be performed in @a pool.
+ * @deprecated Provided for backwards compatibility with the 1.6 API.
*/
+SVN_DEPRECATED
svn_error_t *
svn_io_dir_walk(const char *dirname,
apr_int32_t wanted,
Modified: subversion/branches/ignore-mergeinfo/subversion/include/svn_mergeinfo.h
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/include/svn_mergeinfo.h?rev=984468&r1=984467&r2=984468&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/include/svn_mergeinfo.h (original)
+++ subversion/branches/ignore-mergeinfo/subversion/include/svn_mergeinfo.h Wed Aug 11 16:43:22 2010
@@ -209,6 +209,21 @@ svn_error_t *
svn_mergeinfo_merge(svn_mergeinfo_t mergeinfo, svn_mergeinfo_t changes,
apr_pool_t *pool);
+/** Combine one mergeinfo catalog, @a changes_catalog, into another mergeinfo
+ * catalog @a mergeinfo_catalog. If both catalogs have mergeinfo for the same
+ * key, use svn_mergeinfo_merge() to combine the mergeinfos.
+ *
+ * Additions to @a mergeinfo_catalog are deep copies allocated in
+ * @a result_pool. Temporary allocations are made in @a scratch_pool.
+ *
+ * @since New in 1.7.
+ */
+svn_error_t *
+svn_mergeinfo_catalog_merge(svn_mergeinfo_catalog_t mergeinfo_catalog,
+ svn_mergeinfo_catalog_t changes_catalog,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool);
+
/** Like svn_mergeinfo_remove2, but always considers inheritance.
*
* @deprecated Provided for backward compatibility with the 1.5 API.
Modified: subversion/branches/ignore-mergeinfo/subversion/include/svn_props.h
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/include/svn_props.h?rev=984468&r1=984467&r2=984468&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/include/svn_props.h (original)
+++ subversion/branches/ignore-mergeinfo/subversion/include/svn_props.h Wed Aug 11 16:43:22 2010
@@ -110,6 +110,8 @@ svn_prop_hash_dup(apr_hash_t *hash,
* Return the value of property @a prop_name as it is in @a properties,
* with values <tt>const svn_string_t</tt>. If @a prop_name is not
* in @a properties or @ properties is NULL, return NULL.
+ *
+ * @since New in 1.7.
*/
const char *
svn_prop_get_value(apr_hash_t *properties,
Modified: subversion/branches/ignore-mergeinfo/subversion/include/svn_ra.h
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/include/svn_ra.h?rev=984468&r1=984467&r2=984468&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/include/svn_ra.h (original)
+++ subversion/branches/ignore-mergeinfo/subversion/include/svn_ra.h Wed Aug 11 16:43:22 2010
@@ -65,7 +65,7 @@ svn_ra_version(void);
* @a close_baton as appropriate.
*
* @a path is relative to the "root" of the session, defined by the
- * @a repos_URL passed to svn_ra_open3() vtable call.
+ * @a repos_URL passed to svn_ra_open4() vtable call.
*
* @a name is the name of the property to fetch. If the property is present,
* then it is returned in @a value. Otherwise, @a *value is set to @c NULL.
@@ -294,7 +294,7 @@ typedef struct svn_ra_reporter3_t
* implementor should assume the directory has no entries or props.
*
* This will *override* any previous set_path() calls made on parent
- * paths. @a path is relative to the URL specified in svn_ra_open3().
+ * paths. @a path is relative to the URL specified in svn_ra_open4().
*
* If @a lock_token is non-NULL, it is the lock token for @a path in the WC.
*
@@ -445,7 +445,7 @@ typedef struct svn_ra_reporter_t
/** A collection of callbacks implemented by libsvn_client which allows
* an RA layer to "pull" information from the client application, or
* possibly store information. libsvn_client passes this vtable to
- * svn_ra_open3().
+ * svn_ra_open4().
*
* Each routine takes a @a callback_baton originally provided with the
* vtable.
@@ -580,8 +580,19 @@ svn_ra_create_callbacks(svn_ra_callbacks
typedef struct svn_ra_session_t svn_ra_session_t;
/**
- * Open a repository session to @a repos_URL. Return an opaque object
- * representing this session in @a *session_p, allocated in @a pool.
+ * Open a repository access session to the repository at @a repos_URL,
+ * or inform the caller regarding a correct URL by which to access
+ * that repository.
+ *
+ * If @a repos_URL can be used successfully to access the repository,
+ * set @a *session_p to an opaque object representing a repository
+ * session for the repository and (if @a corrected_url is non-NULL)
+ * set @a *corrected_url to NULL. If there's a better URL that the
+ * caller should try and @a corrected_url is non-NULL, set
+ * @a *session_p to NULL and @a *corrected_url to the corrected URL. If
+ * there's a better URL that the caller should try, and @a
+ * corrected_url is NULL, return an #SVN_ERR_RA_SESSION_URL_MISMATCH
+ * error. Allocate all returned items in @a pool.
*
* Return @c SVN_ERR_RA_UUID_MISMATCH if @a uuid is non-NULL and not equal
* to the UUID of the repository at @c repos_URL.
@@ -598,8 +609,25 @@ typedef struct svn_ra_session_t svn_ra_s
*
* @see svn_client_open_ra_session().
*
+ * @since New in 1.7.
+ */
+svn_error_t *
+svn_ra_open4(svn_ra_session_t **session_p,
+ const char **corrected_url,
+ const char *repos_URL,
+ const char *uuid,
+ const svn_ra_callbacks2_t *callbacks,
+ void *callback_baton,
+ apr_hash_t *config,
+ apr_pool_t *pool);
+
+/** Similar to svn_ra_open4(), but with @a corrected_url always passed
+ * as @c NULL.
+ *
* @since New in 1.5.
+ * @deprecated Provided for backward compatibility with the 1.6 API.
*/
+SVN_DEPRECATED
svn_error_t *
svn_ra_open3(svn_ra_session_t **session_p,
const char *repos_URL,
@@ -777,8 +805,8 @@ 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 with the new revision number, the
- * commit date (as a <tt>const char *</tt>), commit author (as a
+ * 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
@@ -1157,7 +1185,7 @@ svn_ra_do_switch(svn_ra_session_t *sessi
*
* Get status as deeply as @a depth indicates. If @a depth is
* #svn_depth_unknown, get the status down to the ambient depth of the
- * working copy. If @depth is deeper than the working copy, include changes
+ * working copy. If @a depth is deeper than the working copy, include changes
* that would be needed to populate the working copy to that depth.
*
* The caller may not perform any RA operations using @a session
@@ -1568,8 +1596,9 @@ svn_ra_get_location_segments(svn_ra_sess
* empty file. In the following calls, the delta will be against the
* fulltext contents for the previous call.
*
- * If @a include_merged_revisions is TRUE, revisions which a included as a
- * result of a merge between @a start and @a end will be included.
+ * If @a include_merged_revisions is TRUE, revisions which are
+ * included as a result of a merge between @a start and @a end will be
+ * included.
*
* @note This functionality is not available in pre-1.1 servers. If the
* server doesn't implement it, an alternative (but much slower)
Modified: subversion/branches/ignore-mergeinfo/subversion/include/svn_repos.h
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/include/svn_repos.h?rev=984468&r1=984467&r2=984468&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/include/svn_repos.h (original)
+++ subversion/branches/ignore-mergeinfo/subversion/include/svn_repos.h Wed Aug 11 16:43:22 2010
@@ -2296,11 +2296,15 @@ svn_repos_node_from_baton(void *edit_bat
#define SVN_REPOS_DUMPFILE_NODE_ACTION "Node-action"
#define SVN_REPOS_DUMPFILE_NODE_COPYFROM_PATH "Node-copyfrom-path"
#define SVN_REPOS_DUMPFILE_NODE_COPYFROM_REV "Node-copyfrom-rev"
+/** @since New in 1.6. */
#define SVN_REPOS_DUMPFILE_TEXT_COPY_SOURCE_MD5 "Text-copy-source-md5"
+/** @since New in 1.6. */
#define SVN_REPOS_DUMPFILE_TEXT_COPY_SOURCE_SHA1 "Text-copy-source-sha1"
#define SVN_REPOS_DUMPFILE_TEXT_COPY_SOURCE_CHECKSUM \
SVN_REPOS_DUMPFILE_TEXT_COPY_SOURCE_MD5
+/** @since New in 1.6. */
#define SVN_REPOS_DUMPFILE_TEXT_CONTENT_MD5 "Text-content-md5"
+/** @since New in 1.6. */
#define SVN_REPOS_DUMPFILE_TEXT_CONTENT_SHA1 "Text-content-sha1"
#define SVN_REPOS_DUMPFILE_TEXT_CONTENT_CHECKSUM \
SVN_REPOS_DUMPFILE_TEXT_CONTENT_MD5
@@ -2312,11 +2316,11 @@ svn_repos_node_from_baton(void *edit_bat
#define SVN_REPOS_DUMPFILE_PROP_DELTA "Prop-delta"
/** @since New in 1.1. */
#define SVN_REPOS_DUMPFILE_TEXT_DELTA "Text-delta"
-/** @since New in 1.5. */
+/** @since New in 1.6. */
#define SVN_REPOS_DUMPFILE_TEXT_DELTA_BASE_MD5 "Text-delta-base-md5"
/** @since New in 1.6. */
#define SVN_REPOS_DUMPFILE_TEXT_DELTA_BASE_SHA1 "Text-delta-base-sha1"
-/** @since New in 1.6. */
+/** @since New in 1.5. */
#define SVN_REPOS_DUMPFILE_TEXT_DELTA_BASE_CHECKSUM \
SVN_REPOS_DUMPFILE_TEXT_DELTA_BASE_MD5
Modified: subversion/branches/ignore-mergeinfo/subversion/include/svn_types.h
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/include/svn_types.h?rev=984468&r1=984467&r2=984468&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/include/svn_types.h (original)
+++ subversion/branches/ignore-mergeinfo/subversion/include/svn_types.h Wed Aug 11 16:43:22 2010
@@ -131,6 +131,16 @@ svn__apr_hash_index_klen(const apr_hash_
void *
svn__apr_hash_index_val(const apr_hash_index_t *hi);
+/** On Windows, APR_STATUS_IS_ENOTDIR includes several kinds of
+ * invalid-pathname error but not this one, so we include it. */
+/* ### This fix should go into APR. */
+#ifndef WIN32
+#define SVN__APR_STATUS_IS_ENOTDIR(s) APR_STATUS_IS_ENOTDIR(s)
+#else
+#define SVN__APR_STATUS_IS_ENOTDIR(s) (APR_STATUS_IS_ENOTDIR(s) \
+ || ((s) == APR_OS_START_SYSERR + ERROR_INVALID_NAME))
+#endif
+
/** @} */
/** The various types of nodes in the Subversion filesystem. */
Modified: subversion/branches/ignore-mergeinfo/subversion/include/svn_wc.h
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/include/svn_wc.h?rev=984468&r1=984467&r2=984468&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/include/svn_wc.h (original)
+++ subversion/branches/ignore-mergeinfo/subversion/include/svn_wc.h Wed Aug 11 16:43:22 2010
@@ -1081,6 +1081,16 @@ typedef enum svn_wc_notify_action_t
/** A hunk from a patch was rejected.
* @since New in 1.7. */
svn_wc_notify_patch_rejected_hunk,
+
+ /** A hunk from a patch was found to already be applied.
+ * @since New in 1.7. */
+ svn_wc_notify_patch_hunk_already_applied,
+
+ /** The server has instructed the client to follow a URL
+ * redirection.
+ * @since New in 1.7. */
+ svn_wc_notify_url_redirect
+
} svn_wc_notify_action_t;
@@ -2704,13 +2714,20 @@ svn_wc_text_modified_p(svn_boolean_t *mo
svn_wc_adm_access_t *adm_access,
apr_pool_t *pool);
-
/** Set @a *modified_p to non-zero if @a path's properties are modified
* with regard to the base revision, else set @a modified_p to zero.
* @a adm_access must be an access baton for @a path.
*
- * If you want to use this with a post-wc-ng working copy, just call
- * svn_wc_get_prop_diffs2() and examine the output.
+ * @since New in 1.7.
+ */
+svn_error_t *
+svn_wc_props_modified_p2(svn_boolean_t *modified_p,
+ svn_wc_context_t* wc_ctx,
+ const char *local_abspath,
+ apr_pool_t *scratch_pool);
+
+/** Similar to svn_wc_props_modified_p2(), but with a relative path and
+ * adm_access baton.
*
* @deprecated Provided for backward compatibility with the 1.6 API.
*/
@@ -4210,12 +4227,15 @@ svn_wc_status_set_repos_locks(void *set_
* is used for accessing the working copy and must contain a write lock for
* the parent directory of @a dst_abspath,
*
+ * If metadata_only is TRUE then this a database only operation and
+ * the working directories and files are not copied.
+ *
* @a src_abspath must be a file or directory under version control;
* the parent of @a dst_abspath must be a directory under version control
* in the same working copy; @a dst_abspath will be the name of the copied
- * item, and it must not exist already. Note that when @a src points to a
- * versioned file, the working file doesn't necessarily exist in which case
- * its text-base is used instead.
+ * item, and it must not exist already if metadata_only is FALSE. Note that
+ * when @a src points to a versioned file, the working file doesn't
+ * necessarily exist in which case its text-base is used instead.
*
* If @a cancel_func is non-NULL, call it with @a cancel_baton at
* various points during the operation. If it returns an error
@@ -4230,7 +4250,7 @@ svn_wc_status_set_repos_locks(void *set_
* @par Important:
* This is a variant of svn_wc_add4(). No changes will happen
* to the repository until a commit occurs. This scheduling can be
- * removed with svn_client_revert2().
+ * removed with svn_client_revert4().
*
* @since New in 1.7.
*/
@@ -4238,6 +4258,7 @@ svn_error_t *
svn_wc_copy3(svn_wc_context_t *wc_ctx,
const char *src_abspath,
const char *dst_abspath,
+ svn_boolean_t metadata_only,
svn_cancel_func_t cancel_func,
void *cancel_baton,
svn_wc_notify_func2_t notify_func,
@@ -5235,19 +5256,16 @@ svn_wc_crawl_revisions(const char *path,
/* Updates. */
-/** Set @a *wc_root to @c TRUE if @a path represents a "working copy root",
- * @c FALSE otherwise. Here, @a path is a "working copy root" if its parent
- * directory is not a WC or if its parent directory's repository URL is not
- * the parent of its own repository URL. Thus, a switched subtree is
+/** Set @a *wc_root to @c TRUE if @a local_abspath represents a "working copy
+ * root", @c FALSE otherwise. Here, @a local_abspath is a "working copy root"
+ * if its parent directory is not a WC or if its parent directory's repository
+ * URL is not the parent of its own repository URL. Thus, a switched subtree is
* considered to be a working copy root. Also, a deleted tree-conflict
* victim is considered a "working copy root" because it has no URL.
*
- * If @a path is not found, return the error #SVN_ERR_ENTRY_NOT_FOUND.
- *
- * Use @a pool for any intermediate allocations.
+ * If @a local_abspath is not found, return the error #SVN_ERR_ENTRY_NOT_FOUND.
*
- * @note Due to the way in which "WC-root-ness" is calculated, passing
- * a @a path of `.' to this function will always return @c TRUE.
+ * Use @a scratch_pool for any temporary allocations.
*
* @since New in 1.7.
*/
@@ -5261,6 +5279,8 @@ svn_wc_is_wc_root2(svn_boolean_t *wc_roo
* Similar to svn_wc_is_wc_root2(), but with an access baton and relative
* path.
*
+ * @note If @a path is '', this function will always return @c TRUE.
+ *
* @deprecated Provided for backward compatibility with the 1.6 API.
*/
SVN_DEPRECATED
@@ -5721,11 +5741,14 @@ svn_wc_get_pristine_props(apr_hash_t **p
apr_pool_t *scratch_pool);
-/** Set @a *value to the value of property @a name for @a path, allocating
- * @a *value in @a pool. If no such prop, set @a *value to @c NULL.
- * @a name may be a regular or wc property; if it is an entry property,
- * return the error #SVN_ERR_BAD_PROP_KIND. @a adm_access is an access
- * baton set that contains @a path.
+/** Set @a *value to the value of property @a name for @a local_abspath,
+ * allocating @a *value in @a result_pool. If no such prop, set @a *value
+ * to @c NULL. @a name may be a regular or wc property; if it is an
+ * entry property, return the error #SVN_ERR_BAD_PROP_KIND. @a wc_ctx
+ * is used to access the working copy.
+ *
+ * If @a local_abspath is not a versioned path, return
+ * #SVN_ERR_WC_PATH_NOT_FOUND
*
* @since New in 1.7.
*/
@@ -5740,6 +5763,8 @@ svn_wc_prop_get2(const svn_string_t **va
/** Similar to svn_wc_prop_get2(), but with a #svn_wc_adm_access_t /
* relative path parameter pair.
*
+ * When @a path is not versioned, set @a *value to NULL.
+ *
* @deprecated Provided for backwards compatibility with the 1.6 API.
*/
SVN_DEPRECATED
@@ -6939,6 +6964,23 @@ svn_wc_revert(const char *path,
void *notify_baton,
apr_pool_t *pool);
+/**
+ * Restores a missing node, @a local_abspath using the @a wc_ctx. Records
+ * the new last modified time of the file for status processing.
+ *
+ * If @a use_commit_times is TRUE, then set restored files' timestamps
+ * to their last-commit-times.
+ *
+ * ### Before Single-DB this function can only restore missing files.
+ *
+ * @since New in 1.7.
+ */
+svn_error_t *
+svn_wc_restore(svn_wc_context_t *wc_ctx,
+ const char *local_abspath,
+ svn_boolean_t use_commit_times,
+ apr_pool_t *scratch_pool);
+
/* Tmp files */
@@ -6980,10 +7022,10 @@ svn_wc_create_tmp_file(apr_file_t **fp,
/* EOL conversion and keyword expansion. */
-/** Set @a xlated_abspath to a translated copy of @a src
+/** Set @a xlated_path to a translated copy of @a src
* or to @a src itself if no translation is necessary.
- * That is, if @a versioned_abspath's properties indicate newline conversion
- * or keyword expansion, point @a *xlated_abspath to a copy of @a src
+ * That is, if @a versioned_file's properties indicate newline conversion or
+ * keyword expansion, point @a *xlated_path to a copy of @a src
* whose newlines and keywords are converted using the translation
* as requested by @a flags.
*
@@ -7000,37 +7042,20 @@ svn_wc_create_tmp_file(apr_file_t **fp,
* #SVN_WC_TRANSLATE_FORCE_COPY flag in @a flags.
*
* This function is generally used to get a file that can be compared
- * meaningfully against @a versioned_abspath's text base, if
- * #SVN_WC_TRANSLATE_TO_NF is specified, against @a versioned_abspath itself
- * if #SVN_WC_TRANSLATE_FROM_NF is specified.
- *
- * The output file is created in the temp file area belonging to
- * @a versioned_abspath. By default it will be deleted at result_pool
- * cleanup. If @a flags includes #SVN_WC_TRANSLATE_NO_OUTPUT_CLEANUP,
- * the default result_pool cleanup handler to remove @a *xlated_abspath is
- * not registered.
- *
- * If an error is returned, the effect on @a *xlated_abspath is undefined.
+ * meaningfully against @a versioned_file's text base, if
+ * @c SVN_WC_TRANSLATE_TO_NF is specified, against @a versioned_file itself
+ * if @c SVN_WC_TRANSLATE_FROM_NF is specified.
+ *
+ * If a new output file is created, it is created in the temp file area
+ * belonging to @a versioned_file. By default it will be deleted at pool
+ * cleanup. If @c SVN_WC_TRANSLATE_NO_OUTPUT_CLEANUP is specified, the
+ * default pool cleanup handler to remove @a *xlated_path is not registered.
+ * If the input file is returned as the output, its lifetime is not
+ * specified.
*
- * @since New in 1.7.
- */
-svn_error_t *
-svn_wc_translated_file3(const char **xlated_abspath,
- const char *src,
- svn_wc_context_t *wc_ctx,
- const char *versioned_abspath,
- apr_uint32_t flags,
- svn_cancel_func_t cancel_func,
- void *cancel_baton,
- apr_pool_t *result_pool,
- apr_pool_t *scratch_pool);
-
-
-/** Similar to svn_wc_translated_file3(), but with an adm_access baton
- * and relative paths instead of a wc_context and absolute paths, with
- * a single pool, and no cancellation func/baton.
+ * If an error is returned, the effect on @a *xlated_path is undefined.
*
- * @since New in 1.4.
+ * @since New in 1.4
* @deprecated Provided for compatibility with the 1.6 API
*/
SVN_DEPRECATED
@@ -7057,10 +7082,9 @@ svn_wc_translated_file(const char **xlat
apr_pool_t *pool);
-/** Set @a stream to a stream allocated in @a result_pool, that will
- * translate *to* normal form while reading, or *from* normal form while
- * writing @a local_abspath. The translation will take the file properties
- * from @a versioned_abspath using @a wc_ctx.
+/** Returns a @a stream allocated in @a pool with access to the given
+ * @a path taking the file properties from @a versioned_file using
+ * @a adm_access.
*
* If @a flags includes #SVN_WC_TRANSLATE_FROM_NF, the stream will
* translate from Normal Form to working copy form while writing to
@@ -7072,24 +7096,8 @@ svn_wc_translated_file(const char **xlat
* The @a flags are the same constants as those used for
* svn_wc_translated_file().
*
- * Use @a scratch_pool for temporary allocations.
- *
- * @since New in 1.7.
- */
-svn_error_t *
-svn_wc_translated_stream2(svn_stream_t **stream,
- svn_wc_context_t *wc_ctx,
- const char *local_abspath,
- const char *versioned_abspath,
- apr_uint32_t flags,
- apr_pool_t *result_pool,
- apr_pool_t *scratch_pool);
-
-/** Similar to svn_wc_translated_stream2(), but with an adm_access baton
- * and relative paths instead of a wc_context and absolute paths.
- *
* @since New in 1.5.
- * @deprecated Provided for compatibility with the 1.6 API
+ * @deprecated Provided for compatibility with the 1.6 API.
*/
SVN_DEPRECATED
svn_error_t *
@@ -7108,14 +7116,6 @@ svn_wc_translated_stream(svn_stream_t **
* matching @a file_baton) through @a editor, then close @a file_baton
* afterwards. Use @a scratch_pool for any temporary allocation.
*
- * If @a tempfile is non-NULL, make a copy of @a local_abspath with keywords
- * and eol translated to repository-normal form, and set @a *tempfile to the
- * absolute path to this copy, allocated in @a result_pool. The copy will
- * be in the temporary-text-base directory. Do not clean up the copy;
- * caller can do that. (The purpose of handing back the tmp copy is that it
- * is usually about to become the new text base anyway, but the installation
- * of the new text base is outside the scope of this function.)
- *
* If @a new_text_base_md5_checksum is non-NULL, set
* @a *new_text_base_md5_checksum to the MD5 checksum of (@a local_abspath
* translated to repository-normal form), allocated in @a result_pool.
@@ -7139,8 +7139,7 @@ svn_wc_translated_stream(svn_stream_t **
* @since New in 1.7.
*/
svn_error_t *
-svn_wc_transmit_text_deltas3(const char **tempfile,
- const svn_checksum_t **new_text_base_md5_checksum,
+svn_wc_transmit_text_deltas3(const svn_checksum_t **new_text_base_md5_checksum,
const svn_checksum_t **new_text_base_sha1_checksum,
svn_wc_context_t *wc_ctx,
const char *local_abspath,
@@ -7154,6 +7153,14 @@ svn_wc_transmit_text_deltas3(const char
* and adm_access baton, and the checksum output is an MD5 digest instead of
* two svn_checksum_t objects.
*
+ * If @a tempfile is non-NULL, make a copy of @a path with keywords
+ * and eol translated to repository-normal form, and set @a *tempfile to the
+ * absolute path to this copy, allocated in @a result_pool. The copy will
+ * be in the temporary-text-base directory. Do not clean up the copy;
+ * caller can do that. (The purpose of handing back the tmp copy is that it
+ * is usually about to become the new text base anyway, but the installation
+ * of the new text base is outside the scope of this function.)
+ *
* @since New in 1.4.
* @deprecated Provided for backwards compatibility with the 1.6 API.
*/
Modified: subversion/branches/ignore-mergeinfo/subversion/libsvn_client/add.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_client/add.c?rev=984468&r1=984467&r2=984468&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_client/add.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_client/add.c Wed Aug 11 16:43:22 2010
@@ -369,78 +369,47 @@ add_dir_recursive(const char *dir_abspat
svn_boolean_t force,
svn_boolean_t no_ignore,
svn_client_ctx_t *ctx,
- apr_pool_t *pool)
+ apr_pool_t *scratch_pool)
{
- apr_dir_t *dir;
- apr_finfo_t this_entry;
svn_error_t *err;
- apr_pool_t *subpool;
- apr_int32_t flags = APR_FINFO_TYPE | APR_FINFO_NAME;
+ apr_pool_t *iterpool;
apr_array_header_t *ignores;
+ apr_hash_t *dirents;
+ apr_hash_index_t *hi;
/* Check cancellation; note that this catches recursive calls too. */
if (ctx->cancel_func)
SVN_ERR(ctx->cancel_func(ctx->cancel_baton));
+ iterpool = svn_pool_create(scratch_pool);
+
/* Add this directory to revision control. */
err = svn_wc_add4(ctx->wc_ctx, dir_abspath, svn_depth_infinity, NULL,
SVN_INVALID_REVNUM, ctx->cancel_func, ctx->cancel_baton,
- ctx->notify_func2, ctx->notify_baton2, pool);
+ ctx->notify_func2, ctx->notify_baton2, iterpool);
if (err && err->apr_err == SVN_ERR_ENTRY_EXISTS && force)
svn_error_clear(err);
else if (err)
return svn_error_return(err);
- subpool = svn_pool_create(pool);
-
if (!no_ignore)
{
SVN_ERR(svn_wc_get_ignores2(&ignores, ctx->wc_ctx, dir_abspath,
- ctx->config, pool, subpool));
+ ctx->config, scratch_pool, iterpool));
}
- SVN_ERR(svn_io_dir_open(&dir, dir_abspath, pool));
+ SVN_ERR(svn_io_get_dirents3(&dirents, dir_abspath, TRUE, scratch_pool,
+ iterpool));
/* Read the directory entries one by one and add those things to
version control. */
- while (1)
+ for (hi = apr_hash_first(scratch_pool, dirents); hi; hi = apr_hash_next(hi))
{
+ const char *name = svn__apr_hash_index_key(hi);
+ svn_io_dirent2_t *dirent = svn__apr_hash_index_val(hi);
const char *abspath;
- svn_pool_clear(subpool);
-
- err = svn_io_dir_read(&this_entry, flags, dir, subpool);
-
- if (err)
- {
- /* Check if we're done reading the dir's entries. */
- if (APR_STATUS_IS_ENOENT(err->apr_err))
- {
- apr_status_t apr_err;
-
- svn_error_clear(err);
- apr_err = apr_dir_close(dir);
- if (apr_err)
- return svn_error_wrap_apr(apr_err,
- _("Can't close directory '%s'"),
- svn_dirent_local_style(dir_abspath,
- subpool));
- break;
- }
- else
- {
- return svn_error_createf(err->apr_err, err,
- _("Error during add of '%s'"),
- svn_dirent_local_style(dir_abspath,
- subpool));
- }
- }
-
- /* Skip entries for this dir and its parent. */
- if (this_entry.name[0] == '.'
- && (this_entry.name[1] == '\0'
- || (this_entry.name[1] == '.' && this_entry.name[2] == '\0')))
- continue;
+ svn_pool_clear(iterpool);
/* Check cancellation so you can cancel during an
* add of a directory with lots of files. */
@@ -448,40 +417,38 @@ add_dir_recursive(const char *dir_abspat
SVN_ERR(ctx->cancel_func(ctx->cancel_baton));
/* Skip over SVN admin directories. */
- if (svn_wc_is_adm_dir(this_entry.name, subpool))
+ if (svn_wc_is_adm_dir(name, iterpool))
continue;
- if ((!no_ignore) && svn_wc_match_ignore_list(this_entry.name,
- ignores, subpool))
+ if ((!no_ignore) && svn_wc_match_ignore_list(name, ignores, iterpool))
continue;
/* Construct the full path of the entry. */
- abspath = svn_dirent_join(dir_abspath, this_entry.name, subpool);
+ abspath = svn_dirent_join(dir_abspath, name, iterpool);
/* Recurse on directories; add files; ignore the rest. */
- if (this_entry.filetype == APR_DIR && depth >= svn_depth_immediates)
+ if (dirent->kind == svn_node_dir && depth >= svn_depth_immediates)
{
svn_depth_t depth_below_here = depth;
if (depth == svn_depth_immediates)
depth_below_here = svn_depth_empty;
SVN_ERR(add_dir_recursive(abspath, depth_below_here,
- force, no_ignore, ctx, subpool));
+ force, no_ignore, ctx, iterpool));
}
- else if (this_entry.filetype != APR_UNKFILE
- && this_entry.filetype != APR_DIR
+ else if ((dirent->kind == svn_node_file || dirent->special)
&& depth >= svn_depth_files)
{
- err = add_file(abspath, ctx, subpool);
+ err = add_file(abspath, ctx, iterpool);
if (err && err->apr_err == SVN_ERR_ENTRY_EXISTS && force)
svn_error_clear(err);
- else if (err)
- return svn_error_return(err);
+ else
+ SVN_ERR(err);
}
}
/* Destroy the per-iteration pool. */
- svn_pool_destroy(subpool);
+ svn_pool_destroy(iterpool);
return SVN_NO_ERROR;
}
@@ -539,6 +506,9 @@ add(void *baton, apr_pool_t *result_pool
/* Go up the directory tree, looking for a versioned directory. If found,
add all the intermediate directories. Otherwise, return
SVN_ERR_CLIENT_NO_VERSIONED_PARENT. */
+/* ### This function needs rewriting into its callers in a style that finds the
+ parent and then acquires an infinite depth lock there for the entire
+ operation */
static svn_error_t *
add_parent_dirs(svn_client_ctx_t *ctx,
const char *local_abspath,
@@ -546,8 +516,10 @@ add_parent_dirs(svn_client_ctx_t *ctx,
{
int format;
const char *parent_abspath;
+ svn_boolean_t own_lock;
+ svn_wc_context_t *wc_ctx = ctx->wc_ctx;
- SVN_ERR(svn_wc_check_wc2(&format, ctx->wc_ctx, local_abspath, scratch_pool));
+ SVN_ERR(svn_wc_check_wc2(&format, wc_ctx, local_abspath, scratch_pool));
if (format > 0)
return SVN_NO_ERROR;
@@ -565,7 +537,15 @@ add_parent_dirs(svn_client_ctx_t *ctx,
parent_abspath = svn_dirent_dirname(local_abspath, scratch_pool);
SVN_ERR(add_parent_dirs(ctx, parent_abspath, scratch_pool));
- SVN_ERR(svn_wc_add4(ctx->wc_ctx, local_abspath, svn_depth_infinity,
+
+ SVN_ERR(svn_wc_locked2(&own_lock, NULL, wc_ctx, parent_abspath,
+ scratch_pool));
+
+ if (!own_lock)
+ SVN_ERR(svn_wc__acquire_write_lock(NULL, wc_ctx, parent_abspath, FALSE,
+ scratch_pool, scratch_pool));
+
+ SVN_ERR(svn_wc_add4(wc_ctx, local_abspath, svn_depth_infinity,
NULL, SVN_INVALID_REVNUM,
ctx->cancel_func, ctx->cancel_baton,
ctx->notify_func2, ctx->notify_baton2,
@@ -573,7 +553,7 @@ add_parent_dirs(svn_client_ctx_t *ctx,
/* ### New dir gets added with its own per-directory lock which we
must release. This code should be redundant when we move to a
single db. */
- SVN_ERR(svn_wc__release_write_lock(ctx->wc_ctx, local_abspath, scratch_pool));
+ SVN_ERR(svn_wc__release_write_lock(wc_ctx, parent_abspath, scratch_pool));
return SVN_NO_ERROR;
}
@@ -593,6 +573,11 @@ svn_client_add4(const char *path,
const char *local_abspath;
struct add_with_write_lock_baton baton;
+ if (svn_path_is_url(path))
+ return svn_error_return(svn_error_createf(SVN_ERR_ILLEGAL_TARGET, NULL,
+ _("'%s' is not a local path"),
+ path));
+
SVN_ERR(svn_dirent_get_absolute(&local_abspath, path, pool));
/* ### this is a hack.
@@ -622,7 +607,8 @@ svn_client_add4(const char *path,
baton.no_ignore = no_ignore;
baton.ctx = ctx;
SVN_ERR(svn_wc__call_with_write_lock(add, &baton, ctx->wc_ctx,
- parent_abspath, pool, pool));
+ parent_abspath, FALSE,
+ pool, pool));
return SVN_NO_ERROR;
}
@@ -667,8 +653,7 @@ add_url_parents(svn_ra_session_t *ra_ses
}
static svn_error_t *
-mkdir_urls(svn_commit_info_t **commit_info_p,
- const apr_array_header_t *urls,
+mkdir_urls(const apr_array_header_t *urls,
svn_boolean_t make_parents,
const apr_hash_t *revprop_table,
svn_client_ctx_t *ctx,
@@ -677,7 +662,6 @@ mkdir_urls(svn_commit_info_t **commit_in
svn_ra_session_t *ra_session = NULL;
const svn_delta_editor_t *editor;
void *edit_baton;
- void *commit_baton;
const char *log_msg;
apr_array_header_t *targets;
apr_hash_t *targets_hash;
@@ -704,9 +688,9 @@ mkdir_urls(svn_commit_info_t **commit_in
const char *first_url = APR_ARRAY_IDX(urls, 0, const char *);
apr_pool_t *iterpool = svn_pool_create(pool);
- SVN_ERR(svn_client__open_ra_session_internal(&ra_session, first_url,
- NULL, NULL, FALSE,
- TRUE, ctx, pool));
+ SVN_ERR(svn_client__open_ra_session_internal(&ra_session, NULL,
+ first_url, NULL, NULL,
+ FALSE, TRUE, ctx, pool));
for (i = 0; i < urls->nelts; i++)
{
@@ -806,8 +790,9 @@ mkdir_urls(svn_commit_info_t **commit_in
/* Open an RA session for the URL. Note that we don't have a local
directory, nor a place to put temp files. */
if (!ra_session)
- SVN_ERR(svn_client__open_ra_session_internal(&ra_session, common, NULL,
- NULL, FALSE, TRUE, ctx, pool));
+ SVN_ERR(svn_client__open_ra_session_internal(&ra_session, NULL, common,
+ NULL, NULL, FALSE, TRUE,
+ ctx, pool));
/* URI-decode each target. */
for (i = 0; i < targets->nelts; i++)
@@ -818,11 +803,10 @@ mkdir_urls(svn_commit_info_t **commit_in
}
/* Fetch RA commit editor */
- SVN_ERR(svn_client__commit_get_baton(&commit_baton, commit_info_p, pool));
SVN_ERR(svn_ra_get_commit_editor3(ra_session, &editor, &edit_baton,
commit_revprops,
- svn_client__commit_callback,
- commit_baton,
+ ctx->commit_callback2,
+ ctx->commit_baton,
NULL, TRUE, /* No lock tokens */
pool));
@@ -880,8 +864,7 @@ svn_client__make_local_parents(const cha
svn_error_t *
-svn_client_mkdir3(svn_commit_info_t **commit_info_p,
- const apr_array_header_t *paths,
+svn_client_mkdir4(const apr_array_header_t *paths,
svn_boolean_t make_parents,
const apr_hash_t *revprop_table,
svn_client_ctx_t *ctx,
@@ -892,8 +875,7 @@ svn_client_mkdir3(svn_commit_info_t **co
if (svn_path_is_url(APR_ARRAY_IDX(paths, 0, const char *)))
{
- SVN_ERR(mkdir_urls(commit_info_p, paths, make_parents,
- revprop_table, ctx, pool));
+ SVN_ERR(mkdir_urls(paths, make_parents, revprop_table, ctx, pool));
}
else
{