You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by cm...@apache.org on 2013/05/10 16:58:56 UTC
svn commit: r1481041 [7/38] - in /subversion/branches/master-passphrase: ./
build/ build/ac-macros/ build/generator/ build/generator/templates/
contrib/client-side/svncopy/ contrib/hook-scripts/
contrib/server-side/fsfsfixer/ contrib/server-side/fsfsfi...
Modified: subversion/branches/master-passphrase/subversion/include/svn_repos.h
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/include/svn_repos.h?rev=1481041&r1=1481040&r2=1481041&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/include/svn_repos.h (original)
+++ subversion/branches/master-passphrase/subversion/include/svn_repos.h Fri May 10 14:58:47 2013
@@ -248,7 +248,7 @@ typedef enum svn_repos_notify_action_t
svn_repos_notify_load_skipped_rev,
/** The structure of a revision is being verified. @since New in 1.8. */
- svn_repos_notify_verify_struc_rev
+ svn_repos_notify_verify_rev_structure
} svn_repos_notify_action_t;
@@ -295,8 +295,7 @@ typedef struct svn_repos_notify_t
* the revision which just completed. */
svn_revnum_t revision;
- /** For #svn_repos_notify_warning, the warning object. Must be cleared
- by the consumer of the notification. */
+ /** For #svn_repos_notify_warning, the warning object. */
const char *warning_str;
svn_repos_notify_warning_t warning;
@@ -440,6 +439,11 @@ svn_repos_create(svn_repos_t **repos_p,
* It does *not* guarantee the most optimized repository state as a
* dump and subsequent load would.
*
+ * @note On some platforms the exclusive lock does not exclude other
+ * threads in the same process so this function should only be called
+ * by a single threaded process, or by a multi-threaded process when
+ * no other threads are accessing the repository.
+ *
* @since New in 1.7.
*/
svn_error_t *
@@ -490,6 +494,26 @@ svn_repos_has_capability(svn_repos_t *re
apr_pool_t *pool);
/**
+ * Return a set capabilities supported by the running Subversion library and by
+ * @a repos. (Capabilities supported by this version of Subversion but not by
+ * @a repos are not listed. This may happen when svn_repos_upgrade2() has not
+ * been called after a software upgrade.)
+ *
+ * The set is represented as a hash whose keys are the set members. The values
+ * are not defined.
+ *
+ * @see svn_repos_info_format()
+ *
+ * @since New in 1.9.
+ */
+svn_error_t *
+svn_repos_capabilities(apr_hash_t **capabilities,
+ svn_repos_t *repos,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool);
+/** @} */
+
+/**
* The capability of doing the right thing with merge-tracking
* information, both storing it and responding to queries about it.
*
@@ -503,6 +527,8 @@ svn_repos_has_capability(svn_repos_t *re
* colons for their own reasons. While this RA limitation has no
* direct impact on repository capabilities, there's no reason to be
* gratuitously different either.
+ *
+ * If you add a capability, update svn_repos_capabilities().
*/
@@ -536,8 +562,8 @@ svn_repos_hotcopy2(const char *src_path,
apr_pool_t *pool);
/**
- * Like svn_repos_hotcopy2(), but without the @a incremental parameter
- * and without cancellation support.
+ * Like svn_repos_hotcopy2(), but with @a incremental always passed as
+ * @c FALSE and without cancellation support.
*
* @deprecated Provided for backward compatibility with the 1.6 API.
*/
@@ -657,19 +683,31 @@ svn_repos_recover(const char *path,
apr_pool_t *pool);
/**
+ * Callback for svn_repos_freeze.
+ *
+ * @since New in 1.8.
+ */
+typedef svn_error_t *(*svn_repos_freeze_func_t)(void *baton, apr_pool_t *pool);
+
+/**
* Take an exclusive lock on each of the repositories in @a paths to
- * prevent commits and then while holding all the locks invoke
- * @a freeze_body passing @a baton. The repositories may be readable
- * by Subversion while frozen, or it may be unreadable, depending on
- * which FS backend the repository uses. Repositories are locked
- * in array order from zero.
+ * prevent commits and then while holding all the locks invoke @a
+ * freeze_func passing @a freeze_baton. Each repository may be readable by
+ * Subversion while frozen, or may be unreadable, depending on which
+ * FS backend the repository uses. Repositories are locked in the
+ * order in which they are specified in the array.
+ *
+ * @note On some platforms the exclusive lock does not exclude other
+ * threads in the same process so this function should only be called
+ * by a single threaded process, or by a multi-threaded process when
+ * no other threads are accessing the repositories.
*
* @since New in 1.8.
*/
svn_error_t *
svn_repos_freeze(apr_array_header_t *paths,
- svn_error_t *(*freeze_body)(void *baton, apr_pool_t *pool),
- void *baton,
+ svn_repos_freeze_func_t freeze_func,
+ void *freeze_baton,
apr_pool_t *pool);
/** This function is a wrapper around svn_fs_berkeley_logfiles(),
@@ -783,24 +821,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.
- * 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, or if the file does not list any
- * environment variables, hooks will run in an empty environment.
+/** Specify that Subversion should consult the configuration file
+ * located at @a hooks_env_path to determine how to setup the
+ * environment for hook scripts invoked for the repository @a repos.
+ * As a special case, if @a hooks_env_path is @c NULL, look for the
+ * file in its default location within the repository disk structure.
+ * If @a hooks_env_path is not absolute, it specifies a path relative
+ * to the parent of the file's default location.
+ *
+ * Use @a scratch_pool for temporary allocations.
+ *
+ * If this function is not called, or if the specified configuration
+ * file does not define any environment variables, hooks will run in
+ * an empty environment.
*
- * @since New in 1.8. */
+ * @since New in 1.8.
+ */
svn_error_t *
svn_repos_hooks_setenv(svn_repos_t *repos,
const char *hooks_env_path,
- apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
/** @} */
@@ -847,12 +886,17 @@ 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.
+ * @a zero_copy_limit controls the maximum size (in bytes) at which
+ * 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 block, so be careful
+ * when using larger values here. Pass 0 for @a zero_copy_limit to
+ * disable this optimization altogether.
+ *
+ * @a note Never activate this optimization if @a editor might access
+ * any FSFS data structures (and, hence, caches). So, it is basically
+ * safe for networked editors only.
*
* All allocation for the context and collected state will occur in
* @a pool.
@@ -907,13 +951,13 @@ svn_repos_begin_report3(void **report_ba
apr_pool_t *pool);
/**
- * The same as svn_repos_begin_report3(), but setting the @a zero_copy_limit
- * to 0.
+ * The same as svn_repos_begin_report3(), but with @a zero_copy_limit
+ * always passed as 0.
*
* @since New in 1.5.
- *
* @deprecated Provided for backward compatibility with the 1.7 API.
*/
+SVN_DEPRECATED
svn_error_t *
svn_repos_begin_report2(void **report_baton,
svn_revnum_t revnum,
@@ -1215,6 +1259,8 @@ svn_repos_abort_report(void *report_bato
* ### reporter instead; there are some stray references to the
* ### svn_repos_dir_delta[2] in comments which should probably
* ### actually refer to the reporter.
+ *
+ * @since New in 1.5.
*/
svn_error_t *
svn_repos_dir_delta2(svn_fs_root_t *src_root,
@@ -2349,7 +2395,6 @@ svn_repos_fs_change_txn_props(svn_fs_txn
const apr_array_header_t *props,
apr_pool_t *pool);
-/** @} */
/* ---------------------------------------------------------------*/
@@ -2440,6 +2485,27 @@ svn_repos_node_editor(const svn_delta_ed
svn_repos_node_t *
svn_repos_node_from_baton(void *edit_baton);
+/**
+ * Return repository format information for @a repos.
+ *
+ * Set @a *repos_format to the repository format number of @a repos, which is
+ * an integer that increases when incompatible changes are made (such as
+ * by #svn_repos_upgrade).
+ *
+ * Set @a *supports_version to the version number of the minimum Subversion GA
+ * release that can read and write @a repos.
+ *
+ * @see svn_fs_info_format(), svn_repos_capabilities()
+ *
+ * @since New in 1.9.
+ */
+svn_error_t *
+svn_repos_info_format(int *repos_format,
+ svn_version_t **supports_version,
+ svn_repos_t *repos,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool);
+
/** @} */
/* ---------------------------------------------------------------*/
@@ -2686,13 +2752,6 @@ svn_repos_dump_fs(svn_repos_t *repos,
* @a cancel_baton as argument to see if the client wishes to cancel
* the load.
*
- * @note If @a start_rev and @a end_rev are valid revisions, this
- * function presumes the revisions as numbered in @a dumpstream only
- * increase from the beginning of the stream to the end. Gaps in the
- * number sequence are ignored, but upon finding a revision number
- * younger than the specified range, this function may stop loading
- * new revisions regardless of their number.
- *
* @since New in 1.8.
*/
svn_error_t *
@@ -2941,13 +3000,6 @@ svn_repos_parse_dumpstream3(svn_stream_t
* loaded nodes, from root to @a parent_dir. The directory @a parent_dir
* must be an existing directory in the repository.
*
- * @note If @a start_rev and @a end_rev are valid revisions, this
- * function presumes the revisions as numbered in @a dumpstream only
- * increase from the beginning of the stream to the end. Gaps in the
- * number sequence are ignored, but upon finding a revision number
- * younger than the specified range, this function may stop loading
- * new revisions regardless of their number.
- *
* @since New in 1.8.
*/
svn_error_t *
@@ -3157,28 +3209,12 @@ svn_repos_get_fs_build_parser(const svn_
*/
typedef struct svn_authz_t svn_authz_t;
-/**
- * Similar to svn_repos_authz_read2(), but without support for
- * authz files stored in a Subversion repository (absolute or
- * relative URLs) and without the @a repos_root argument.
- *
- * @since New in 1.3.
- * @deprecated Provided for backward compatibility with the 1.7 API.
- */
-SVN_DEPRECATED
-svn_error_t *
-svn_repos_authz_read(svn_authz_t **authz_p,
- const char *file,
- svn_boolean_t must_exist,
- apr_pool_t *pool);
-
/**
- * Read authz configuration data from @a path (a file, repos relative
- * url, an absolute file url, or a registry path) into @a *authz_p,
- * allocated in @a pool.
+ * Read authz configuration data from @a path (a dirent, an absolute file url
+ * or a registry path) into @a *authz_p, allocated in @a pool.
*
- * If @a groups_path (a file, repos relative url, an absolute file url,
- * or a registry path) is set, use the global groups parsed from it.
+ * If @a groups_path (a dirent, an absolute file url, or a registry path) is
+ * set, use the global groups parsed from it.
*
* If @a path or @a groups_path is not a valid authz rule file, then return
* #SVN_ERR_AUTHZ_INVALID_CONFIG. The contents of @a *authz_p is then
@@ -3186,32 +3222,41 @@ svn_repos_authz_read(svn_authz_t **authz
* is also an error other than #SVN_ERR_AUTHZ_INVALID_CONFIG (exact error
* depends on the access type).
*
- * If @a path is a repos relative URL then @a repos_root must be set to
- * the root of the repository the authz configuration will be used with.
- * The same applies to @a groups_path if it is being used.
- *
- * @since New in 1.8
+ * @since New in 1.8.
*/
svn_error_t *
svn_repos_authz_read2(svn_authz_t **authz_p,
const char *path,
const char *groups_path,
svn_boolean_t must_exist,
- const char *repos_root,
apr_pool_t *pool);
/**
+ * Similar to svn_repos_authz_read2(), but with @a groups_path and @a
+ * repos_root always passed as @c NULL.
+ *
+ * @since New in 1.3.
+ * @deprecated Provided for backward compatibility with the 1.7 API.
+ */
+SVN_DEPRECATED
+svn_error_t *
+svn_repos_authz_read(svn_authz_t **authz_p,
+ const char *file,
+ svn_boolean_t must_exist,
+ apr_pool_t *pool);
+
+/**
* Read authz configuration data from @a stream into @a *authz_p,
* allocated in @a pool.
*
* If @a groups_stream is set, use the global groups parsed from it.
*
- * @since New in 1.8
+ * @since New in 1.8.
*/
svn_error_t *
svn_repos_authz_parse(svn_authz_t **authz_p,
- svn_stream_t *stream,
+ svn_stream_t *stream,
svn_stream_t *groups_stream,
apr_pool_t *pool);
@@ -3383,7 +3428,6 @@ svn_repos_remember_client_capabilities(s
const apr_array_header_t *capabilities);
-
#ifdef __cplusplus
}
#endif /* __cplusplus */
Modified: subversion/branches/master-passphrase/subversion/include/svn_sorts.h
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/include/svn_sorts.h?rev=1481041&r1=1481040&r2=1481041&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/include/svn_sorts.h (original)
+++ subversion/branches/master-passphrase/subversion/include/svn_sorts.h Fri May 10 14:58:47 2013
@@ -209,6 +209,8 @@ svn_sort__array_delete(apr_array_header_
int elements_to_delete);
/* Reverse the order of elements in @a array, in place.
+ *
+ * @note Private. For use by Subversion's own code only.
*/
void
svn_sort__array_reverse(apr_array_header_t *array,
Modified: subversion/branches/master-passphrase/subversion/include/svn_string.h
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/include/svn_string.h?rev=1481041&r1=1481040&r2=1481041&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/include/svn_string.h (original)
+++ subversion/branches/master-passphrase/subversion/include/svn_string.h Fri May 10 14:58:47 2013
@@ -328,6 +328,8 @@ svn_stringbuf_appendcstr(svn_stringbuf_t
* Reallocs if necessary. @a str is affected, nothing else is.
*
* @note The inserted string may be a sub-range if @a str.
+ *
+ * @since New in 1.8.
*/
void
svn_stringbuf_insert(svn_stringbuf_t *str,
@@ -340,17 +342,25 @@ svn_stringbuf_insert(svn_stringbuf_t *st
* 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.
+ *
+ * @since New in 1.8.
*/
void
svn_stringbuf_remove(svn_stringbuf_t *str,
apr_size_t pos,
apr_size_t count);
-/** Faster but functionally equivalent to the following sequence:
+/** Replace in @a str the substring which starts at @a pos and is @a
+ * old_count bytes long with a new substring @a bytes (which is @a
+ * new_count bytes long).
+ *
+ * This is faster but functionally equivalent to the following sequence:
* @code
- * svn_stringbuf_remove(str, pos, old_count);
- * svn_stringbuf_insert(str, pos, bytes, new_count);
+ svn_stringbuf_remove(str, pos, old_count);
+ svn_stringbuf_insert(str, pos, bytes, new_count);
* @endcode
+ *
+ * @since New in 1.8.
*/
void
svn_stringbuf_replace(svn_stringbuf_t *str,
@@ -397,9 +407,11 @@ svn_string_compare_stringbuf(const svn_s
* @{
*/
-/** Divide @a input into substrings along @a sep_chars boundaries, return an
- * array of copies of those substrings (plain const char*), allocating both
- * the array and the copies in @a pool.
+/** Divide @a input into substrings, interpreting any char from @a sep
+ * as a token separator.
+ *
+ * Return an array of copies of those substrings (plain const char*),
+ * allocating both the array and the copies in @a pool.
*
* None of the elements added to the array contain any of the
* characters in @a sep_chars, and none of the new elements are empty
@@ -447,7 +459,7 @@ svn_cstring_match_list(const char *str,
* if no token is left. Modifies @a str such that the next call will return
* the next token.
*
- * Note that the content of @a *str may be modified by this function.
+ * @note The content of @a *str may be modified by this function.
*
* @since New in 1.8.
*/
Modified: subversion/branches/master-passphrase/subversion/include/svn_subst.h
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/include/svn_subst.h?rev=1481041&r1=1481040&r2=1481041&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/include/svn_subst.h (original)
+++ subversion/branches/master-passphrase/subversion/include/svn_subst.h Fri May 10 14:58:47 2013
@@ -127,13 +127,32 @@ typedef struct svn_subst_keywords_t
* Set @a *kw to a new keywords hash filled with the appropriate contents
* given a @a keywords_string (the contents of the svn:keywords
* property for the file in question), the revision @a rev, the @a url,
- * the @a date the file was committed on, and the @a author of the last
- * commit.
+ * the @a date the file was committed on, the @a author of the last
+ * commit, and the URL of the repository root @a repos_root_url.
*
- * Any of the inputs @a rev, @a url, @a date and @a author can be @c NULL,
- * or @c 0 for @a date, to indicate that the information is not present.
- * Each piece of information that is not present expands to the empty
- * string wherever it appears in an expanded keyword value. (This can
+ * Custom keywords defined in svn:keywords properties are expanded
+ * using the provided parameters and in accordance with the following
+ * format substitutions in the @a keywords_string:
+ * %a - The author.
+ * %b - The basename of the URL.
+ * %d - Short format of the date.
+ * %D - Long format of the date.
+ * %P - The file's path, relative to the repository root URL.
+ * %r - The revision.
+ * %R - The URL to the root of the repository.
+ * %u - The URL of the file.
+ * %_ - A space (keyword definitions cannot contain a literal space).
+ * %% - A literal '%'.
+ * %H - Equivalent to %P%_%r%_%d%_%a.
+ * %I - Equivalent to %b%_%r%_%d%_%a.
+ *
+ * Custom keywords are defined by appending '=' to the keyword name, followed
+ * by a string containing any combination of the format substitutions.
+ *
+ * Any of the inputs @a rev, @a url, @a date, @a author, and @a repos_root_url
+ * can be @c NULL, or @c 0 for @a date, to indicate that the information is
+ * not present. Each piece of information that is not present expands to the
+ * empty string wherever it appears in an expanded keyword value. (This can
* result in multiple adjacent spaces in the expansion of a multi-valued
* keyword such as "Id".)
*
@@ -142,8 +161,26 @@ typedef struct svn_subst_keywords_t
*
* All memory is allocated out of @a pool.
*
+ * @since New in 1.8.
+ */
+svn_error_t *
+svn_subst_build_keywords3(apr_hash_t **kw,
+ const char *keywords_string,
+ const char *rev,
+ const char *url,
+ const char *repos_root_url,
+ apr_time_t date,
+ const char *author,
+ apr_pool_t *pool);
+
+/** Similar to svn_subst_build_keywords3() except that it does not accept
+ * the @a repos_root_url parameter and hence supports less substitutions,
+ * and also does not support custom keyword definitions.
+ *
* @since New in 1.3.
+ * @deprecated Provided for backward compatibility with the 1.7 API.
*/
+SVN_DEPRECATED
svn_error_t *
svn_subst_build_keywords2(apr_hash_t **kw,
const char *keywords_string,
Modified: subversion/branches/master-passphrase/subversion/include/svn_types.h
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/include/svn_types.h?rev=1481041&r1=1481040&r2=1481041&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/include/svn_types.h (original)
+++ subversion/branches/master-passphrase/subversion/include/svn_types.h Fri May 10 14:58:47 2013
@@ -29,6 +29,7 @@
/* ### this should go away, but it causes too much breakage right now */
#include <stdlib.h>
+#include <limits.h> /* for ULONG_MAX */
#include <apr.h> /* for apr_size_t, apr_int64_t, ... */
#include <apr_errno.h> /* for apr_status_t */
@@ -216,33 +217,7 @@ svn__apr_hash_index_val(const apr_hash_i
-/** A node kind.
- *
- * @since New in 1.8. Replaces svn_node_kind_t.
- */
-typedef enum svn_kind_t
-{
- /** something's here, but we don't know what */
- svn_kind_unknown,
-
- /** absent */
- svn_kind_none,
-
- /** regular file */
- svn_kind_file,
-
- /** directory */
- svn_kind_dir,
-
- /** symbolic link */
- svn_kind_symlink
-
-} svn_kind_t;
-
-/** The various types of nodes in the Subversion filesystem.
- *
- * This type is superseded by #svn_kind_t and will be deprecated when
- * transition to the new type is complete. */
+/** The various types of nodes in the Subversion filesystem. */
typedef enum svn_node_kind_t
{
/** absent */
@@ -255,7 +230,14 @@ typedef enum svn_node_kind_t
svn_node_dir,
/** something's here, but we don't know what */
- svn_node_unknown
+ svn_node_unknown,
+
+ /**
+ * symbolic link
+ * @note This value is not currently used by the public API.
+ * @since New in 1.8.
+ */
+ svn_node_symlink
} svn_node_kind_t;
/** Return a constant string expressing @a kind as an English word, e.g.,
@@ -277,24 +259,6 @@ svn_node_kind_to_word(svn_node_kind_t ki
svn_node_kind_t
svn_node_kind_from_word(const char *word);
-/** Return the #svn_node_kind_t corresponding to the given #svn_kind_t;
- * #svn_kind_symlink will become #svn_node_file.
- *
- * @since New in 1.8.
- */
-svn_node_kind_t
-svn__node_kind_from_kind(svn_kind_t kind);
-
-/** Return the #svn_kind_t corresponding to the given #svn_node_kind_t,
- * or #svn_kind_symlink if @a is_symlink is true.
- *
- * @since New in 1.8.
- */
-svn_kind_t
-svn__kind_from_node_kind(svn_node_kind_t kind,
- svn_boolean_t is_symlink);
-
-
/** Generic three-state property to represent an unknown value for values
* that are just like booleans. The values have been set deliberately to
Modified: subversion/branches/master-passphrase/subversion/include/svn_utf.h
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/include/svn_utf.h?rev=1481041&r1=1481040&r2=1481041&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/include/svn_utf.h (original)
+++ subversion/branches/master-passphrase/subversion/include/svn_utf.h Fri May 10 14:58:47 2013
@@ -67,11 +67,12 @@ svn_utf_initialize2(apr_pool_t *pool,
svn_boolean_t assume_native_utf8);
/**
- * Like svn_utf_initialize but without the ability to force the
+ * Like svn_utf_initialize2() but without the ability to force the
* native encoding to UTF-8.
*
* @deprecated Provided for backward compatibility with the 1.7 API.
*/
+SVN_DEPRECATED
void
svn_utf_initialize(apr_pool_t *pool);
@@ -238,7 +239,9 @@ svn_utf_cstring_from_utf8_string(const c
/** Return the display width of UTF-8-encoded C string @a cstr.
* If the string is not printable or invalid UTF-8, return -1.
- * @since New in 1.8. */
+ *
+ * @since New in 1.8.
+ */
int
svn_utf_cstring_utf8_width(const char *cstr);
Modified: subversion/branches/master-passphrase/subversion/include/svn_version.h
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/include/svn_version.h?rev=1481041&r1=1481040&r2=1481041&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/include/svn_version.h (original)
+++ subversion/branches/master-passphrase/subversion/include/svn_version.h Fri May 10 14:58:47 2013
@@ -63,7 +63,7 @@ extern "C" {
* Modify when new functionality is added or new interfaces are
* defined, but all changes are backward compatible.
*/
-#define SVN_VER_MINOR 8
+#define SVN_VER_MINOR 9
/**
* Patch number.
@@ -258,7 +258,7 @@ svn_subr_version(void);
/**
- * Extended version infomation, including info about the running system.
+ * Extended version information, including info about the running system.
*
* @since New in 1.8.
*/
@@ -266,7 +266,7 @@ typedef struct svn_version_extended_t sv
/**
* Return version information for the running program. If @a verbose
- * is true, collect extra information that may be expensive to
+ * 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.
*
Modified: subversion/branches/master-passphrase/subversion/include/svn_wc.h
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/include/svn_wc.h?rev=1481041&r1=1481040&r2=1481041&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/include/svn_wc.h (original)
+++ subversion/branches/master-passphrase/subversion/include/svn_wc.h Fri May 10 14:58:47 2013
@@ -1247,13 +1247,13 @@ typedef enum svn_wc_notify_action_t
* @since New in 1.8. */
svn_wc_notify_left_local_modifications,
- /** A copy from a foreign repository has started
+ /** A copy from a foreign repository has started
* @since New in 1.8. */
svn_wc_notify_foreign_copy_begin,
/** A move in the working copy has been broken, i.e. degraded into a
* copy + delete. The notified path is the move source (the deleted path).
- * ### Provide path to move destination as well?
+ * ### TODO: Provide path to move destination as well?
* @since New in 1.8. */
svn_wc_notify_move_broken
@@ -1672,10 +1672,10 @@ typedef struct svn_wc_conflict_version_t
const char *path_in_repos;
/** @} */
- /** The node kind. Can be any kind, even 'none' or 'unknown'. */
+ /** The node kind. Can be any kind, including 'none' or 'unknown'. */
svn_node_kind_t node_kind;
- /** UUID of the repository. Can be NULL meaning unknown.
+ /** UUID of the repository (or NULL if unknown.)
* @since New in 1.8. */
const char *repos_uuid;
@@ -2109,9 +2109,8 @@ typedef struct svn_wc_conflict_result_t
* Allocate an #svn_wc_conflict_result_t structure in @a pool,
* initialize and return it.
*
- * Set the @c choice field of the structure to @a choice, and @c
- * merged_file to @a merged_file. Set all other fields to their @c
- * _unknown, @c NULL or invalid value, respectively. Make only a shallow
+ * Set the @c choice field of the structure to @a choice, @c merged_file
+ * to @a merged_file, and @c save_merged to false. Make only a shallow
* copy of the pointer argument @a merged_file.
*
* @since New in 1.5.
@@ -3740,7 +3739,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.
+ /** @c TRUE iff the item is a file brought in by an svn:externals definition.
* @since New in 1.8. */
svn_boolean_t file_external;
@@ -4423,6 +4422,7 @@ svn_wc_copy(const char *src,
* @deprecated Provided for backward compatibility with the 1.7 API.
* @see svn_client_move7()
*/
+SVN_DEPRECATED
svn_error_t *
svn_wc_move(svn_wc_context_t *wc_ctx,
const char *src_abspath,
@@ -4570,9 +4570,13 @@ svn_wc_add_from_disk2(svn_wc_context_t *
/**
- * Similar to svn_wc_add4(), but gives the new node an empty set of properties.
+ * Similar to svn_wc_add_from_disk2(), but always passes NULL for @a
+ * props.
*
- * This is a replacement for svn_wc_add4() case 2a.
+ * This is a replacement for svn_wc_add4() case 2a (which see for
+ * details).
+
+ * @see svn_wc_add4()
*
* @since New in 1.7.
* @deprecated Provided for backward compatibility with the 1.7 API.
@@ -5457,7 +5461,7 @@ svn_wc_crawl_revisions(const char *path,
svn_error_t *
svn_wc_check_root(svn_boolean_t *is_wcroot,
svn_boolean_t *is_switched,
- svn_kind_t *kind,
+ svn_node_kind_t *kind,
svn_wc_context_t *wc_ctx,
const char *local_abspath,
apr_pool_t *scratch_pool);
@@ -5671,6 +5675,10 @@ typedef svn_error_t *(*svn_wc_dirents_fu
* the ambient depth filtering, so this doesn't have to be handled in the
* editor.
*
+ * If @a clean_checkout is TRUE, assume that we are checking out into an
+ * empty directory, and so bypass a number of conflict checks that are
+ * unnecessary in this case.
+ *
* If @a fetch_dirents_func is not NULL, the update editor may call this
* callback, when asked to perform a depth restricted update. It will do this
* before returning the editor to allow using the primary ra session for this.
@@ -6760,13 +6768,13 @@ typedef enum svn_wc_merge_outcome_t
* svn_diff_file_options_parse()). @a merge_options must contain
* <tt>const char *</tt> elements.
*
- * If @a merge_props_state is non-NULL @a prop_diff is merged before
- * merging the text. (If @a merge_props_state is NULL, no property changes
- * are merged and @a prop_diff is only used to determine the merge result)
- * The result of the property merge is stored in @a *merge_props_state. If
- * there is a conflict and @a dry_run is @c FALSE, then attempt to call @a
- * conflict_func with @a conflict_baton (if non-NULL). If the conflict
- * callback cannot resolve the conflict, then a property conflict is installed.
+ * If @a merge_props_state is non-NULL, merge @a prop_diff into the
+ * working properties before merging the text. (If @a merge_props_state
+ * is NULL, do not merge any property changes; in this case, @a prop_diff
+ * is only used to help determine the text merge result.) Handle any
+ * conflicts as described for svn_wc_merge_props3(), with the parameters
+ * @a dry_run, @a conflict_func and @a conflict_baton. Return the
+ * outcome of the property merge in @a *merge_props_state.
*
* The outcome of the text merge is returned in @a *merge_content_outcome. If
* there is a conflict and @a dry_run is @c FALSE, then attempt to call @a
@@ -6840,9 +6848,12 @@ svn_wc_merge5(enum svn_wc_merge_outcome_
void *cancel_baton,
apr_pool_t *scratch_pool);
-/** Similar to svn_wc_merge5() but doesn't merge property changes. Instead of
- * handling this in a single operation, a separate call to svn_wc_merge_props3()
- * before calling svn_wc_merge4() is needed
+/** Similar to svn_wc_merge5() but with @a merge_props_state and @a
+ * original_props always passed as NULL.
+ *
+ * Unlike svn_wc_merge5(), this function doesn't merge property
+ * changes. Callers of this function must first use
+ * svn_wc_merge_props3() to get this functionality.
*
* @since New in 1.7.
* @deprecated Provided for backwards compatibility with the 1.7 API.
@@ -6953,9 +6964,12 @@ svn_wc_merge(const char *left,
* If @a state is non-NULL, set @a *state to the state of the properties
* after the merge.
*
- * If conflicts are found when merging working properties, they are
- * described in a temporary .prej file (or appended to an already-existing
- * .prej file), and the entry is marked "conflicted".
+ * If a conflict is found when merging a property, and @a dry_run is
+ * false and @a conflict_func is not null, then call @a conflict_func
+ * with @a conflict_baton and a description of the conflict. If any
+ * conflicts are not resolved by such callbacks, describe the unresolved
+ * conflicts in a temporary .prej file (or append to an already-existing
+ * .prej file) and mark the path as conflicted in the WC DB.
*
* If @a cancel_func is non-NULL, invoke it with @a cancel_baton at various
* points during the operation. If it returns an error (typically
@@ -8113,7 +8127,7 @@ svn_wc_exclude(svn_wc_context_t *wc_ctx,
* Set @a kind to the #svn_node_kind_t of @a abspath. Use @a wc_ctx to access
* the working copy, and @a scratch_pool for all temporary allocations.
*
- * If @a abspath is not under version control, set @a kind to #svn_kind_none.
+ * If @a abspath is not under version control, set @a kind to #svn_node_none.
*
* If @a show_hidden and @a show_deleted are both @c FALSE, the kind of
* scheduled for delete, administrative only 'not present' and excluded
@@ -8143,8 +8157,8 @@ svn_wc_read_kind2(svn_node_kind_t *kind,
svn_boolean_t show_hidden,
apr_pool_t *scratch_pool);
-/** Similar to svn_wc_read_kind2() but always shows deleted nodes and returns
- * the result as a #svn_node_kind_t.
+/** Similar to svn_wc_read_kind2() but with @a show_deleted always
+ * passed as TRUE.
*
* @since New in 1.7.
* @deprecated Provided for backward compatibility with the 1.7 API.
Modified: subversion/branches/master-passphrase/subversion/libsvn_auth_gnome_keyring/gnome_keyring.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/libsvn_auth_gnome_keyring/gnome_keyring.c?rev=1481041&r1=1481040&r2=1481041&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/libsvn_auth_gnome_keyring/gnome_keyring.c (original)
+++ subversion/branches/master-passphrase/subversion/libsvn_auth_gnome_keyring/gnome_keyring.c Fri May 10 14:58:47 2013
@@ -29,9 +29,13 @@
#include <apr_pools.h>
#include <apr_strings.h>
+#include <glib.h>
+#include <gnome-keyring.h>
+
#include "svn_auth.h"
#include "svn_config.h"
#include "svn_error.h"
+#include "svn_hash.h"
#include "svn_pools.h"
#include "svn_base64.h"
@@ -39,8 +43,6 @@
#include "svn_private_config.h"
-#include <glib.h>
-#include <gnome-keyring.h>
/*-----------------------------------------------------------------------*/
@@ -244,13 +246,11 @@ ensure_gnome_keyring_is_unlocked(svn_boo
if (! non_interactive)
{
svn_auth_gnome_keyring_unlock_prompt_func_t unlock_prompt_func =
- apr_hash_get(parameters,
- SVN_AUTH_PARAM_GNOME_KEYRING_UNLOCK_PROMPT_FUNC,
- APR_HASH_KEY_STRING);
+ svn_hash_gets(parameters,
+ SVN_AUTH_PARAM_GNOME_KEYRING_UNLOCK_PROMPT_FUNC);
void *unlock_prompt_baton =
- apr_hash_get(parameters,
- SVN_AUTH_PARAM_GNOME_KEYRING_UNLOCK_PROMPT_BATON,
- APR_HASH_KEY_STRING);
+ svn_hash_gets(parameters,
+ SVN_AUTH_PARAM_GNOME_KEYRING_UNLOCK_PROMPT_BATON);
char *keyring_password;
@@ -299,9 +299,7 @@ password_get_gnome_keyring(svn_boolean_t
SVN_ERR(ensure_gnome_keyring_is_unlocked(non_interactive, parameters, pool));
- if (! apr_hash_get(parameters,
- "gnome-keyring-opening-failed",
- APR_HASH_KEY_STRING))
+ if (! svn_hash_gets(parameters, "gnome-keyring-opening-failed"))
{
result = gnome_keyring_find_network_password_sync(username, realmstring,
NULL, NULL, NULL, NULL,
@@ -331,10 +329,7 @@ password_get_gnome_keyring(svn_boolean_t
}
else
{
- apr_hash_set(parameters,
- "gnome-keyring-opening-failed",
- APR_HASH_KEY_STRING,
- "");
+ svn_hash_sets(parameters, "gnome-keyring-opening-failed", "");
}
return SVN_NO_ERROR;
@@ -359,9 +354,7 @@ password_set_gnome_keyring(svn_boolean_t
SVN_ERR(ensure_gnome_keyring_is_unlocked(non_interactive, parameters, pool));
- if (! apr_hash_get(parameters,
- "gnome-keyring-opening-failed",
- APR_HASH_KEY_STRING))
+ if (! svn_hash_gets(parameters, "gnome-keyring-opening-failed"))
{
result = gnome_keyring_set_network_password_sync(NULL, /* default keyring */
username, realmstring,
@@ -375,10 +368,7 @@ password_set_gnome_keyring(svn_boolean_t
}
if (result != GNOME_KEYRING_RESULT_OK)
{
- apr_hash_set(parameters,
- "gnome-keyring-opening-failed",
- APR_HASH_KEY_STRING,
- "");
+ svn_hash_sets(parameters, "gnome-keyring-opening-failed", "");
}
*done = (result == GNOME_KEYRING_RESULT_OK);
Modified: subversion/branches/master-passphrase/subversion/libsvn_auth_kwallet/kwallet.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/libsvn_auth_kwallet/kwallet.cpp?rev=1481041&r1=1481040&r2=1481041&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/libsvn_auth_kwallet/kwallet.cpp (original)
+++ subversion/branches/master-passphrase/subversion/libsvn_auth_kwallet/kwallet.cpp Fri May 10 14:58:47 2013
@@ -33,6 +33,17 @@
#include <apr_pools.h>
#include <apr_strings.h>
+
+#include <dbus/dbus.h>
+#include <QtCore/QCoreApplication>
+#include <QtCore/QString>
+
+#include <kaboutdata.h>
+#include <kcmdlineargs.h>
+#include <kcomponentdata.h>
+#include <klocalizedstring.h>
+#include <kwallet.h>
+
#include "svn_auth.h"
#include "svn_config.h"
#include "svn_error.h"
@@ -46,17 +57,7 @@
#include "svn_private_config.h"
-#include <dbus/dbus.h>
-#include <QtCore/QCoreApplication>
-#include <QtCore/QString>
-
-#include <kaboutdata.h>
-#include <kcmdlineargs.h>
-#include <kcomponentdata.h>
-#include <klocalizedstring.h>
-#include <kwallet.h>
-
/*-----------------------------------------------------------------------*/
/* KWallet simple provider, puts passwords in KWallet */
/*-----------------------------------------------------------------------*/
Modified: subversion/branches/master-passphrase/subversion/libsvn_client/add.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/libsvn_client/add.c?rev=1481041&r1=1481040&r2=1481041&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/libsvn_client/add.c (original)
+++ subversion/branches/master-passphrase/subversion/libsvn_client/add.c Fri May 10 14:58:47 2013
@@ -176,8 +176,7 @@ get_auto_props_for_pattern(apr_hash_t *p
propval_str->data = propval;
propval_str->len = strlen(propval);
- apr_hash_set(properties, propname, APR_HASH_KEY_STRING,
- propval_str);
+ svn_hash_sets(properties, propname, propval_str);
if (strcmp(propname, SVN_PROP_MIME_TYPE) == 0)
*mimetype = propval;
else if (strcmp(propname, SVN_PROP_EXECUTABLE) == 0)
@@ -287,8 +286,8 @@ add_file(const char *local_abspath,
{
mimetype = NULL;
properties = apr_hash_make(pool);
- apr_hash_set(properties, SVN_PROP_SPECIAL, APR_HASH_KEY_STRING,
- svn_string_create(SVN_PROP_BOOLEAN_TRUE, pool));
+ svn_hash_sets(properties, SVN_PROP_SPECIAL,
+ svn_string_create(SVN_PROP_BOOLEAN_TRUE, pool));
}
else
{
@@ -343,9 +342,9 @@ add_file(const char *local_abspath,
* If IGNORES is not NULL, then it is an array of const char * ignore patterns
* that apply to any children of DIR_ABSPATH. If REFRESH_IGNORES is TRUE, then
* the passed in value of IGNORES (if any) is itself ignored and this function
- * will gather all ignore patterns applicable to DIR_ABSPATH itself. Any
- * recursive calls to this function get the refreshed ignore patterns. If
- * IGNORES is NULL and REFRESH_IGNORES is FALSE, then all children of DIR_ABSPATH
+ * will gather all ignore patterns applicable to DIR_ABSPATH itself (allocated in
+ * RESULT_POOL). Any recursive calls to this function get the refreshed ignore
+ * patterns. If IGNORES is NULL and REFRESH_IGNORES is FALSE, then all children of DIR_ABSPATH
* are unconditionally added.
*
* If CTX->CANCEL_FUNC is non-null, call it with CTX->CANCEL_BATON to allow
@@ -363,6 +362,7 @@ add_dir_recursive(const char *dir_abspat
svn_boolean_t refresh_ignores,
apr_array_header_t *ignores,
svn_client_ctx_t *ctx,
+ apr_pool_t *result_pool,
apr_pool_t *scratch_pool)
{
svn_error_t *err;
@@ -377,11 +377,6 @@ add_dir_recursive(const char *dir_abspat
iterpool = svn_pool_create(scratch_pool);
- if (refresh_ignores)
- SVN_ERR(svn_client__get_all_ignores(&ignores, dir_abspath,
- ctx, scratch_pool,
- iterpool));
-
/* Add this directory to revision control. */
err = svn_wc_add_from_disk2(ctx->wc_ctx, dir_abspath, NULL /*props*/,
ctx->notify_func2, ctx->notify_baton2,
@@ -399,6 +394,12 @@ add_dir_recursive(const char *dir_abspat
}
}
+ /* Fetch ignores after adding to handle ignores on the directory itself
+ and ancestors via the single db optimization in libsvn_wc */
+ if (refresh_ignores)
+ SVN_ERR(svn_wc_get_ignores2(&ignores, ctx->wc_ctx, dir_abspath,
+ ctx->config, result_pool, iterpool));
+
/* If DIR_ABSPATH is the root of an unversioned subtree then get the
following "autoprops":
@@ -463,7 +464,7 @@ add_dir_recursive(const char *dir_abspat
force, no_autoprops,
magic_cookie, config_autoprops,
refresh_ignores, ignores, ctx,
- iterpool));
+ result_pool, iterpool));
}
else if ((dirent->kind == svn_node_file || dirent->special)
&& depth >= svn_depth_files)
@@ -542,8 +543,8 @@ all_auto_props_collector(const char *nam
if (len > 0)
{
- apr_hash_t *pattern_hash = apr_hash_get(autoprops_baton->autoprops,
- name, APR_HASH_KEY_STRING);
+ apr_hash_t *pattern_hash = svn_hash_gets(autoprops_baton->autoprops,
+ name);
svn_string_t *propval;
/* Force reserved boolean property values to '*'. */
@@ -561,13 +562,13 @@ all_auto_props_collector(const char *nam
if (!pattern_hash)
{
pattern_hash = apr_hash_make(autoprops_baton->result_pool);
- apr_hash_set(autoprops_baton->autoprops,
- apr_pstrdup(autoprops_baton->result_pool, name),
- APR_HASH_KEY_STRING, pattern_hash);
+ svn_hash_sets(autoprops_baton->autoprops,
+ apr_pstrdup(autoprops_baton->result_pool, name),
+ pattern_hash);
}
- apr_hash_set(pattern_hash,
- apr_pstrdup(autoprops_baton->result_pool, property),
- APR_HASH_KEY_STRING, propval->data);
+ svn_hash_sets(pattern_hash,
+ apr_pstrdup(autoprops_baton->result_pool, property),
+ propval->data);
}
}
return TRUE;
@@ -634,13 +635,13 @@ svn_client__get_all_auto_props(apr_hash_
svn_error_t *err = NULL;
apr_pool_t *iterpool = svn_pool_create(scratch_pool);
svn_boolean_t target_is_url = svn_path_is_url(path_or_url);
- svn_config_t *cfg = ctx->config ? apr_hash_get(ctx->config,
- SVN_CONFIG_CATEGORY_CONFIG,
- APR_HASH_KEY_STRING) : NULL;
+ svn_config_t *cfg = ctx->config ? svn_hash_gets(ctx->config,
+ SVN_CONFIG_CATEGORY_CONFIG)
+ : NULL;
*autoprops = apr_hash_make(result_pool);
autoprops_baton.result_pool = result_pool;
autoprops_baton.autoprops = *autoprops;
-
+
/* Are "traditional" auto-props enabled? If so grab them from the
config. This is our starting set auto-props, which may be overriden
@@ -687,7 +688,7 @@ svn_client__get_all_auto_props(apr_hash_
/* Stash any explicit PROPS for PARENT_PATH into the inherited props array,
since these are actually inherited props for LOCAL_ABSPATH. */
- config_auto_prop = apr_hash_get(props, path_or_url, APR_HASH_KEY_STRING);
+ config_auto_prop = svn_hash_gets(props, path_or_url);
if (config_auto_prop)
{
@@ -695,10 +696,8 @@ svn_client__get_all_auto_props(apr_hash_
apr_palloc(scratch_pool, sizeof(*new_iprop));
new_iprop->path_or_url = path_or_url;
new_iprop->prop_hash = apr_hash_make(scratch_pool);
- apr_hash_set(new_iprop->prop_hash,
- SVN_PROP_INHERITABLE_AUTO_PROPS,
- APR_HASH_KEY_STRING,
- config_auto_prop);
+ svn_hash_sets(new_iprop->prop_hash, SVN_PROP_INHERITABLE_AUTO_PROPS,
+ config_auto_prop);
APR_ARRAY_PUSH(inherited_config_auto_props,
svn_prop_inherited_item_t *) = new_iprop;
}
@@ -792,8 +791,7 @@ svn_error_t *svn_client__get_inherited_i
&rev, &rev, NULL, svn_depth_empty, NULL, ctx,
scratch_pool, scratch_pool));
- explicit_prop = apr_hash_get(explicit_ignores, path_or_url,
- APR_HASH_KEY_STRING);
+ explicit_prop = svn_hash_gets(explicit_ignores, path_or_url);
if (explicit_prop)
{
@@ -801,10 +799,8 @@ svn_error_t *svn_client__get_inherited_i
apr_palloc(scratch_pool, sizeof(*new_iprop));
new_iprop->path_or_url = path_or_url;
new_iprop->prop_hash = apr_hash_make(scratch_pool);
- apr_hash_set(new_iprop->prop_hash,
- SVN_PROP_INHERITABLE_IGNORES,
- APR_HASH_KEY_STRING,
- explicit_prop);
+ svn_hash_sets(new_iprop->prop_hash, SVN_PROP_INHERITABLE_IGNORES,
+ explicit_prop);
APR_ARRAY_PUSH(inherited_ignores,
svn_prop_inherited_item_t *) = new_iprop;
}
@@ -815,88 +811,8 @@ svn_error_t *svn_client__get_inherited_i
{
svn_prop_inherited_item_t *elt = APR_ARRAY_IDX(
inherited_ignores, i, svn_prop_inherited_item_t *);
- svn_string_t *ignore_val = apr_hash_get(elt->prop_hash,
- SVN_PROP_INHERITABLE_IGNORES,
- APR_HASH_KEY_STRING);
- if (ignore_val)
- svn_cstring_split_append(*ignores, ignore_val->data, "\n\r\t\v ",
- FALSE, result_pool);
- }
-
- return SVN_NO_ERROR;
-}
-
-svn_error_t *svn_client__get_all_ignores(apr_array_header_t **ignores,
- const char *local_abspath,
- svn_client_ctx_t *ctx,
- apr_pool_t *result_pool,
- apr_pool_t *scratch_pool)
-{
- apr_hash_t *explicit_ignores;
- apr_array_header_t *inherited_ignores;
- svn_error_t *err = NULL;
- svn_string_t *explicit_prop;
- int i;
- svn_opt_revision_t rev;
-
- rev.kind = svn_opt_revision_working;
-
- /* LOCAL_ABSPATH might be unversioned, in which case we find its
- nearest versioned parent. */
- while (err == NULL)
- {
- err = svn_client_propget5(&explicit_ignores, &inherited_ignores,
- SVN_PROP_INHERITABLE_IGNORES, local_abspath,
- &rev, &rev, NULL, svn_depth_empty, NULL, ctx,
- scratch_pool, scratch_pool);
- if (err)
- {
- /* Unversioned and deleted nodes don't have properties */
- if (err->apr_err != SVN_ERR_UNVERSIONED_RESOURCE
- && err->apr_err != SVN_ERR_WC_PATH_UNEXPECTED_STATUS)
- return svn_error_trace(err);
-
- svn_error_clear(err);
- err = NULL;
- SVN_ERR(find_existing_parent(&local_abspath, ctx, local_abspath,
- scratch_pool, scratch_pool));
- }
- else
- {
- break;
- }
- }
-
- explicit_prop = apr_hash_get(explicit_ignores, local_abspath,
- APR_HASH_KEY_STRING);
-
- if (explicit_prop)
- {
- svn_prop_inherited_item_t *new_iprop =
- apr_palloc(scratch_pool, sizeof(*new_iprop));
- new_iprop->path_or_url = local_abspath;
- new_iprop->prop_hash = apr_hash_make(scratch_pool);
- apr_hash_set(new_iprop->prop_hash,
- SVN_PROP_INHERITABLE_IGNORES,
- APR_HASH_KEY_STRING,
- explicit_prop);
- APR_ARRAY_PUSH(inherited_ignores,
- svn_prop_inherited_item_t *) = new_iprop;
- }
-
- /* Now that we are sure we have an existing parent, get the config ignore
- and the local ignore patterns... */
- SVN_ERR(svn_wc_get_ignores2(ignores, ctx->wc_ctx, local_abspath,
- ctx->config, result_pool, scratch_pool));
-
- /* ...and add the inherited ignores to it. */
- for (i = 0; i < inherited_ignores->nelts; i++)
- {
- svn_prop_inherited_item_t *elt = APR_ARRAY_IDX(
- inherited_ignores, i, svn_prop_inherited_item_t *);
- svn_string_t *ignore_val = apr_hash_get(elt->prop_hash,
- SVN_PROP_INHERITABLE_IGNORES,
- APR_HASH_KEY_STRING);
+ svn_string_t *ignore_val = svn_hash_gets(elt->prop_hash,
+ SVN_PROP_INHERITABLE_IGNORES);
if (ignore_val)
svn_cstring_split_append(*ignores, ignore_val->data, "\n\r\t\v ",
FALSE, result_pool);
@@ -976,7 +892,8 @@ add(const char *local_abspath,
target's depth will be set correctly. */
err = add_dir_recursive(local_abspath, depth, force,
no_autoprops, magic_cookie, NULL,
- !no_ignore, ignores, ctx, scratch_pool);
+ !no_ignore, ignores, ctx,
+ scratch_pool, scratch_pool);
}
else if (kind == svn_node_file)
err = add_file(local_abspath, magic_cookie, NULL,
@@ -1109,7 +1026,7 @@ svn_client_add5(const char *path,
SVN_WC__CALL_WITH_WRITE_LOCK(
add(local_abspath, depth, force, no_ignore, no_autoprops,
existing_parent_abspath, ctx, scratch_pool),
- ctx->wc_ctx, (existing_parent_abspath ? existing_parent_abspath
+ ctx->wc_ctx, (existing_parent_abspath ? existing_parent_abspath
: parent_abspath),
FALSE /* lock_anchor */, scratch_pool);
return SVN_NO_ERROR;
@@ -1214,7 +1131,7 @@ mkdir_urls(const apr_array_header_t *url
if (*bname == '\0')
return svn_error_createf(SVN_ERR_ILLEGAL_TARGET, NULL,
- _("There is no valid uri above '%s'"),
+ _("There is no valid URI above '%s'"),
common);
}
else
@@ -1241,7 +1158,7 @@ mkdir_urls(const apr_array_header_t *url
if (*bname == '\0')
return svn_error_createf(SVN_ERR_ILLEGAL_TARGET, NULL,
- _("There is no valid uri above '%s'"),
+ _("There is no valid URI above '%s'"),
common);
for (i = 0; i < targets->nelts; i++)
Modified: subversion/branches/master-passphrase/subversion/libsvn_client/cat.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/libsvn_client/cat.c?rev=1481041&r1=1481040&r2=1481041&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/libsvn_client/cat.c (original)
+++ subversion/branches/master-passphrase/subversion/libsvn_client/cat.c Fri May 10 14:58:47 2013
@@ -27,6 +27,7 @@
/*** Includes. ***/
+#include "svn_hash.h"
#include "svn_client.h"
#include "svn_string.h"
#include "svn_error.h"
@@ -109,12 +110,9 @@ svn_client__get_normalized_stream(svn_st
local_mod = TRUE;
}
- eol_style = apr_hash_get(props, SVN_PROP_EOL_STYLE,
- APR_HASH_KEY_STRING);
- keywords = apr_hash_get(props, SVN_PROP_KEYWORDS,
- APR_HASH_KEY_STRING);
- special = apr_hash_get(props, SVN_PROP_SPECIAL,
- APR_HASH_KEY_STRING);
+ eol_style = svn_hash_gets(props, SVN_PROP_EOL_STYLE);
+ keywords = svn_hash_gets(props, SVN_PROP_KEYWORDS);
+ special = svn_hash_gets(props, SVN_PROP_SPECIAL);
if (eol_style)
svn_subst_eol_style_from_value(&style, &eol, eol_style->data);
@@ -126,12 +124,18 @@ svn_client__get_normalized_stream(svn_st
const char *author;
const char *url;
apr_time_t tm;
+ const char *repos_root_url;
+ const char *repos_relpath;
SVN_ERR(svn_wc__node_get_changed_info(&changed_rev, &tm, &author, wc_ctx,
local_abspath, scratch_pool,
scratch_pool));
- SVN_ERR(svn_wc__node_get_url(&url, wc_ctx, local_abspath, scratch_pool,
- scratch_pool));
+ SVN_ERR(svn_wc__node_get_repos_info(NULL, &repos_relpath, &repos_root_url,
+ NULL,
+ wc_ctx, local_abspath, scratch_pool,
+ scratch_pool));
+ url = svn_path_url_add_component2(repos_root_url, repos_relpath,
+ scratch_pool);
if (local_mod)
{
@@ -154,8 +158,9 @@ svn_client__get_normalized_stream(svn_st
rev_str = apr_psprintf(scratch_pool, "%ld", changed_rev);
}
- SVN_ERR(svn_subst_build_keywords2(&kw, keywords->data, rev_str, url, tm,
- author, scratch_pool));
+ SVN_ERR(svn_subst_build_keywords3(&kw, keywords->data, rev_str, url,
+ repos_root_url, tm, author,
+ scratch_pool));
}
/* Wrap the output stream if translation is needed. */
@@ -183,6 +188,7 @@ svn_client_cat2(svn_stream_t *out,
svn_string_t *eol_style;
svn_string_t *keywords;
apr_hash_t *props;
+ const char *repos_root_url;
svn_stream_t *output = out;
svn_error_t *err;
@@ -227,6 +233,9 @@ svn_client_cat2(svn_stream_t *out,
peg_revision,
revision, ctx, pool));
+ /* Find the repos root URL */
+ SVN_ERR(svn_ra_get_repos_root2(ra_session, &repos_root_url, pool));
+
/* Grab some properties we need to know in order to figure out if anything
special needs to be done with this file. */
err = svn_ra_get_file(ra_session, "", loc->rev, NULL, NULL, &props, pool);
@@ -244,8 +253,8 @@ svn_client_cat2(svn_stream_t *out,
}
}
- eol_style = apr_hash_get(props, SVN_PROP_EOL_STYLE, APR_HASH_KEY_STRING);
- keywords = apr_hash_get(props, SVN_PROP_KEYWORDS, APR_HASH_KEY_STRING);
+ eol_style = svn_hash_gets(props, SVN_PROP_EOL_STYLE);
+ keywords = svn_hash_gets(props, SVN_PROP_KEYWORDS);
if (eol_style || keywords)
{
@@ -268,22 +277,18 @@ svn_client_cat2(svn_stream_t *out,
svn_string_t *cmt_rev, *cmt_date, *cmt_author;
apr_time_t when = 0;
- cmt_rev = apr_hash_get(props, SVN_PROP_ENTRY_COMMITTED_REV,
- APR_HASH_KEY_STRING);
- cmt_date = apr_hash_get(props, SVN_PROP_ENTRY_COMMITTED_DATE,
- APR_HASH_KEY_STRING);
- cmt_author = apr_hash_get(props, SVN_PROP_ENTRY_LAST_AUTHOR,
- APR_HASH_KEY_STRING);
+ cmt_rev = svn_hash_gets(props, SVN_PROP_ENTRY_COMMITTED_REV);
+ cmt_date = svn_hash_gets(props, SVN_PROP_ENTRY_COMMITTED_DATE);
+ cmt_author = svn_hash_gets(props, SVN_PROP_ENTRY_LAST_AUTHOR);
if (cmt_date)
SVN_ERR(svn_time_from_cstring(&when, cmt_date->data, pool));
- SVN_ERR(svn_subst_build_keywords2
- (&kw, keywords->data,
- cmt_rev->data,
- loc->url,
- when,
- cmt_author ? cmt_author->data : NULL,
- pool));
+ SVN_ERR(svn_subst_build_keywords3(&kw, keywords->data,
+ cmt_rev->data, loc->url,
+ repos_root_url, when,
+ cmt_author ?
+ cmt_author->data : NULL,
+ pool));
}
else
kw = NULL;
Modified: subversion/branches/master-passphrase/subversion/libsvn_client/checkout.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/libsvn_client/checkout.c?rev=1481041&r1=1481040&r2=1481041&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/libsvn_client/checkout.c (original)
+++ subversion/branches/master-passphrase/subversion/libsvn_client/checkout.c Fri May 10 14:58:47 2013
@@ -78,9 +78,6 @@ svn_client__checkout_internal(svn_revnum
svn_client_ctx_t *ctx,
apr_pool_t *pool)
{
- svn_error_t *err = NULL;
- svn_boolean_t sleep_here = FALSE;
- svn_boolean_t *use_sleep = timestamp_sleep ? timestamp_sleep : &sleep_here;
svn_node_kind_t kind;
apr_pool_t *session_pool = svn_pool_create(pool);
svn_ra_session_t *ra_session;
@@ -123,7 +120,7 @@ svn_client__checkout_internal(svn_revnum
entries file should only have an entry for THIS_DIR with a
URL, revnum, and an 'incomplete' flag. */
SVN_ERR(svn_io_make_dir_recursively(local_abspath, pool));
- err = initialize_area(local_abspath, pathrev, depth, ctx, pool);
+ SVN_ERR(initialize_area(local_abspath, pathrev, depth, ctx, pool));
}
else if (kind == svn_node_dir)
{
@@ -133,7 +130,7 @@ svn_client__checkout_internal(svn_revnum
SVN_ERR(svn_wc_check_wc2(&wc_format, ctx->wc_ctx, local_abspath, pool));
if (! wc_format)
{
- err = initialize_area(local_abspath, pathrev, depth, ctx, pool);
+ SVN_ERR(initialize_area(local_abspath, pathrev, depth, ctx, pool));
}
else
{
@@ -160,28 +157,13 @@ svn_client__checkout_internal(svn_revnum
}
/* Have update fix the incompleteness. */
- if (! err)
- {
- err = svn_client__update_internal(result_rev, local_abspath,
- revision, depth, TRUE,
- ignore_externals,
- allow_unver_obstructions,
- TRUE /* adds_as_modification */,
- FALSE, FALSE,
- use_sleep, ctx, pool);
- }
-
- if (err)
- {
- /* Don't rely on the error handling to handle the sleep later, do
- it now */
- svn_io_sleep_for_timestamps(local_abspath, pool);
- return svn_error_trace(err);
- }
- *use_sleep = TRUE;
-
- if (sleep_here)
- svn_io_sleep_for_timestamps(local_abspath, pool);
+ SVN_ERR(svn_client__update_internal(result_rev, local_abspath,
+ revision, depth, TRUE,
+ ignore_externals,
+ allow_unver_obstructions,
+ TRUE /* adds_as_modification */,
+ FALSE, FALSE,
+ timestamp_sleep, ctx, pool));
return SVN_NO_ERROR;
}
@@ -199,12 +181,18 @@ svn_client_checkout3(svn_revnum_t *resul
apr_pool_t *pool)
{
const char *local_abspath;
+ svn_error_t *err;
+ svn_boolean_t sleep_here = FALSE;
SVN_ERR(svn_dirent_get_absolute(&local_abspath, path, pool));
- return svn_client__checkout_internal(result_rev, URL, local_abspath,
- peg_revision, revision, depth,
- ignore_externals,
- allow_unver_obstructions, NULL,
- ctx, pool);
+ err = svn_client__checkout_internal(result_rev, URL, local_abspath,
+ peg_revision, revision, depth,
+ ignore_externals,
+ allow_unver_obstructions, &sleep_here,
+ ctx, pool);
+ if (sleep_here)
+ svn_io_sleep_for_timestamps(local_abspath, pool);
+
+ return svn_error_trace(err);
}
Modified: subversion/branches/master-passphrase/subversion/libsvn_client/client.h
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/libsvn_client/client.h?rev=1481041&r1=1481040&r2=1481041&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/libsvn_client/client.h (original)
+++ subversion/branches/master-passphrase/subversion/libsvn_client/client.h Fri May 10 14:58:47 2013
@@ -38,6 +38,7 @@
#include "private/svn_magic.h"
#include "private/svn_client_private.h"
#include "private/svn_diff_tree.h"
+#include "private/svn_editor.h"
#ifdef __cplusplus
extern "C" {
@@ -315,7 +316,7 @@ svn_client__ra_provide_props(apr_hash_t
svn_error_t *
-svn_client__ra_get_copysrc_kind(svn_kind_t *kind,
+svn_client__ra_get_copysrc_kind(svn_node_kind_t *kind,
void *baton,
const char *repos_relpath,
svn_revnum_t src_revision,
@@ -387,22 +388,6 @@ svn_error_t *svn_client__get_all_auto_pr
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
-/* Get a combined list of ignore patterns from CTX->CONFIG, local ignore
- patterns on LOCAL_ABSPATH (per the svn:ignore property), and from any
- svn:global-ignores properties set on, or inherited by, LOCAL_ABSPATH.
- If LOCAL_ABSPATH is unversioned but is located within a valid working copy,
- then find its nearest versioned parent path, if any, and return the ignore
- patterns for that parent. Return an SVN_ERR_WC_NOT_WORKING_COPY error if
- LOCAL_ABSPATH is neither a versioned working copy path nor an unversioned
- path within a working copy. Store the collected patterns as const char *
- elements in the array *IGNORES. Allocate *IGNORES and its contents in
- RESULT_POOL. Use SCRATCH_POOL for temporary allocations. */
-svn_error_t *svn_client__get_all_ignores(apr_array_header_t **ignores,
- const char *local_abspath,
- svn_client_ctx_t *ctx,
- apr_pool_t *result_pool,
- apr_pool_t *scratch_pool);
-
/* Get a list of ignore patterns defined by the svn:global-ignores
properties set on, or inherited by, PATH_OR_URL. Store the collected
patterns as const char * elements in the array *IGNORES. Allocate
@@ -482,11 +467,9 @@ svn_client__make_local_parents(const cha
If IGNORE_EXTERNALS is true, do no externals processing.
- If TIMESTAMP_SLEEP is NULL this function will sleep before
- returning to ensure timestamp integrity. If TIMESTAMP_SLEEP is not
- NULL then the function will not sleep but will set *TIMESTAMP_SLEEP
- to TRUE if a sleep is required, and will not change
- *TIMESTAMP_SLEEP if no sleep is required.
+ Set *TIMESTAMP_SLEEP to TRUE if a sleep is required; otherwise do not
+ change *TIMESTAMP_SLEEP. The output will be valid even if the function
+ returns an error.
If ALLOW_UNVER_OBSTRUCTIONS is TRUE, unversioned children of LOCAL_ABSPATH
that obstruct items added from the repos are tolerated; if FALSE,
@@ -537,11 +520,11 @@ svn_client__update_internal(svn_revnum_t
If IGNORE_EXTERNALS is true, do no externals processing.
- If TIMESTAMP_SLEEP is NULL this function will sleep before
- returning to ensure timestamp integrity. If TIMESTAMP_SLEEP is not
- NULL then the function will not sleep but will set *TIMESTAMP_SLEEP
- to TRUE if a sleep is required, and will not change *TIMESTAMP_SLEEP
- if no sleep is required. If ALLOW_UNVER_OBSTRUCTIONS is TRUE,
+ Set *TIMESTAMP_SLEEP to TRUE if a sleep is required; otherwise do not
+ change *TIMESTAMP_SLEEP. The output will be valid even if the function
+ returns an error.
+
+ If ALLOW_UNVER_OBSTRUCTIONS is TRUE,
unversioned children of LOCAL_ABSPATH that obstruct items added from
the repos are tolerated; if FALSE, these obstructions cause the checkout
to fail.
@@ -566,11 +549,9 @@ svn_client__checkout_internal(svn_revnum
acquired and released if not held. Only switch as deeply as DEPTH
indicates.
- If TIMESTAMP_SLEEP is NULL this function will sleep before
- returning to ensure timestamp integrity. If TIMESTAMP_SLEEP is not
- NULL then the function will not sleep but will set *TIMESTAMP_SLEEP
- to TRUE if a sleep is required, and will not change
- *TIMESTAMP_SLEEP if no sleep is required.
+ Set *TIMESTAMP_SLEEP to TRUE if a sleep is required; otherwise do not
+ change *TIMESTAMP_SLEEP. The output will be valid even if the function
+ returns an error.
If IGNORE_EXTERNALS is true, don't process externals.
@@ -990,9 +971,9 @@ svn_client__do_commit(const char *base_u
Pass NOTIFY_FUNC with NOTIFY_BATON along to svn_client_checkout().
- *TIMESTAMP_SLEEP will be set TRUE if a sleep is required to ensure
- timestamp integrity, *TIMESTAMP_SLEEP will be unchanged if no sleep
- is required.
+ Set *TIMESTAMP_SLEEP to TRUE if a sleep is required; otherwise do not
+ change *TIMESTAMP_SLEEP. The output will be valid even if the function
+ returns an error.
Use POOL for temporary allocation. */
svn_error_t *
@@ -1021,10 +1002,6 @@ svn_client__handle_externals(apr_hash_t
NATIVE_EOL is the value passed as NATIVE_EOL when exporting.
- *TIMESTAMP_SLEEP will be set TRUE if a sleep is required to ensure
- timestamp integrity, *TIMESTAMP_SLEEP will be unchanged if no sleep
- is required.
-
Use POOL for temporary allocation. */
svn_error_t *
svn_client__export_externals(apr_hash_t *externals,
@@ -1034,7 +1011,6 @@ svn_client__export_externals(apr_hash_t
svn_depth_t requested_depth,
const char *native_eol,
svn_boolean_t ignore_keywords,
- svn_boolean_t *timestamp_sleep,
svn_client_ctx_t *ctx,
apr_pool_t *pool);
@@ -1128,6 +1104,18 @@ const svn_opt_revision_t *
svn_cl__rev_default_to_peg(const svn_opt_revision_t *revision,
const svn_opt_revision_t *peg_revision);
+/* Call the conflict resolver callback in CTX for each conflict recorded
+ * in CONFLICTED_PATHS (const char *abspath keys; ignored values). If
+ * CONFLICTS_REMAIN is not NULL, then set *CONFLICTS_REMAIN to true if
+ * there are any conflicts among CONFLICTED_PATHS remaining unresolved
+ * at the end of this operation, else set it to false.
+ */
+svn_error_t *
+svn_client__resolve_conflicts(svn_boolean_t *conflicts_remain,
+ apr_hash_t *conflicted_paths,
+ svn_client_ctx_t *ctx,
+ apr_pool_t *scratch_pool);
+
#ifdef __cplusplus
}
Modified: subversion/branches/master-passphrase/subversion/libsvn_client/commit.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/libsvn_client/commit.c?rev=1481041&r1=1481040&r2=1481041&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/libsvn_client/commit.c (original)
+++ subversion/branches/master-passphrase/subversion/libsvn_client/commit.c Fri May 10 14:58:47 2013
@@ -30,6 +30,7 @@
#include <string.h>
#include <apr_strings.h>
#include <apr_hash.h>
+#include "svn_hash.h"
#include "svn_wc.h"
#include "svn_ra.h"
#include "svn_client.h"
@@ -113,7 +114,7 @@ get_ra_editor(const svn_delta_editor_t *
ctx->wc_ctx, item->path, FALSE, pool,
iterpool));
if (relpath)
- apr_hash_set(relpath_map, relpath, APR_HASH_KEY_STRING, item->path);
+ svn_hash_sets(relpath_map, relpath, item->path);
}
svn_pool_destroy(iterpool);
}
@@ -208,7 +209,7 @@ collect_lock_tokens(apr_hash_t **result,
if (relpath)
{
- apr_hash_set(*result, relpath, APR_HASH_KEY_STRING, token);
+ svn_hash_sets(*result, relpath, token);
}
}
@@ -364,13 +365,13 @@ determine_lock_targets(apr_array_header_
return svn_error_trace(err);
}
- wc_targets = apr_hash_get(wc_items, wcroot_abspath, APR_HASH_KEY_STRING);
+ wc_targets = svn_hash_gets(wc_items, wcroot_abspath);
if (! wc_targets)
{
wc_targets = apr_array_make(scratch_pool, 4, sizeof(const char *));
- apr_hash_set(wc_items, apr_pstrdup(scratch_pool, wcroot_abspath),
- APR_HASH_KEY_STRING, wc_targets);
+ svn_hash_sets(wc_items, apr_pstrdup(scratch_pool, wcroot_abspath),
+ wc_targets);
}
APR_ARRAY_PUSH(wc_targets, const char *) = target_abspath;
@@ -533,8 +534,8 @@ append_externals_as_explicit_targets(apr
APR_ARRAY_IDX(externals, j,
svn_wc__committable_external_info_t *);
- if ((xinfo->kind == svn_kind_file && ! include_file_externals)
- || (xinfo->kind == svn_kind_dir && ! include_dir_externals))
+ if ((xinfo->kind == svn_node_file && ! include_file_externals)
+ || (xinfo->kind == svn_node_dir && ! include_dir_externals))
continue;
rel_target = svn_dirent_skip_ancestor(base_abspath,
@@ -585,6 +586,7 @@ svn_client_commit6(const apr_array_heade
svn_error_t *bump_err = SVN_NO_ERROR;
svn_error_t *unlock_err = SVN_NO_ERROR;
svn_boolean_t commit_in_progress = FALSE;
+ svn_boolean_t timestamp_sleep = FALSE;
svn_commit_info_t *commit_info = NULL;
apr_pool_t *iterpool = svn_pool_create(pool);
const char *current_abspath;
@@ -785,8 +787,8 @@ svn_client_commit6(const apr_array_heade
{
svn_boolean_t found_delete_half =
- (apr_hash_get(committables->by_path, delete_op_root_abspath,
- APR_HASH_KEY_STRING) != NULL);
+ (svn_hash_gets(committables->by_path, delete_op_root_abspath)
+ != NULL);
if (!found_delete_half)
{
@@ -829,9 +831,9 @@ svn_client_commit6(const apr_array_heade
if (parent_delete_op_root_abspath)
found_delete_half =
- (apr_hash_get(committables->by_path,
- parent_delete_op_root_abspath,
- APR_HASH_KEY_STRING) != NULL);
+ (svn_hash_gets(committables->by_path,
+ parent_delete_op_root_abspath)
+ != NULL);
}
}
@@ -865,8 +867,8 @@ svn_client_commit6(const apr_array_heade
if (moved_to_abspath && copy_op_root_abspath &&
strcmp(moved_to_abspath, copy_op_root_abspath) == 0 &&
- apr_hash_get(committables->by_path, copy_op_root_abspath,
- APR_HASH_KEY_STRING) == NULL)
+ svn_hash_gets(committables->by_path, copy_op_root_abspath)
+ == NULL)
{
cmt_err = svn_error_createf(
SVN_ERR_ILLEGAL_TARGET, NULL,
@@ -944,6 +946,11 @@ svn_client_commit6(const apr_array_heade
/* Make a note that we have a commit-in-progress. */
commit_in_progress = TRUE;
+ /* We'll assume that, once we pass this point, we are going to need to
+ * sleep for timestamps. Really, we may not need to do unless and until
+ * we reach the point where we post-commit 'bump' the WC metadata. */
+ timestamp_sleep = TRUE;
+
/* Perform the commit. */
cmt_err = svn_error_trace(
svn_client__do_commit(base_url, commit_items, editor, edit_baton,
@@ -968,9 +975,7 @@ svn_client_commit6(const apr_array_heade
bump_err = post_process_commit_item(
queue, item, ctx->wc_ctx,
keep_changelists, keep_locks, commit_as_operations,
- apr_hash_get(sha1_checksums,
- item->path,
- APR_HASH_KEY_STRING),
+ svn_hash_gets(sha1_checksums, item->path),
iterpool);
if (bump_err)
goto cleanup;
@@ -986,10 +991,11 @@ svn_client_commit6(const apr_array_heade
iterpool);
}
+ cleanup:
/* Sleep to ensure timestamp integrity. */
- svn_io_sleep_for_timestamps(base_abspath, pool);
+ if (timestamp_sleep)
+ svn_io_sleep_for_timestamps(base_abspath, pool);
- cleanup:
/* Abort the commit if it is still in progress. */
svn_pool_clear(iterpool); /* Close open handles before aborting */
if (commit_in_progress)
Modified: subversion/branches/master-passphrase/subversion/libsvn_client/commit_util.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/libsvn_client/commit_util.c?rev=1481041&r1=1481040&r2=1481041&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/libsvn_client/commit_util.c (original)
+++ subversion/branches/master-passphrase/subversion/libsvn_client/commit_util.c Fri May 10 14:58:47 2013
@@ -213,18 +213,15 @@ add_committable(svn_client__committables
/* ### todo: Get the canonical repository for this item, which will
be the real key for the COMMITTABLES hash, instead of the above
bogosity. */
- array = apr_hash_get(committables->by_repository,
- repos_root_url,
- APR_HASH_KEY_STRING);
+ array = svn_hash_gets(committables->by_repository, repos_root_url);
/* E-gads! There is no array for this repository yet! Oh, no
problem, we'll just create (and add to the hash) one. */
if (array == NULL)
{
array = apr_array_make(result_pool, 1, sizeof(new_item));
- apr_hash_set(committables->by_repository,
- apr_pstrdup(result_pool, repos_root_url),
- APR_HASH_KEY_STRING, array);
+ svn_hash_sets(committables->by_repository,
+ apr_pstrdup(result_pool, repos_root_url), array);
}
/* Now update pointer values, ensuring that their allocations live
@@ -254,19 +251,14 @@ add_committable(svn_client__committables
APR_ARRAY_PUSH(array, svn_client_commit_item3_t *) = new_item;
/* ... and to the hash. */
- apr_hash_set(committables->by_path,
- new_item->path,
- APR_HASH_KEY_STRING,
- new_item);
+ svn_hash_sets(committables->by_path, new_item->path, new_item);
if (lock
&& lock_tokens
&& (state_flags & SVN_CLIENT_COMMIT_ITEM_LOCK_TOKEN))
{
- apr_hash_set(lock_tokens,
- new_item->url,
- APR_HASH_KEY_STRING,
- apr_pstrdup(result_pool, lock->token));
+ svn_hash_sets(lock_tokens, new_item->url,
+ apr_pstrdup(result_pool, lock->token));
}
return SVN_NO_ERROR;
@@ -280,7 +272,7 @@ look_up_committable(svn_client__committa
apr_pool_t *pool)
{
return (svn_client_commit_item3_t *)
- apr_hash_get(committables->by_path, path, APR_HASH_KEY_STRING);
+ svn_hash_gets(committables->by_path, path);
}
/* Helper function for svn_client__harvest_committables().
@@ -476,7 +468,7 @@ harvest_not_present_for_copy(svn_wc_cont
SVN_ERR(svn_wc__node_get_children_of_working_node(
&children, wc_ctx, local_abspath, TRUE,
scratch_pool, iterpool));
-
+
for (i = 0; i < children->nelts; i++)
{
const char *this_abspath = APR_ARRAY_IDX(children, i, const char *);
@@ -570,7 +562,7 @@ harvest_status_callback(void *status_bat
svn_boolean_t copy_mode;
struct harvest_baton *baton = status_baton;
- svn_boolean_t is_harvest_root =
+ svn_boolean_t is_harvest_root =
(strcmp(baton->root_abspath, local_abspath) == 0);
svn_client__committables_t *committables = baton->committables;
const char *repos_root_url = status->repos_root_url;
@@ -646,8 +638,8 @@ harvest_status_callback(void *status_bat
/* Save the result for reuse. */
matches_changelists = ((changelists == NULL)
|| (status->changelist != NULL
- && apr_hash_get(changelists, status->changelist,
- APR_HASH_KEY_STRING) != NULL));
+ && svn_hash_gets(changelists, status->changelist)
+ != NULL));
/* Early exit. */
if (status->kind != svn_node_dir && ! matches_changelists)
@@ -892,7 +884,7 @@ harvest_status_callback(void *status_bat
}
}
- /* Make sure we check for dangling children on additions
+ /* Make sure we check for dangling children on additions
We perform this operation on the harvest root, and on roots caused by
changelist filtering.
@@ -934,12 +926,10 @@ harvest_status_callback(void *status_bat
if (parent_is_copy)
parent_abspath = copy_root_abspath;
- if (!apr_hash_get(danglers, parent_abspath, APR_HASH_KEY_STRING))
+ if (!svn_hash_gets(danglers, parent_abspath))
{
- apr_hash_set(danglers,
- apr_pstrdup(result_pool, parent_abspath),
- APR_HASH_KEY_STRING,
- apr_pstrdup(result_pool, local_abspath));
+ svn_hash_sets(danglers, apr_pstrdup(result_pool, parent_abspath),
+ apr_pstrdup(result_pool, local_abspath));
}
}
}
@@ -1469,9 +1459,8 @@ do_item_commit(void **dir_baton,
apr_pool_t *pool)
{
struct item_commit_baton *icb = callback_baton;
- const svn_client_commit_item3_t *item = apr_hash_get(icb->commit_items,
- path,
- APR_HASH_KEY_STRING);
+ const svn_client_commit_item3_t *item = svn_hash_gets(icb->commit_items,
+ path);
svn_node_kind_t kind = item->kind;
void *file_baton = NULL;
apr_pool_t *file_pool = NULL;
@@ -1748,7 +1737,7 @@ do_item_commit(void **dir_baton,
/* Add this file mod to the FILE_MODS hash. */
mod->item = item;
mod->file_baton = file_baton;
- apr_hash_set(file_mods, item->session_relpath, APR_HASH_KEY_STRING, mod);
+ svn_hash_sets(file_mods, item->session_relpath, mod);
}
else if (file_baton)
{
@@ -1801,7 +1790,7 @@ svn_client__do_commit(const char *base_u
svn_client_commit_item3_t *item =
APR_ARRAY_IDX(commit_items, i, svn_client_commit_item3_t *);
const char *path = item->session_relpath;
- apr_hash_set(items_hash, path, APR_HASH_KEY_STRING, item);
+ svn_hash_sets(items_hash, path, item);
APR_ARRAY_PUSH(paths, const char *) = path;
}
@@ -1869,8 +1858,7 @@ svn_client__do_commit(const char *base_u
}
if (sha1_checksums)
- apr_hash_set(*sha1_checksums, item->path, APR_HASH_KEY_STRING,
- new_text_base_sha1_checksum);
+ svn_hash_sets(*sha1_checksums, item->path, new_text_base_sha1_checksum);
}
svn_pool_destroy(iterpool);
@@ -1986,8 +1974,8 @@ svn_client__ensure_revprop_table(apr_has
{
new_revprop_table = apr_hash_make(pool);
}
- apr_hash_set(new_revprop_table, SVN_PROP_REVISION_LOG, APR_HASH_KEY_STRING,
- svn_string_create(log_msg, pool));
+ svn_hash_sets(new_revprop_table, SVN_PROP_REVISION_LOG,
+ svn_string_create(log_msg, pool));
*revprop_table_out = new_revprop_table;
return SVN_NO_ERROR;
}