You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ju...@apache.org on 2013/01/06 03:33:39 UTC
svn commit: r1429457 [2/21] - in /subversion/branches/tree-read-api: ./
build/ build/ac-macros/ build/generator/templates/ build/win32/
contrib/server-side/svncutter/ doc/ subversion/bindings/cxxhl/include/
subversion/bindings/cxxhl/include/svncxxhl/ s...
Modified: subversion/branches/tree-read-api/subversion/include/private/svn_cmdline_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/include/private/svn_cmdline_private.h?rev=1429457&r1=1429456&r2=1429457&view=diff
==============================================================================
--- subversion/branches/tree-read-api/subversion/include/private/svn_cmdline_private.h (original)
+++ subversion/branches/tree-read-api/subversion/include/private/svn_cmdline_private.h Sun Jan 6 02:33:34 2013
@@ -28,9 +28,11 @@
#define SVN_CMDLINE_PRIVATE_H
#include <apr_pools.h>
+#include <apr_hash.h>
#include "svn_string.h"
#include "svn_error.h"
+#include "svn_io.h"
#ifdef __cplusplus
extern "C" {
@@ -108,6 +110,95 @@ svn_cmdline__apply_config_options(apr_ha
const char *prefix,
const char *argument_name);
+/* Return a string allocated in POOL that is a copy of STR but with each
+ * line prefixed with INDENT. A line is all characters up to the first
+ * CR-LF, LF-CR, CR or LF, or the end of STR if sooner. */
+const char *
+svn_cmdline__indent_string(const char *str,
+ const char *indent,
+ apr_pool_t *pool);
+
+/* Print to stdout a hash PROP_HASH that maps property names (char *) to
+ property values (svn_string_t *). The names are assumed to be in UTF-8
+ format; the values are either in UTF-8 (the special Subversion props) or
+ plain binary values.
+
+ If OUT is not NULL, then write to it rather than stdout.
+
+ If NAMES_ONLY is true, print just names, else print names and
+ values. */
+svn_error_t *
+svn_cmdline__print_prop_hash(svn_stream_t *out,
+ apr_hash_t *prop_hash,
+ svn_boolean_t names_only,
+ apr_pool_t *pool);
+
+/* Similar to svn_cmdline__print_prop_hash(), only output xml to *OUTSTR.
+ If INHERITED_PROPS is true, then PROP_HASH contains inherited properties,
+ otherwise PROP_HASH contains explicit properties. If *OUTSTR is NULL,
+ allocate it first from POOL, otherwise append to it. */
+svn_error_t *
+svn_cmdline__print_xml_prop_hash(svn_stringbuf_t **outstr,
+ apr_hash_t *prop_hash,
+ svn_boolean_t names_only,
+ svn_boolean_t inherited_props,
+ apr_pool_t *pool);
+
+
+/* Search for a text editor command in standard environment variables,
+ and invoke it to edit PATH. Use POOL for all allocations.
+
+ If EDITOR_CMD is not NULL, it is the name of the external editor
+ command to use, overriding anything else that might determine the
+ editor.
+
+ CONFIG is a hash of svn_config_t * items keyed on a configuration
+ category (SVN_CONFIG_CATEGORY_CONFIG et al), and may be NULL. */
+svn_error_t *
+svn_cmdline__edit_file_externally(const char *path,
+ const char *editor_cmd,
+ apr_hash_t *config,
+ apr_pool_t *pool);
+
+/* Search for a text editor command in standard environment variables,
+ and invoke it to edit CONTENTS (using a temporary file created in
+ directory BASE_DIR). Return the new contents in *EDITED_CONTENTS,
+ or set *EDITED_CONTENTS to NULL if no edit was performed.
+
+ If EDITOR_CMD is not NULL, it is the name of the external editor
+ command to use, overriding anything else that might determine the
+ editor.
+
+ If TMPFILE_LEFT is NULL, the temporary file will be destroyed.
+ Else, the file will be left on disk, and its path returned in
+ *TMPFILE_LEFT.
+
+ CONFIG is a hash of svn_config_t * items keyed on a configuration
+ category (SVN_CONFIG_CATEGORY_CONFIG et al), and may be NULL.
+
+ If AS_TEXT is TRUE, recode CONTENTS and convert to native eol-style before
+ editing and back again afterwards. In this case, ENCODING determines the
+ encoding used during editing. If non-NULL, use the named encoding, else
+ use the system encoding. If AS_TEXT is FALSE, don't do any translation.
+ In that case, ENCODING is ignored.
+
+ Use POOL for all allocations. Use PREFIX as the prefix for the
+ temporary file used by the editor.
+
+ If return error, *EDITED_CONTENTS is not touched. */
+svn_error_t *
+svn_cmdline__edit_string_externally(svn_string_t **edited_contents,
+ const char **tmpfile_left,
+ const char *editor_cmd,
+ const char *base_dir,
+ const svn_string_t *contents,
+ const char *prefix,
+ apr_hash_t *config,
+ svn_boolean_t as_text,
+ const char *encoding,
+ apr_pool_t *pool);
+
+
#ifdef __cplusplus
}
#endif /* __cplusplus */
Modified: subversion/branches/tree-read-api/subversion/include/private/svn_mergeinfo_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/include/private/svn_mergeinfo_private.h?rev=1429457&r1=1429456&r2=1429457&view=diff
==============================================================================
--- subversion/branches/tree-read-api/subversion/include/private/svn_mergeinfo_private.h (original)
+++ subversion/branches/tree-read-api/subversion/include/private/svn_mergeinfo_private.h Sun Jan 6 02:33:34 2013
@@ -50,12 +50,21 @@ svn_rangelist__set_inheritance(svn_range
* R1 >= R2 in a "R1-R2" range element).
*
* Unlike svn_mergeinfo_parse(), this does not sort the ranges into order
- * or combine adjacent and overlapping ranges. */
+ * or combine adjacent and overlapping ranges.
+ *
+ * The compaction can be done with svn_rangelist__combine_adjacent_ranges().
+ */
svn_error_t *
svn_rangelist__parse(svn_rangelist_t **rangelist,
const char *str,
apr_pool_t *result_pool);
+/* In-place combines adjacent ranges in a rangelist.
+ SCRATCH_POOL is just used for providing error messages. */
+svn_error_t *
+svn_rangelist__combine_adjacent_ranges(svn_rangelist_t *rangelist,
+ apr_pool_t *scratch_pool);
+
/* Set inheritability of all rangelists in MERGEINFO to INHERITABLE.
If MERGEINFO is NULL do nothing. If a rangelist in MERGEINFO is
NULL leave it alone. */
Modified: subversion/branches/tree-read-api/subversion/include/private/svn_mutex.h
URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/include/private/svn_mutex.h?rev=1429457&r1=1429456&r2=1429457&view=diff
==============================================================================
--- subversion/branches/tree-read-api/subversion/include/private/svn_mutex.h (original)
+++ subversion/branches/tree-read-api/subversion/include/private/svn_mutex.h Sun Jan 6 02:33:34 2013
@@ -57,8 +57,8 @@ typedef void svn_mutex__t;
/** Initialize the @a *mutex. If @a mutex_required is TRUE, the mutex will
* actually be created with a lifetime defined by @a result_pool. Otherwise,
- * the pointer will be set to @c NULL and @ref svn_mutex__lock as well as
- * @ref svn_mutex__unlock will be no-ops.
+ * the pointer will be set to @c NULL and svn_mutex__lock() as well as
+ * svn_mutex__unlock() will be no-ops.
*
* If threading is not supported by APR, this function is a no-op.
*/
@@ -67,27 +67,27 @@ svn_mutex__init(svn_mutex__t **mutex,
svn_boolean_t mutex_required,
apr_pool_t *result_pool);
-/** Acquire the @a mutex, if that has been enabled in @ref svn_mutex__init.
- * Make sure to call @ref svn_mutex__unlock some time later in the same
+/** Acquire the @a mutex, if that has been enabled in svn_mutex__init().
+ * Make sure to call svn_mutex__unlock() some time later in the same
* thread to release the mutex again. Recursive locking are not supported.
*
- * @note You should use @ref SVN_MUTEX__WITH_LOCK instead of explicit lock
+ * @note You should use #SVN_MUTEX__WITH_LOCK instead of explicit lock
* aquisition and release.
*/
svn_error_t *
svn_mutex__lock(svn_mutex__t *mutex);
-/** Release the @a mutex, previously acquired using @ref svn_mutex__lock
- * that has been enabled in @ref svn_mutex__init.
+/** Release the @a mutex, previously acquired using svn_mutex__lock()
+ * that has been enabled in svn_mutex__init().
*
* Since this is often used as part of the calling function's exit
* sequence, we accept that function's current return code in @a err.
- * If it is not @ref SVN_NO_ERROR, it will be used as the return value -
+ * If it is not #SVN_NO_ERROR, it will be used as the return value -
* irrespective of the possible internal failures during unlock. If @a err
- * is @ref SVN_NO_ERROR, internal failures of this function will be
+ * is #SVN_NO_ERROR, internal failures of this function will be
* reported in the return value.
*
- * @note You should use @ref SVN_MUTEX__WITH_LOCK instead of explicit lock
+ * @note You should use #SVN_MUTEX__WITH_LOCK instead of explicit lock
* aquisition and release.
*/
svn_error_t *
@@ -96,9 +96,9 @@ svn_mutex__unlock(svn_mutex__t *mutex,
/** Aquires the @a mutex, executes the expression @a expr and finally
* releases the @a mutex. If any of these steps fail, the function using
- * this macro will return an @ref svn_error_t. This macro guarantees that
+ * this macro will return an #svn_error_t. This macro guarantees that
* the @a mutex will always be unlocked again if it got locked successfully
- * locked by the first step.
+ * by the first step.
*
* @note Prefer using this macro instead of explicit lock aquisition and
* release.
Modified: subversion/branches/tree-read-api/subversion/include/private/svn_named_atomic.h
URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/include/private/svn_named_atomic.h?rev=1429457&r1=1429456&r2=1429457&view=diff
==============================================================================
--- subversion/branches/tree-read-api/subversion/include/private/svn_named_atomic.h (original)
+++ subversion/branches/tree-read-api/subversion/include/private/svn_named_atomic.h Sun Jan 6 02:33:34 2013
@@ -100,7 +100,7 @@ svn_atomic_namespace__cleanup(const char
* be set to @c NULL. Otherwise, a new atomic will be created, its value
* set to 0 and the access structure be returned in @a *atomic.
*
- * Note that @a name must not exceed @ref SVN_NAMED_ATOMIC__MAX_NAME_LENGTH
+ * Note that @a name must not exceed #SVN_NAMED_ATOMIC__MAX_NAME_LENGTH
* characters and an error will be returned if the specified name is longer
* than supported.
*
Modified: subversion/branches/tree-read-api/subversion/include/private/svn_skel.h
URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/include/private/svn_skel.h?rev=1429457&r1=1429456&r2=1429457&view=diff
==============================================================================
--- subversion/branches/tree-read-api/subversion/include/private/svn_skel.h (original)
+++ subversion/branches/tree-read-api/subversion/include/private/svn_skel.h Sun Jan 6 02:33:34 2013
@@ -213,11 +213,11 @@ svn_skel__parse_prop(svn_string_t **prop
apr_pool_t *result_pool);
/* Unparse a PROPLIST hash (which has const char * property names and
- svn_stringbuf_t * values) into a `PROPLIST' skel *SKEL_P. Use POOL
+ svn_string_t * values) into a `PROPLIST' skel *SKEL_P. Use POOL
for all allocations. */
svn_error_t *
svn_skel__unparse_proplist(svn_skel_t **skel_p,
- apr_hash_t *proplist,
+ const apr_hash_t *proplist,
apr_pool_t *pool);
/* Unparse INHERITED_PROPS, a depth-first ordered array of
@@ -226,7 +226,8 @@ svn_skel__unparse_proplist(svn_skel_t **
svn_error_t *
svn_skel__unparse_iproplist(svn_skel_t **skel_p,
const apr_array_header_t *inherited_props,
- apr_pool_t *result_pool);
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool);
#ifdef __cplusplus
}
Modified: subversion/branches/tree-read-api/subversion/include/private/svn_sqlite.h
URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/include/private/svn_sqlite.h?rev=1429457&r1=1429456&r2=1429457&view=diff
==============================================================================
--- subversion/branches/tree-read-api/subversion/include/private/svn_sqlite.h (original)
+++ subversion/branches/tree-read-api/subversion/include/private/svn_sqlite.h Sun Jan 6 02:33:34 2013
@@ -288,6 +288,15 @@ svn_sqlite__column_token(svn_sqlite__stm
int column,
const svn_token_map_t *map);
+/* Fetch the word at COLUMN, look it up in the MAP, and return its value.
+ Returns NULL_VAL if the column is null. MALFUNCTION is thrown if the
+ column contains an unknown word. */
+int
+svn_sqlite__column_token_null(svn_sqlite__stmt_t *stmt,
+ int column,
+ const svn_token_map_t *map,
+ int null_val);
+
/* Return the column as a hash of const char * => const svn_string_t *.
If the column is null, then NULL will be stored into *PROPS. The
results will be allocated in RESULT_POOL, and any temporary allocations
@@ -363,11 +372,58 @@ svn_sqlite__result_int64(svn_sqlite__con
svn_error_t *
svn_sqlite__finalize(svn_sqlite__stmt_t *stmt);
-/* Error-handling wrapper around sqlite3_reset. */
+/* Reset STMT by calling sqlite3_reset(), and also clear any bindings to it.
+
+ Note: svn_sqlite__get_statement() calls this function automatically if
+ the requested statement has been used and has not yet been reset. */
svn_error_t *
svn_sqlite__reset(svn_sqlite__stmt_t *stmt);
+/* Begin a transaction in DB. */
+svn_error_t *
+svn_sqlite__begin_transaction(svn_sqlite__db_t *db);
+
+/* Like svn_sqlite__begin_transaction(), but takes out a 'RESERVED' lock
+ immediately, instead of using the default deferred locking scheme. */
+svn_error_t *
+svn_sqlite__begin_immediate_transaction(svn_sqlite__db_t *db);
+
+/* Begin a savepoint in DB. */
+svn_error_t *
+svn_sqlite__begin_savepoint(svn_sqlite__db_t *db);
+
+/* Commit the current transaction in DB if ERR is SVN_NO_ERROR, otherwise
+ * roll back the transaction. Return a composition of ERR and any error
+ * that may occur during the commit or roll-back. */
+svn_error_t *
+svn_sqlite__finish_transaction(svn_sqlite__db_t *db,
+ svn_error_t *err);
+
+/* Release the current savepoint in DB if EXPR is SVN_NO_ERROR, otherwise
+ * roll back to the savepoint and then release it. Return a composition of
+ * ERR and any error that may occur during the release or roll-back. */
+svn_error_t *
+svn_sqlite__finish_savepoint(svn_sqlite__db_t *db,
+ svn_error_t *err);
+
+/* Evaluate the expression EXPR within a transaction.
+ *
+ * Begin a transaction in DB; evaluate the expression EXPR, which would
+ * typically be a function call that does some work in DB; finally commit
+ * the transaction if EXPR evaluated to SVN_NO_ERROR, otherwise roll back
+ * the transaction.
+ */
+#define SVN_SQLITE__WITH_TXN(expr, db) \
+ do { \
+ svn_sqlite__db_t *svn_sqlite__db = (db); \
+ svn_error_t *svn_sqlite__err; \
+ \
+ SVN_ERR(svn_sqlite__begin_transaction(svn_sqlite__db)); \
+ svn_sqlite__err = (expr); \
+ SVN_ERR(svn_sqlite__finish_transaction(svn_sqlite__db, svn_sqlite__err)); \
+ } while (0)
+
/* Callback function to for use with svn_sqlite__with_transaction(). */
typedef svn_error_t *(*svn_sqlite__transaction_callback_t)(
void *baton, svn_sqlite__db_t *db, apr_pool_t *scratch_pool);
@@ -382,6 +438,18 @@ svn_sqlite__with_transaction(svn_sqlite_
svn_sqlite__transaction_callback_t cb_func,
void *cb_baton, apr_pool_t *scratch_pool);
+/* Like SVN_SQLITE__WITH_TXN(), but takes out a 'RESERVED' lock
+ immediately, instead of using the default deferred locking scheme. */
+#define SVN_SQLITE__WITH_IMMEDIATE_TXN(expr, db) \
+ do { \
+ svn_sqlite__db_t *svn_sqlite__db = (db); \
+ svn_error_t *svn_sqlite__err; \
+ \
+ SVN_ERR(svn_sqlite__begin_immediate_transaction(svn_sqlite__db)); \
+ svn_sqlite__err = (expr); \
+ SVN_ERR(svn_sqlite__finish_transaction(svn_sqlite__db, svn_sqlite__err)); \
+ } while (0)
+
/* Like svn_sqlite__with_transaction(), but takes out a 'RESERVED' lock
immediately, instead of using the default deferred locking scheme. */
svn_error_t *
@@ -390,6 +458,23 @@ svn_sqlite__with_immediate_transaction(s
void *cb_baton,
apr_pool_t *scratch_pool);
+/* Evaluate the expression EXPR within a 'savepoint'. Savepoints can be
+ * nested.
+ *
+ * Begin a savepoint in DB; evaluate the expression EXPR, which would
+ * typically be a function call that does some work in DB; finally release
+ * the savepoint if EXPR evaluated to SVN_NO_ERROR, otherwise roll back
+ * to the savepoint and then release it.
+ */
+#define SVN_SQLITE__WITH_LOCK(expr, db) \
+ do { \
+ svn_sqlite__db_t *svn_sqlite__db = (db); \
+ svn_error_t *svn_sqlite__err; \
+ \
+ SVN_ERR(svn_sqlite__begin_savepoint(svn_sqlite__db)); \
+ svn_sqlite__err = (expr); \
+ SVN_ERR(svn_sqlite__finish_savepoint(svn_sqlite__db, svn_sqlite__err)); \
+ } while (0)
/* Helper function to handle several SQLite operations inside a shared lock.
This callback is similar to svn_sqlite__with_transaction(), but can be
Modified: subversion/branches/tree-read-api/subversion/include/private/svn_subr_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/include/private/svn_subr_private.h?rev=1429457&r1=1429456&r2=1429457&view=diff
==============================================================================
--- subversion/branches/tree-read-api/subversion/include/private/svn_subr_private.h (original)
+++ subversion/branches/tree-read-api/subversion/include/private/svn_subr_private.h Sun Jan 6 02:33:34 2013
@@ -295,6 +295,23 @@ svn_hash__make(apr_pool_t *pool);
/** @} */
+
+/** Apply the changes described by @a prop_changes to @a original_props and
+ * return the result. The inverse of svn_prop_diffs().
+ *
+ * Allocate the resulting hash from @a pool, but allocate its keys and
+ * values from @a pool and/or by reference to the storage of the inputs.
+ *
+ * Note: some other APIs use an array of pointers to svn_prop_t.
+ *
+ * @since New in 1.8.
+ */
+apr_hash_t *
+svn_prop__patch(const apr_hash_t *original_props,
+ const apr_array_header_t *prop_changes,
+ apr_pool_t *pool);
+
+
/**
* @defgroup svn_version Version number dotted triplet parsing
* @{
Modified: subversion/branches/tree-read-api/subversion/include/private/svn_wc_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/include/private/svn_wc_private.h?rev=1429457&r1=1429456&r2=1429457&view=diff
==============================================================================
--- subversion/branches/tree-read-api/subversion/include/private/svn_wc_private.h (original)
+++ subversion/branches/tree-read-api/subversion/include/private/svn_wc_private.h Sun Jan 6 02:33:34 2013
@@ -317,25 +317,29 @@ svn_wc__del_tree_conflict(svn_wc_context
const char *victim_abspath,
apr_pool_t *scratch_pool);
-/** Like svn_wc_is_wc_root(), but it doesn't consider switched subdirs or
+/** Check whether LOCAL_ABSPATH has a parent directory that knows about its
+ * existence. Set *IS_WCROOT to FALSE if a parent is found, and to TRUE
+ * if there is no such parent.
+ *
+ * Like svn_wc_is_wc_root2(), but doesn't consider switched subdirs or
* deleted entries as working copy roots.
*/
svn_error_t *
-svn_wc__strictly_is_wc_root(svn_boolean_t *wc_root,
- svn_wc_context_t *wc_ctx,
- const char *local_abspath,
- apr_pool_t *scratch_pool);
+svn_wc__is_wcroot(svn_boolean_t *is_wcroot,
+ svn_wc_context_t *wc_ctx,
+ const char *local_abspath,
+ apr_pool_t *scratch_pool);
/** Set @a *wcroot_abspath to the local abspath of the root of the
* working copy in which @a local_abspath resides.
*/
svn_error_t *
-svn_wc__get_wc_root(const char **wcroot_abspath,
- svn_wc_context_t *wc_ctx,
- const char *local_abspath,
- apr_pool_t *result_pool,
- apr_pool_t *scratch_pool);
+svn_wc__get_wcroot(const char **wcroot_abspath,
+ svn_wc_context_t *wc_ctx,
+ const char *local_abspath,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool);
/**
* The following are temporary APIs to aid in the transition from wc-1 to
@@ -1590,7 +1594,11 @@ svn_wc__get_switch_editor(const svn_delt
* and for top-level file entries as well (if any). If
* #svn_depth_immediates, do the same as #svn_depth_files but also diff
* top-level subdirectories at #svn_depth_empty. If #svn_depth_infinity,
- * then diff fully recursively.
+ * then diff fully recursively. If @a depth is #svn_depth_unknown, then...
+ *
+ * ### ... then the @a server_performs_filtering option is meaningful.
+ * ### But what does this depth mean exactly? Something about 'ambient'
+ * ### depth? How does it compare with depth 'infinity'?
*
* @a ignore_ancestry determines whether paths that have discontinuous node
* ancestry are treated as delete/add or as simple modifications. If
@@ -1617,10 +1625,29 @@ svn_wc__get_switch_editor(const svn_delt
* it's a member of one of those changelists. If @a changelist_filter is
* empty (or altogether @c NULL), no changelist filtering occurs.
*
- * If @a server_performs_filtering is TRUE, assume that the server handles
+ * If @a server_performs_filtering is TRUE, assume that the server handles
* the ambient depth filtering, so this doesn't have to be handled in the
* editor.
*
+ *
+ * A diagram illustrating how this function is used.
+ *
+ * Steps 1 and 2 create the chain; step 3 drives it.
+ *
+ * 1. svn_wc__get_diff_editor(diff_cbs)
+ * | ^
+ * 2. svn_ra_do_diff3(editor) | |
+ * | ^ | |
+ * v | v |
+ * +----------+ +----------+ +----------+
+ * | | | | | |
+ * +--> | reporter | ----> | editor | ----> | diff_cbs | ----> text
+ * | | | | | | | out
+ * | +----------+ +----------+ +----------+
+ * |
+ * 3. svn_wc_crawl_revisions5(WC,reporter)
+ *
+ *
* @since New in 1.8.
*/
svn_error_t *
Modified: subversion/branches/tree-read-api/subversion/include/svn_client.h
URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/include/svn_client.h?rev=1429457&r1=1429456&r2=1429457&view=diff
==============================================================================
--- subversion/branches/tree-read-api/subversion/include/svn_client.h (original)
+++ subversion/branches/tree-read-api/subversion/include/svn_client.h Sun Jan 6 02:33:34 2013
@@ -4208,21 +4208,26 @@ svn_client_resolved(const char *path,
/** Perform automatic conflict resolution on a working copy @a path.
*
- * If @a depth is #svn_depth_empty, act only on @a path; if
- * #svn_depth_files, resolve @a path and its conflicted file
- * children (if any); if #svn_depth_immediates, resolve @a path and
- * all its immediate conflicted children (both files and directories,
- * if any); if #svn_depth_infinity, resolve @a path and every
- * conflicted file or directory anywhere beneath it.
- * Note that this operation will try to lock the parent directory of
- * @a path in order to be able to resolve tree-conflicts on @a path.
+ * If @a conflict_choice is
+ *
+ * - #svn_wc_conflict_choose_base:
+ * resolve the conflict with the old file contents
+ *
+ * - #svn_wc_conflict_choose_mine_full:
+ * use the original working contents
+ *
+ * - #svn_wc_conflict_choose_theirs_full:
+ * use the new contents
+ *
+ * - #svn_wc_conflict_choose_merged:
+ * don't change the contents at all, just remove the conflict
+ * status, which is the pre-1.5 behavior.
*
- * If @a conflict_choice is #svn_wc_conflict_choose_base, resolve the
- * conflict with the old file contents; if
- * #svn_wc_conflict_choose_mine_full, use the original working contents;
- * if #svn_wc_conflict_choose_theirs_full, the new contents; and if
- * #svn_wc_conflict_choose_merged, don't change the contents at all,
- * just remove the conflict status, which is the pre-1.5 behavior.
+ * - #svn_wc_conflict_choose_theirs_conflict
+ * ###...
+ *
+ * - #svn_wc_conflict_choose_mine_conflict
+ * ###...
*
* #svn_wc_conflict_choose_theirs_conflict and
* #svn_wc_conflict_choose_mine_conflict are not legal for binary
@@ -4232,6 +4237,16 @@ svn_client_resolved(const char *path,
* If @a path's conflict state is removed and @a ctx->notify_func2 is non-NULL,
* call @a ctx->notify_func2 with @a ctx->notify_baton2 and @a path.
*
+ * If @a depth is #svn_depth_empty, act only on @a path; if
+ * #svn_depth_files, resolve @a path and its conflicted file
+ * children (if any); if #svn_depth_immediates, resolve @a path and
+ * all its immediate conflicted children (both files and directories,
+ * if any); if #svn_depth_infinity, resolve @a path and every
+ * conflicted file or directory anywhere beneath it.
+ *
+ * Note that this operation will try to lock the parent directory of
+ * @a path in order to be able to resolve tree-conflicts on @a path.
+ *
* @since New in 1.5.
*/
svn_error_t *
Modified: subversion/branches/tree-read-api/subversion/include/svn_cmdline.h
URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/include/svn_cmdline.h?rev=1429457&r1=1429456&r2=1429457&view=diff
==============================================================================
--- subversion/branches/tree-read-api/subversion/include/svn_cmdline.h (original)
+++ subversion/branches/tree-read-api/subversion/include/svn_cmdline.h Sun Jan 6 02:33:34 2013
@@ -381,6 +381,15 @@ svn_cmdline__getopt_init(apr_getopt_t **
const char *argv[],
apr_pool_t *pool);
+/* Determine whether interactive mode should be enabled, based on whether
+ * the user passed the --non-interactive or --force-interactive options.
+ * If neither option was passed, interactivity is enabled if standard
+ * input is connected to a terminal device.
+ * @since New in 1.8. */
+svn_boolean_t
+svn_cmdline__be_interactive(svn_boolean_t non_interactive,
+ svn_boolean_t force_interactive);
+
#ifdef __cplusplus
}
#endif /* __cplusplus */
Modified: subversion/branches/tree-read-api/subversion/include/svn_config.h
URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/include/svn_config.h?rev=1429457&r1=1429456&r2=1429457&view=diff
==============================================================================
--- subversion/branches/tree-read-api/subversion/include/svn_config.h (original)
+++ subversion/branches/tree-read-api/subversion/include/svn_config.h Sun Jan 6 02:33:34 2013
@@ -34,6 +34,7 @@
#include <apr_hash.h> /* for apr_hash_t */
#include "svn_types.h"
+#include "svn_io.h"
#ifdef __cplusplus
extern "C" {
@@ -86,6 +87,10 @@ typedef struct svn_config_t svn_config_t
#define SVN_CONFIG_OPTION_STORE_SSL_CLIENT_CERT_PP_PLAINTEXT \
"store-ssl-client-cert-pp-plaintext"
#define SVN_CONFIG_OPTION_USERNAME "username"
+/** @since New in 1.8. */
+#define SVN_CONFIG_OPTION_HTTP_BULK_UPDATES "http-bulk-updates"
+/** @since New in 1.8. */
+#define SVN_CONFIG_OPTION_HTTP_MAX_CONNECTIONS "http-max-connections"
#define SVN_CONFIG_CATEGORY_CONFIG "config"
#define SVN_CONFIG_SECTION_AUTH "auth"
@@ -177,6 +182,7 @@ typedef struct svn_config_t svn_config_t
#define SVN_CONFIG_DEFAULT_OPTION_STORE_SSL_CLIENT_CERT_PP TRUE
#define SVN_CONFIG_DEFAULT_OPTION_STORE_SSL_CLIENT_CERT_PP_PLAINTEXT \
SVN_CONFIG_ASK
+#define SVN_CONFIG_DEFAULT_OPTION_HTTP_MAX_CONNECTIONS 4
/** Read configuration information from the standard sources and merge it
* into the hash @a *cfg_hash. If @a config_dir is not NULL it specifies a
@@ -242,6 +248,21 @@ svn_config_read(svn_config_t **cfgp,
svn_boolean_t must_exist,
apr_pool_t *pool);
+/** Read configuration data from @a stream into @a *cfgp, allocated in
+ * @a result_pool.
+ *
+ * If @a section_names_case_sensitive is TRUE, populate section name hashes
+ * case sensitively, except for the default SVN_CONFIG__DEFAULT_SECTION.
+ *
+ * @since New in 1.8.
+ */
+
+svn_error_t *
+svn_config_parse(svn_config_t **cfgp,
+ svn_stream_t *stream,
+ svn_boolean_t section_names_case_sensitive,
+ apr_pool_t *result_pool);
+
/** Like svn_config_read(), but merges the configuration data from @a file
* (a file or registry path) into @a *cfg, which was previously returned
* from svn_config_read(). This function invalidates all value
Modified: subversion/branches/tree-read-api/subversion/include/svn_dav.h
URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/include/svn_dav.h?rev=1429457&r1=1429456&r2=1429457&view=diff
==============================================================================
--- subversion/branches/tree-read-api/subversion/include/svn_dav.h (original)
+++ subversion/branches/tree-read-api/subversion/include/svn_dav.h Sun Jan 6 02:33:34 2013
@@ -192,6 +192,11 @@ extern "C" {
* @since New in 1.8. */
#define SVN_DAV_SUPPORTED_POSTS_HEADER "SVN-Supported-Posts"
+/** This header is used in the OPTIONS response to indicate if the server
+ * wants bulk update requests (Prefer) or only accepts skelta requests (Off).
+ * If this value is On both options are allowed.
+ * @since New in 1.8. */
+#define SVN_DAV_ALLOW_BULK_UPDATES "SVN-Allow-Bulk-Updates"
/**
* @name Fulltext MD5 headers
Modified: subversion/branches/tree-read-api/subversion/include/svn_delta.h
URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/include/svn_delta.h?rev=1429457&r1=1429456&r2=1429457&view=diff
==============================================================================
--- subversion/branches/tree-read-api/subversion/include/svn_delta.h (original)
+++ subversion/branches/tree-read-api/subversion/include/svn_delta.h Sun Jan 6 02:33:34 2013
@@ -368,7 +368,7 @@ svn_txdelta_md5_digest(svn_txdelta_strea
* @a source and @a target are both readable generic streams. When we call
* svn_txdelta_next_window() on @a *stream, it will read from @a source and
* @a target to gather as much data as it needs. If @a calculate_checksum
- * is set, you may call @ref svn_txdelta_md5_digest to get an MD5 checksum
+ * is set, you may call svn_txdelta_md5_digest() to get an MD5 checksum
* for @a target.
*
* Do any necessary allocation in a sub-pool of @a pool.
Modified: subversion/branches/tree-read-api/subversion/include/svn_editor.h
URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/include/svn_editor.h?rev=1429457&r1=1429456&r2=1429457&view=diff
==============================================================================
--- subversion/branches/tree-read-api/subversion/include/svn_editor.h (original)
+++ subversion/branches/tree-read-api/subversion/include/svn_editor.h Sun Jan 6 02:33:34 2013
@@ -79,8 +79,8 @@ extern "C" {
* coupling between those subsystems.
*
* The set of changes, and the data necessary to describe it entirely, is
- * completely unbounded. An addition of one simple 20Gb file would be well
- * past the available memory of any machine processing these operations.
+ * completely unbounded. An addition of one simple 20 GB file might be well
+ * past the available memory of a machine processing these operations.
* As a result, the API to describe the changes is designed to be applied
* in a sequential (and relatively random-access) model. The operations
* can be streamed from the driver to the receiver, resulting in the
@@ -884,8 +884,11 @@ svn_editor_add_absent(svn_editor_t *edit
*
* Alter the properties of the directory at @a relpath.
*
- * @a revision specifies the expected revision of the directory and is
- * used to catch attempts at altering out-of-date directories. If the
+ * @a revision specifies the revision at which the receiver should
+ * expect to find this node. That is, @a relpath at the start of the
+ * whole edit and @a relpath at @a revision must lie within the same
+ * node-rev (aka location history segment). This information may be used
+ * to catch an attempt to alter and out-of-date directory. If the
* directory does not have a corresponding revision in the repository
* (e.g. it has not yet been committed), then @a revision should be
* #SVN_INVALID_REVNUM.
@@ -927,8 +930,8 @@ svn_editor_alter_directory(svn_editor_t
* The properties and/or the contents must be changed. It is an error to
* pass NULL for @a props, @a checksum, and @a contents.
*
- * For a description of @a checksum, and @a contents see
- * svn_editor_add_file(). This functions allows @a props to be NULL, but
+ * For a description of @a checksum and @a contents see
+ * svn_editor_add_file(). This function allows @a props to be NULL, but
* the parameter is otherwise described by svn_editor_add_file().
*
* For all restrictions on driving the editor, see #svn_editor_t.
@@ -955,7 +958,7 @@ svn_editor_alter_file(svn_editor_t *edit
* The properties and/or the target must be changed. It is an error to
* pass NULL for @a props and @a target.
*
- * This functions allows @a props to be NULL, but the parameter is
+ * This function allows @a props to be NULL, but the parameter is
* otherwise described by svn_editor_add_file().
*
* For all restrictions on driving the editor, see #svn_editor_t.
@@ -1004,8 +1007,14 @@ svn_editor_copy(svn_editor_t *editor,
svn_revnum_t replaces_rev);
/** Drive @a editor's #svn_editor_cb_move_t callback.
- * Move the node at @a src_relpath, expected to be identical to revision @a
- * src_revision of that path, to @a dst_relpath.
+ *
+ * Move the node at @a src_relpath to @a dst_relpath.
+ *
+ * @a src_revision specifies the revision at which the receiver should
+ * expect to find this node. That is, @a src_relpath at the start of
+ * the whole edit and @a src_relpath at @a src_revision must lie within
+ * the same node-rev (aka history-segment). This is just like the
+ * revisions specified to svn_editor_delete() and svn_editor_rotate().
*
* For a description of @a replaces_rev, see svn_editor_add_file().
*
@@ -1032,7 +1041,7 @@ svn_editor_move(svn_editor_t *editor,
* For example, the node at index 0 of @a relpaths and @a revisions will
* be moved to the relpath specified at index 1 of @a relpaths. The node
* at index 1 will be moved to the location at index 2. The node at index
- * N-1 will be moved to the relpath specifed at index 0.
+ * N-1 will be moved to the relpath specified at index 0.
*
* The simplest form of this operation is to swap nodes A and B. One may
* think to move A to a temporary location T, then move B to A, then move
Modified: subversion/branches/tree-read-api/subversion/include/svn_error.h
URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/include/svn_error.h?rev=1429457&r1=1429456&r2=1429457&view=diff
==============================================================================
--- subversion/branches/tree-read-api/subversion/include/svn_error.h (original)
+++ subversion/branches/tree-read-api/subversion/include/svn_error.h Sun Jan 6 02:33:34 2013
@@ -315,8 +315,6 @@ svn_handle_warning(FILE *stream,
* @since New in 1.7.
*/
#ifdef SVN_ERR__TRACING
-#define SVN_ERR__TRACED "traced call"
-
svn_error_t *
svn_error__trace(const char *file, long line, svn_error_t *err);
Modified: subversion/branches/tree-read-api/subversion/include/svn_io.h
URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/include/svn_io.h?rev=1429457&r1=1429456&r2=1429457&view=diff
==============================================================================
--- subversion/branches/tree-read-api/subversion/include/svn_io.h (original)
+++ subversion/branches/tree-read-api/subversion/include/svn_io.h Sun Jan 6 02:33:34 2013
@@ -724,7 +724,7 @@ svn_io_file_lock2(const char *lock_file,
* is not available: throw an error instead.
*
* Lock will be automatically released when @a pool is cleared or destroyed.
- * You may also explicitly call @ref svn_io_unlock_open_file.
+ * You may also explicitly call svn_io_unlock_open_file().
* Use @a pool for memory allocations. @a pool must be the pool that
* @a lockfile_handle has been created in or one of its sub-pools.
*
@@ -1935,7 +1935,8 @@ svn_boolean_t
svn_io_is_binary_data(const void *buf, apr_size_t len);
-/** Wrapper for apr_file_open(). @a fname is utf8-encoded. */
+/** Wrapper for apr_file_open(). @a fname is utf8-encoded.
+ Always passed flag | APR_BINARY to apr. */
svn_error_t *
svn_io_file_open(apr_file_t **new_file,
const char *fname,
Modified: subversion/branches/tree-read-api/subversion/include/svn_mergeinfo.h
URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/include/svn_mergeinfo.h?rev=1429457&r1=1429456&r2=1429457&view=diff
==============================================================================
--- subversion/branches/tree-read-api/subversion/include/svn_mergeinfo.h (original)
+++ subversion/branches/tree-read-api/subversion/include/svn_mergeinfo.h Sun Jan 6 02:33:34 2013
@@ -315,6 +315,9 @@ svn_rangelist_diff(svn_rangelist_t **del
* in sorted order and be compacted to the minimal number of ranges
* needed to represent the merged result.
*
+ * If the original rangelisted contain non collapsed adjacent ranges, the
+ * final result is not guaranteed to be compacted either.
+ *
* Use @a scratch_pool for temporary allocations.
*
* @since New in 1.8.
@@ -331,6 +334,9 @@ svn_rangelist_merge2(svn_rangelist_t *ra
* in place. If not used carefully, this function can use up a lot of memory
* if called in a loop.
*
+ * It performs an extra adjacent range compaction round to make sure non
+ * collapsed input ranges are compacted in the result.
+ *
* @since New in 1.5.
* @deprecated Provided for backward compatibility with the 1.7 API.
*/
Modified: subversion/branches/tree-read-api/subversion/include/svn_path.h
URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/include/svn_path.h?rev=1429457&r1=1429456&r2=1429457&view=diff
==============================================================================
--- subversion/branches/tree-read-api/subversion/include/svn_path.h (original)
+++ subversion/branches/tree-read-api/subversion/include/svn_path.h Sun Jan 6 02:33:34 2013
@@ -670,6 +670,58 @@ svn_path_cstring_to_utf8(const char **pa
/** @} */
+
+/** Repository relative URLs
+ *
+ * @defgroup svn_path_repos_relative_urls Repository relative URLs
+ * @{
+ */
+
+
+/**
+ * Return true iff @a path is a repository-relative URL: specifically that
+ * it starts with the characters "^/"
+ *
+ * @a path is in UTF-8 encoding.
+ *
+ * Does not check whether @a path is a properly URI-encoded, canonical, or
+ * valid in any other way.
+ *
+ * @since New in 1.8.
+ */
+svn_boolean_t
+svn_path_is_repos_relative_url(const char *path);
+
+/**
+ * Set @a absolute_url to the absolute URL represented by @a relative_url
+ * relative to @a repos_root_url. @a absolute_url will be allocated in
+ * @a pool.
+ *
+ * @a absolute_url will end with a peg revision specifier if @a relative_url
+ * did.
+ *
+ * @a relative_url is in repository-relative syntax: "^/[REL-URL][@PEG]"
+ *
+ * @a repos_root_url is the absolute url of the repository root.
+ *
+ * All strings are in UTF-8 encoding.
+ *
+ * @a repos_root_url and @a relative_url do not have to be properly
+ * URI-encoded, canonical, or valid in any other way. The caller is expected
+ * to perform canonicalization on @a absolute_url after the call to the
+ * function.
+ *
+ * @since New in 1.8.
+ */
+svn_error_t *
+svn_path_resolve_repos_relative_url(const char **absolute_url,
+ const char *relative_url,
+ const char *repos_root_url,
+ apr_pool_t *pool);
+
+
+/** @} */
+
#ifdef __cplusplus
}
#endif /* __cplusplus */
Modified: subversion/branches/tree-read-api/subversion/include/svn_pools.h
URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/include/svn_pools.h?rev=1429457&r1=1429456&r2=1429457&view=diff
==============================================================================
--- subversion/branches/tree-read-api/subversion/include/svn_pools.h (original)
+++ subversion/branches/tree-read-api/subversion/include/svn_pools.h Sun Jan 6 02:33:34 2013
@@ -87,7 +87,7 @@ svn_pool_create_ex_debug(pool, allocator
#define svn_pool_destroy apr_pool_destroy
/** Return a new allocator. This function limits the unused memory in the
- * new allocator to @ref SVN_ALLOCATOR_RECOMMENDED_MAX_FREE and ensures
+ * new allocator to #SVN_ALLOCATOR_RECOMMENDED_MAX_FREE and ensures
* proper synchronization if the allocator is used by multiple threads.
*
* If your application uses multiple threads, creating a separate allocator
Modified: subversion/branches/tree-read-api/subversion/include/svn_props.h
URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/include/svn_props.h?rev=1429457&r1=1429456&r2=1429457&view=diff
==============================================================================
--- subversion/branches/tree-read-api/subversion/include/svn_props.h (original)
+++ subversion/branches/tree-read-api/subversion/include/svn_props.h Sun Jan 6 02:33:34 2013
@@ -110,7 +110,7 @@ typedef struct svn_prop_inherited_item_t
* @since New in 1.5.
*/
apr_array_header_t *
-svn_prop_hash_to_array(apr_hash_t *hash,
+svn_prop_hash_to_array(const apr_hash_t *hash,
apr_pool_t *pool);
/**
@@ -133,7 +133,7 @@ svn_prop_array_to_hash(const apr_array_h
* @since New in 1.6.
*/
apr_hash_t *
-svn_prop_hash_dup(apr_hash_t *hash,
+svn_prop_hash_dup(const apr_hash_t *hash,
apr_pool_t *pool);
/**
@@ -144,7 +144,7 @@ svn_prop_hash_dup(apr_hash_t *hash,
* @since New in 1.7.
*/
const char *
-svn_prop_get_value(apr_hash_t *properties,
+svn_prop_get_value(const apr_hash_t *properties,
const char *prop_name);
/**
@@ -317,8 +317,8 @@ svn_categorize_props(const apr_array_hea
*/
svn_error_t *
svn_prop_diffs(apr_array_header_t **propdiffs,
- apr_hash_t *target_props,
- apr_hash_t *source_props,
+ const apr_hash_t *target_props,
+ const apr_hash_t *source_props,
apr_pool_t *pool);
Modified: subversion/branches/tree-read-api/subversion/include/svn_ra.h
URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/include/svn_ra.h?rev=1429457&r1=1429456&r2=1429457&view=diff
==============================================================================
--- subversion/branches/tree-read-api/subversion/include/svn_ra.h (original)
+++ subversion/branches/tree-read-api/subversion/include/svn_ra.h Sun Jan 6 02:33:34 2013
@@ -1930,6 +1930,12 @@ svn_ra_get_deleted_rev(svn_ra_session_t
* inheritable properties are found, then set @a *inherited_props to
* an empty array.
*
+ * If @a use_relpath_keys is true, then the
+ * #svn_prop_inherited_item_t->path_or_url members of the
+ * #svn_prop_inherited_item_t * structures in @a *inherited_props are
+ * paths relative to the repository root URL (of the repository which
+ * @a ra_session is associated). Otherwise these members are URLs.
+ *
* Allocated @a *inherited_props in @a result_pool, use @a scratch_pool
* for temporary allocations.
*
@@ -1940,6 +1946,7 @@ svn_ra_get_inherited_props(svn_ra_sessio
apr_array_header_t **inherited_props,
const char *path,
svn_revnum_t revision,
+ svn_boolean_t use_relpath_keys,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
Modified: subversion/branches/tree-read-api/subversion/include/svn_repos.h
URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/include/svn_repos.h?rev=1429457&r1=1429456&r2=1429457&view=diff
==============================================================================
--- subversion/branches/tree-read-api/subversion/include/svn_repos.h (original)
+++ subversion/branches/tree-read-api/subversion/include/svn_repos.h Sun Jan 6 02:33:34 2013
@@ -1321,7 +1321,8 @@ svn_repos_replay(svn_fs_root_t *root,
*
* @a repos is a previously opened repository. @a repos_url is the
* decoded URL to the base of the repository, and is used to check
- * copyfrom paths. @a txn is a filesystem transaction object to use
+ * copyfrom paths. copyfrom paths passed to the editor must be full,
+ * URI-encoded, URLs. @a txn is a filesystem transaction object to use
* during the commit, or @c NULL to indicate that this function should
* create (and fully manage) a new transaction.
*
@@ -3147,16 +3148,15 @@ svn_repos_get_fs_build_parser(const svn_
*/
typedef struct svn_authz_t svn_authz_t;
-/** Read authz configuration data from @a file (a file or registry
- * path) into @a *authz_p, allocated in @a pool.
- *
- * If @a file is not a valid authz rule file, then return
- * SVN_AUTHZ_INVALID_CONFIG. The contents of @a *authz_p is then
- * undefined. If @a must_exist is TRUE, a missing authz file is also
- * an error.
+/**
+ * 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,
@@ -3164,6 +3164,40 @@ svn_repos_authz_read(svn_authz_t **authz
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.
+ *
+ * If @a path is not a valid authz rule file, then return
+ * #SVN_ERR_AUTHZ_INVALID_CONFIG. The contents of @a *authz_p is then
+ * undefined. If @a must_exist is TRUE, a missing authz file is also
+ * an error.
+ *
+ * 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.
+ *
+ * @since New in 1.8
+ */
+svn_error_t *
+svn_repos_authz_read2(svn_authz_t **authz_p,
+ const char *path,
+ svn_boolean_t must_exist,
+ const char *repos_root,
+ apr_pool_t *pool);
+
+
+/**
+ * Read authz configuration data from @a stream into @a *authz_p,
+ * allocated in @a pool.
+ *
+ * @since New in 1.8
+ */
+svn_error_t *
+svn_repos_authz_parse(svn_authz_t **authz_p,
+ svn_stream_t *stream,
+ apr_pool_t *pool);
+
+/**
* Check whether @a user can access @a path in the repository @a
* repos_name with the @a required_access. @a authz lists the ACLs to
* check against. Set @a *access_granted to indicate if the requested
@@ -3282,6 +3316,9 @@ svn_repos_check_revision_access(svn_repo
* inherited by @a path in @a root. If no properties are inherited,
* then set @a *inherited_values to an empty array.
*
+ * if @a propname is NULL then retrieve all explicit and/or inherited
+ * properties. Otherwise retrieve only the properties named @a propname.
+ *
* If optional @a authz_read_func is non-NULL, then use this function
* (along with optional @a authz_read_baton) to check the readability
* of each parent path from which properties are inherited. Silently omit
@@ -3296,6 +3333,7 @@ svn_error_t *
svn_repos_fs_get_inherited_props(apr_array_header_t **inherited_props,
svn_fs_root_t *root,
const char *path,
+ const char *propname,
svn_repos_authz_func_t authz_read_func,
void *authz_read_baton,
apr_pool_t *result_pool,
Modified: subversion/branches/tree-read-api/subversion/include/svn_subst.h
URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/include/svn_subst.h?rev=1429457&r1=1429456&r2=1429457&view=diff
==============================================================================
--- subversion/branches/tree-read-api/subversion/include/svn_subst.h (original)
+++ subversion/branches/tree-read-api/subversion/include/svn_subst.h Sun Jan 6 02:33:34 2013
@@ -128,8 +128,14 @@ typedef struct svn_subst_keywords_t
* 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. Any of these can be @c NULL to indicate that the information is
- * not present, or @c 0 for @a date.
+ * commit.
+ *
+ * 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
+ * result in multiple adjacent spaces in the expansion of a multi-valued
+ * keyword such as "Id".)
*
* Hash keys are of type <tt>const char *</tt>.
* Hash values are of type <tt>svn_string_t *</tt>.
Modified: subversion/branches/tree-read-api/subversion/include/svn_wc.h
URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/include/svn_wc.h?rev=1429457&r1=1429456&r2=1429457&view=diff
==============================================================================
--- subversion/branches/tree-read-api/subversion/include/svn_wc.h (original)
+++ subversion/branches/tree-read-api/subversion/include/svn_wc.h Sun Jan 6 02:33:34 2013
@@ -1132,7 +1132,7 @@ typedef enum svn_wc_notify_action_t
* @since New in 1.7. */
svn_wc_notify_update_shadowed_add,
- /** A node below an exising node was updated during update.
+ /** A node below an existing node was updated during update.
* @since New in 1.7. */
svn_wc_notify_update_shadowed_update,
@@ -1662,10 +1662,10 @@ typedef struct svn_wc_conflict_version_t
const char *path_in_repos;
/** @} */
- /** Info about this node */
- svn_node_kind_t node_kind; /* note that 'none' is a legitimate value */
+ /** The node kind. Can be any kind, even 'none' or 'unknown'. */
+ svn_node_kind_t node_kind;
- /** UUID of the repository
+ /** UUID of the repository. Can be NULL meaning unknown.
* @since New in 1.8. */
const char *repos_uuid;
@@ -1680,11 +1680,15 @@ typedef struct svn_wc_conflict_version_t
* Allocate an #svn_wc_conflict_version_t structure in @a pool,
* initialize to contain a conflict origin, and return it.
*
- * Set the @c repos_url field of the created struct to @a repos_url, the
- * @c path_in_repos field to @a path_in_repos, the @c peg_rev field to
- * @a peg_rev and the @c node_kind to @c node_kind. Make only shallow
+ * Set the @c repos_url field of the created struct to @a repos_root_url,
+ * the @c path_in_repos field to @a repos_relpath, the @c peg_rev field to
+ * @a revision and the @c node_kind to @a kind. Make only shallow
* copies of the pointer arguments.
*
+ * @a repos_root_url, @a repos_relpath and @a revision must be valid,
+ * non-null values. @a repos_uuid should be a valid UUID, but can be
+ * NULL if unknown. @a kind can be any kind, even 'none' or 'unknown'.
+ *
* @since New in 1.8.
*/
svn_wc_conflict_version_t *
@@ -4524,7 +4528,16 @@ svn_wc_delete(const char *path,
/**
* Schedule the single node that exists on disk at @a local_abspath for
- * addition to the working copy. The added node will have no properties.
+ * addition to the working copy. The added node will have the properties
+ * provided in @a props, or none if that is NULL.
+ *
+ * Check and canonicalize the properties in the same way as
+ * svn_wc_prop_set4(). Return an error and don't add the node if the
+ * properties are not valid on this node. Unlike svn_wc_prop_set4()
+ * there is no option to skip some of the checks and canonicalizations.
+ *
+ * ### The error code on validity check failure should be specified, and
+ * preferably should be a single code.
*
* The versioned state of the parent path must be a modifiable directory,
* and the versioned state of @a local_abspath must be either nonexistent or
@@ -4533,14 +4546,28 @@ svn_wc_delete(const char *path,
* If @a local_abspath does not exist as file, directory or symlink, return
* #SVN_ERR_WC_PATH_NOT_FOUND.
*
- * This is a replacement for svn_wc_add4() case 2a.
+ * ### TODO: Split into add_dir, add_file, add_symlink?
*
- * ### TODO: Allow the caller to provide the node's properties?
+ * @since New in 1.8.
+ */
+svn_error_t *
+svn_wc_add_from_disk2(svn_wc_context_t *wc_ctx,
+ const char *local_abspath,
+ const apr_hash_t *props,
+ svn_wc_notify_func2_t notify_func,
+ void *notify_baton,
+ apr_pool_t *scratch_pool);
+
+
+/**
+ * Similar to svn_wc_add4(), but gives the new node an empty set of properties.
*
- * ### TODO: Split into add_dir, add_file, add_symlink?
+ * This is a replacement for svn_wc_add4() case 2a.
*
* @since New in 1.7.
+ * @deprecated Provided for backward compatibility with the 1.7 API.
*/
+SVN_DEPRECATED
svn_error_t *
svn_wc_add_from_disk(svn_wc_context_t *wc_ctx,
const char *local_abspath,
@@ -5404,10 +5431,10 @@ svn_wc_crawl_revisions(const char *path,
*/
/** If @a is_wcroot is not @c NULL, set @a *is_wcroot to @c TRUE if @a
- * local_abspath is the root of the working, otherwise to @c FALSE.
+ * local_abspath is the root of the working copy, otherwise to @c FALSE.
*
* If @a is_switched is not @c NULL, set @a *is_switched to @c TRUE if @a
- * local_abspath is not the root of the working, and switched against its
+ * local_abspath is not the root of the working copy, and switched against its
* parent.
*
* If @a kind is not @c NULL, set @a *kind to the node kind of @a
@@ -6029,19 +6056,29 @@ svn_wc_prop_get(const svn_string_t **val
* NULL, remove property @a name from @a local_abspath. Use @a wc_ctx to
* access @a local_abspath.
*
- * If @a skip_checks is TRUE, do no validity checking. But if @a
- * skip_checks is FALSE, and @a name is not a valid property for @a
- * path, return an error, either #SVN_ERR_ILLEGAL_TARGET (if the
+ * @a name may be a regular property or a "wc property". If @a name is
+ * an "entry property", return the error #SVN_ERR_BAD_PROP_KIND (even if
+ * @a skip_checks is TRUE).
+ *
+ * If @a name is a "wc property", then just update the WC DAV cache for
+ * @a local_abspath with @a name and @a value. In this case, @a depth
+ * must be #svn_depth_empty.
+ *
+ * The rest of this description applies when @a name is a regular property.
+ *
+ * If @a name is a name in the reserved "svn:" name space, and @a value is
+ * non-null, then canonicalize the property value and check the property
+ * name and value as documented for svn_wc_canonicalize_svn_prop().
+ * @a skip_checks controls the level of checking as documented there.
+ *
+ * Return an error if the canonicalization or the check fails.
+ * The error will be either #SVN_ERR_ILLEGAL_TARGET (if the
* property is not appropriate for @a path), or
* #SVN_ERR_BAD_MIME_TYPE (if @a name is "svn:mime-type", but @a value
* is not a valid mime-type).
+ * ### That is not currently right -- several other errors can be raised.
*
- * @a depth follows the usual semeatic for depth. If the property is a
- * wc property, @a depth must be #svn_depth_empty.
- *
- * @a name may be a wc property or a regular property; but if it is an
- * entry property, return the error #SVN_ERR_BAD_PROP_KIND, even if
- * @a skip_checks is TRUE.
+ * @a depth follows the usual semantics for depth.
*
* @a changelist_filter is an array of <tt>const char *</tt> changelist
* names, used as a restrictive filter on items whose properties are
@@ -6059,6 +6096,14 @@ svn_wc_prop_get(const svn_string_t **val
*
* Use @a scratch_pool for temporary allocation.
*
+ * @note If the caller is setting both svn:mime-type and svn:eol-style in
+ * separate calls, and @a skip_checks is false, there is an ordering
+ * dependency between them, as the validity check for svn:eol-style makes
+ * use of the current value of svn:mime-type.
+ *
+ * ### The error code on validity check failure should be specified, and
+ * should be a single code or a very small set of possibilities.
+ *
* @since New in 1.7.
*/
svn_error_t *
@@ -6077,7 +6122,7 @@ svn_wc_prop_set4(svn_wc_context_t *wc_ct
/** Similar to svn_wc_prop_set4(), but with a #svn_wc_adm_access_t /
* relative path parameter pair, no @a depth parameter, no changelist
- * filtering (for the depth-based property setting), and no cancelation.
+ * filtering (for the depth-based property setting), and no cancellation.
*
* @since New in 1.6.
* @deprecated Provided for backwards compatibility with the 1.6 API.
@@ -6161,6 +6206,8 @@ svn_wc_is_entry_prop(const char *name);
* (Currently, this is used if you are attempting to set the
* #SVN_PROP_EOL_STYLE property, to make sure that the value matches
* the mime type and contents.)
+ *
+ * @since New in 1.5.
*/
typedef svn_error_t *(*svn_wc_canonicalize_svn_prop_get_file_t)(
const svn_string_t **mime_type,
@@ -6176,23 +6223,59 @@ typedef svn_error_t *(*svn_wc_canonicali
* is otherwise invalid, throw an error. Otherwise, set @a *propval_p
* to a canonicalized version of the property value.
*
- * If @a skip_some_checks is TRUE, some validity checks and
- * canonicalizations are skipped. Presently, these are:
- * - For svn:eol-style: strip white space; check value is recognized;
- * check file content matches value.
- * - For svn:mime-type: strip white space; check value has reasonable
- * syntax.
- *
- * Some validity checks require access to the contents and MIME type
- * of the target if it is a file; they will call @a prop_getter with @a
- * getter_baton, which then needs to set the MIME type and print the
- * contents of the file to the given stream.
+ * The exact set of canonicalizations and checks may vary across different
+ * versions of this API. Currently:
+ *
+ * - svn:executable
+ * - svn:needs-lock
+ * - svn:special
+ * - set the value to '*'
+ *
+ * - svn:keywords
+ * - strip leading and trailing white space
+ *
+ * - svn:ignore
+ * - svn:global-ignores
+ * - svn:auto-props
+ * - add a final a newline character if missing
+ *
+ * - svn:externals
+ * - add a final a newline character if missing
+ * - check for valid syntax
+ * - check for no duplicate entries
+ *
+ * - svn:mergeinfo
+ * - canonicalize
+ * - check for validity
+ *
+ * Also, unless @a skip_some_checks is TRUE:
+ *
+ * - svn:eol-style
+ * - strip leading and trailing white space
+ * - check value is recognized
+ * - check file content has a self-consistent EOL style
+ * (but not necessarily that it matches @a propval)
+ *
+ * - svn:mime-type
+ * - strip white space
+ * - check for reasonable syntax
+ *
+ * The EOL-style check (if not skipped) requires access to the contents and
+ * MIME type of the target if it is a file. It will call @a prop_getter with
+ * @a getter_baton. The callback must set the MIME type and/or write the
+ * contents of the file to the given stream. If @a skip_some_checks is true,
+ * then @a prop_getter is not used and may be NULL.
*
* @a path should be the path of the file in question; it is only used
* for error messages.
*
+ * ### The error code on validity check failure should be specified, and
+ * should be a single code or a very small set of possibilities.
+ *
* ### This is not actually related to the WC, but it does need to call
- * ### svn_wc_parse_externals_description2.
+ * ### svn_wc_parse_externals_description3.
+ *
+ * @since New in 1.5.
*/
svn_error_t *
svn_wc_canonicalize_svn_prop(const svn_string_t **propval_p,
@@ -6650,7 +6733,7 @@ typedef enum svn_wc_merge_outcome_t
* return success without merging anything. (The reasoning is that if
* the file is not versioned, then it is probably unrelated to the
* changes being considered, so they should not be merged into it.
- * Furtheremore, merging into an unversioned file is a lossy operation.)
+ * Furthermore, merging into an unversioned file is a lossy operation.)
*
* @a dry_run determines whether the working copy is modified. When it
* is @c FALSE the merge will cause @a target_abspath to be modified, when
@@ -6664,15 +6747,15 @@ 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 propchanges is merged before
- * merging the text. (If @a merge_props_outcome is NULL, no property changes
-* are merged and @a prop_changes is only used to determine the merge result)
+ * 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.
*
- * The outcome of the text merge is returned in @a *merge_text_outcome. If
+ * 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
* conflict_func with @a conflict_baton (if non-NULL). If the
* conflict callback cannot resolve the conflict, then:
@@ -6704,7 +6787,8 @@ typedef enum svn_wc_merge_outcome_t
* begins tracking the two backup files and the version information.
*
* If @a dry_run is @c TRUE no files are changed. The outcome of the merge
- * is returned in @a *merge_outcome.
+ * is returned in @a *merge_content_outcome.
+ * ### (and what about @a *merge_props_state?)
*
* Use @a scratch_pool for any temporary allocation.
*
@@ -6733,7 +6817,7 @@ svn_wc_merge5(enum svn_wc_merge_outcome_
void *cancel_baton,
apr_pool_t *scratch_pool);
-/** Similar to svn_wc_merge4() but doesn't allow property changes. Instead of
+/** 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
*
@@ -6883,8 +6967,9 @@ svn_wc_merge_props3(svn_wc_notify_state_
*
* This function has the @a base_merge parameter which (when TRUE) will
* apply @a propchanges to this node's pristine set of properties. This
- * functionality is not supported on newer APIs -- pristine information
- * should only be changed through an update editor drive.
+ * functionality is not supported since API version 1.7 and will give an
+ * error if requested (unless @a dry_run is TRUE). For details see
+ * 'notes/api-errata/1.7/wc006.txt'.
*
* Uses a svn_wc_conflict_resolver_func_t conflict resolver instead of a
* svn_wc_conflict_resolver_func2_t.
@@ -6893,7 +6978,7 @@ svn_wc_merge_props3(svn_wc_notify_state_
* #SVN_ERR_UNVERSIONED_RESOURCE, when svn_wc_merge_props3 would return either
* #SVN_ERR_WC_PATH_NOT_FOUND or #SVN_ERR_WC_PATH_UNEXPECTED_STATUS.
*
- * @since New in 1.5.
+ * @since New in 1.5. The base_merge option is not supported since 1.7.
* @deprecated Provided for backward compatibility with the 1.6 API.
*/
SVN_DEPRECATED
@@ -6914,6 +6999,7 @@ svn_wc_merge_props2(svn_wc_notify_state_
* Same as svn_wc_merge_props2(), but with a @a conflict_func (and
* baton) of NULL.
*
+ * @since New in 1.3. The base_merge option is not supported since 1.7.
* @deprecated Provided for backward compatibility with the 1.4 API.
*/
SVN_DEPRECATED
@@ -6935,7 +7021,9 @@ svn_wc_merge_props(svn_wc_notify_state_t
* correct for 'svn update', it's incorrect for 'svn merge', and can
* cause flawed behavior. (See issue #2035.)
*
+ * @since The base_merge option is not supported since 1.7.
* @deprecated Provided for backward compatibility with the 1.2 API.
+ * Replaced by svn_wc_merge_props().
*/
SVN_DEPRECATED
svn_error_t *
@@ -7036,7 +7124,7 @@ svn_wc_cleanup3(svn_wc_context_t *wc_ctx
/**
* Similar to svn_wc_cleanup3() but uses relative paths and creates its own
- * swn_wc_context_t.
+ * #svn_wc_context_t.
*
* @since New in 1.2.
* @deprecated Provided for backward compatibility with the 1.6 API.
Modified: subversion/branches/tree-read-api/subversion/libsvn_auth_kwallet/kwallet.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/libsvn_auth_kwallet/kwallet.cpp?rev=1429457&r1=1429456&r2=1429457&view=diff
==============================================================================
--- subversion/branches/tree-read-api/subversion/libsvn_auth_kwallet/kwallet.cpp (original)
+++ subversion/branches/tree-read-api/subversion/libsvn_auth_kwallet/kwallet.cpp Sun Jan 6 02:33:34 2013
@@ -253,7 +253,8 @@ kwallet_password_get(svn_boolean_t *done
}
}
- apr_pool_cleanup_register(pool, parameters, kwallet_terminate, NULL);
+ apr_pool_cleanup_register(pool, parameters, kwallet_terminate,
+ apr_pool_cleanup_null);
return SVN_NO_ERROR;
}
@@ -327,7 +328,8 @@ kwallet_password_set(svn_boolean_t *done
}
}
- apr_pool_cleanup_register(pool, parameters, kwallet_terminate, NULL);
+ apr_pool_cleanup_register(pool, parameters, kwallet_terminate,
+ apr_pool_cleanup_null);
return SVN_NO_ERROR;
}
Modified: subversion/branches/tree-read-api/subversion/libsvn_client/add.c
URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/libsvn_client/add.c?rev=1429457&r1=1429456&r2=1429457&view=diff
==============================================================================
--- subversion/branches/tree-read-api/subversion/libsvn_client/add.c (original)
+++ subversion/branches/tree-read-api/subversion/libsvn_client/add.c Sun Jan 6 02:33:34 2013
@@ -274,8 +274,7 @@ add_file(const char *local_abspath,
svn_client_ctx_t *ctx,
apr_pool_t *pool)
{
- apr_hash_t* properties = NULL;
- apr_hash_index_t *hi;
+ apr_hash_t *properties;
const char *mimetype;
svn_node_kind_t kind;
svn_boolean_t is_special;
@@ -283,13 +282,13 @@ add_file(const char *local_abspath,
/* Check to see if this is a special file. */
SVN_ERR(svn_io_check_special_path(local_abspath, &kind, &is_special, pool));
- /* Add the file */
- SVN_ERR(svn_wc_add_from_disk(ctx->wc_ctx, local_abspath,
- NULL, NULL, pool));
-
+ /* Determine the properties that the file should have */
if (is_special)
{
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));
}
else
{
@@ -310,66 +309,16 @@ add_file(const char *local_abspath,
}
/* This may fail on write-only files:
- we open them to estimate file type.
- That's why we postpone the add until after this step. */
+ we open them to estimate file type. */
SVN_ERR(svn_client__get_paths_auto_props(&properties, &mimetype,
local_abspath, magic_cookie,
file_autoprops, ctx, pool,
pool));
}
- if (is_special)
- /* This must be a special file. */
- SVN_ERR(svn_wc_prop_set4(ctx->wc_ctx, local_abspath, SVN_PROP_SPECIAL,
- svn_string_create(SVN_PROP_BOOLEAN_TRUE, pool),
- svn_depth_empty, FALSE, NULL,
- NULL, NULL /* cancellation */,
- NULL, NULL /* notification */,
- pool));
- else if (properties)
- {
- /* loop through the hashtable and add the properties */
- for (hi = apr_hash_first(pool, properties);
- hi != NULL; hi = apr_hash_next(hi))
- {
- const char *pname = svn__apr_hash_index_key(hi);
- const svn_string_t *pval = svn__apr_hash_index_val(hi);
- svn_error_t *err;
-
- /* It's probably best to pass 0 for force, so that if
- the autoprops say to set some weird combination,
- we just error and let the user sort it out. */
- err = svn_wc_prop_set4(ctx->wc_ctx, local_abspath, pname, pval,
- svn_depth_empty, FALSE, NULL,
- NULL, NULL /* cancellation */,
- NULL, NULL /* notification */,
- pool);
- if (err)
- {
- /* Don't leave the job half-done. If we fail to set a property,
- * (try to) un-add the file. */
- return svn_error_compose_create(
- err,
- svn_wc_revert4(ctx->wc_ctx,
- local_abspath,
- svn_depth_empty,
- FALSE /* use_commit_times */,
- NULL /* changelists */,
- NULL, NULL, NULL, NULL,
- pool));
- }
- }
- }
-
- /* Report the addition to the caller. */
- if (ctx->notify_func2 != NULL)
- {
- svn_wc_notify_t *notify = svn_wc_create_notify(local_abspath,
- svn_wc_notify_add, pool);
- notify->kind = svn_node_file;
- notify->mime_type = mimetype;
- (*ctx->notify_func2)(ctx->notify_baton2, notify, pool);
- }
+ /* Add the file */
+ SVN_ERR(svn_wc_add_from_disk2(ctx->wc_ctx, local_abspath, properties,
+ ctx->notify_func2, ctx->notify_baton2, pool));
return SVN_NO_ERROR;
}
@@ -381,20 +330,15 @@ add_file(const char *local_abspath,
* If DIR_ABSPATH (or any item below DIR_ABSPATH) is already scheduled for
* addition, add will fail and return an error unless FORCE is TRUE.
*
- * Files and directories that match ignore patterns will not be added unless
- * NO_IGNORE is TRUE.
- *
* Use MAGIC_COOKIE (which may be NULL) to detect the mime-type of files
* if necessary.
*
- * If not NULL, *CONFIG_AUTOPROPS is a hash representing the config file and
+ * If not NULL, CONFIG_AUTOPROPS is a hash representing the config file and
* svn:auto-props autoprops which apply to DIR_ABSPATH. It maps
* const char * file patterns to another hash which maps const char *
- * property names to const char *property values. If *CONFIG_AUTOPROPS is
- * NULL and DIR_ABSPATH is unversioned, then this function will populate
- * *CONFIG_AUTOPROPS (allocated in RESULT_POOL) using DIR_ABSPATH's nearest
- * versioned parent to determine the svn:auto-props which DIR_ABSPATH
- * will inherit once added.
+ * property names to const char *property values. If CONFIG_AUTOPROPS is
+ * NULL and the config file and svn:auto-props autoprops are required by this
+ * function, then such will be obtained.
*
* 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
@@ -413,14 +357,12 @@ static svn_error_t *
add_dir_recursive(const char *dir_abspath,
svn_depth_t depth,
svn_boolean_t force,
- svn_boolean_t no_ignore,
svn_boolean_t no_autoprops,
svn_magic__cookie_t *magic_cookie,
- apr_hash_t **config_autoprops,
+ apr_hash_t *config_autoprops,
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;
@@ -428,7 +370,6 @@ add_dir_recursive(const char *dir_abspat
apr_hash_t *dirents;
apr_hash_index_t *hi;
svn_boolean_t entry_exists = FALSE;
- svn_boolean_t found_unversioned_root = FALSE;
/* Check cancellation; note that this catches recursive calls too. */
if (ctx->cancel_func)
@@ -438,13 +379,13 @@ add_dir_recursive(const char *dir_abspat
if (refresh_ignores)
SVN_ERR(svn_client__get_all_ignores(&ignores, dir_abspath,
- no_ignore, ctx, scratch_pool,
- scratch_pool));
+ ctx, scratch_pool,
+ iterpool));
/* Add this directory to revision control. */
- err = svn_wc_add_from_disk(ctx->wc_ctx, dir_abspath,
- ctx->notify_func2, ctx->notify_baton2,
- iterpool);
+ err = svn_wc_add_from_disk2(ctx->wc_ctx, dir_abspath, NULL /*props*/,
+ ctx->notify_func2, ctx->notify_baton2,
+ iterpool);
if (err)
{
if (err->apr_err == SVN_ERR_ENTRY_EXISTS && force)
@@ -458,20 +399,21 @@ add_dir_recursive(const char *dir_abspat
}
}
- /* For the root of any unversioned subtree, get some or all of the
- following:
+ /* If DIR_ABSPATH is the root of an unversioned subtree then get the
+ following "autoprops":
1) Explicit and inherited svn:auto-props properties on
DIR_ABSPATH
- 2) Explicit and inherited svn:global-ignores properties on
- DIR_ABSPATH
- 3) auto-props from the CTX->CONFIG hash */
- if (!entry_exists && *config_autoprops == NULL)
+ 2) auto-props from the CTX->CONFIG hash
+
+ Since this set of autoprops applies to all unversioned children of
+ DIR_ABSPATH, we will pass these along to any recursive calls to
+ add_dir_recursive() and calls to add_file() below. Thus sparing
+ these callees from looking up the same information. */
+ if (!entry_exists && config_autoprops == NULL)
{
- SVN_ERR(svn_client__get_all_auto_props(config_autoprops, dir_abspath,
- ctx, result_pool,
- scratch_pool));
- found_unversioned_root = TRUE;
+ SVN_ERR(svn_client__get_all_auto_props(&config_autoprops, dir_abspath,
+ ctx, scratch_pool, iterpool));
}
SVN_ERR(svn_io_get_dirents3(&dirents, dir_abspath, TRUE, scratch_pool,
@@ -518,15 +460,15 @@ add_dir_recursive(const char *dir_abspat
refresh_ignores = FALSE;
SVN_ERR(add_dir_recursive(abspath, depth_below_here,
- force, no_ignore, no_autoprops,
+ force, no_autoprops,
magic_cookie, config_autoprops,
refresh_ignores, ignores, ctx,
- iterpool, iterpool));
+ iterpool));
}
else if ((dirent->kind == svn_node_file || dirent->special)
&& depth >= svn_depth_files)
{
- err = add_file(abspath, magic_cookie, *config_autoprops,
+ err = add_file(abspath, magic_cookie, config_autoprops,
no_autoprops, ctx, iterpool);
if (err && err->apr_err == SVN_ERR_ENTRY_EXISTS && force)
svn_error_clear(err);
@@ -538,11 +480,6 @@ add_dir_recursive(const char *dir_abspat
/* Destroy the per-iteration pool. */
svn_pool_destroy(iterpool);
- /* Reset CONFIG_AUTOPROPS if we just finished processing the root
- of an unversioned subtree. */
- if (found_unversioned_root)
- *config_autoprops = NULL;
-
return SVN_NO_ERROR;
}
@@ -898,7 +835,6 @@ svn_error_t *svn_client__get_inherited_i
svn_error_t *svn_client__get_all_ignores(apr_array_header_t **ignores,
const char *local_abspath,
- svn_boolean_t no_ignore,
svn_client_ctx_t *ctx,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool)
@@ -957,11 +893,8 @@ svn_error_t *svn_client__get_all_ignores
/* Now that we are sure we have an existing parent, get the config ignore
and the local ignore patterns... */
- if (!no_ignore)
- SVN_ERR(svn_wc_get_ignores2(ignores, ctx->wc_ctx, local_abspath,
- ctx->config, result_pool, scratch_pool));
- else
- *ignores = apr_array_make(result_pool, 16, sizeof(const char *));
+ 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++)
@@ -997,7 +930,6 @@ add(const char *local_abspath,
svn_node_kind_t kind;
svn_error_t *err;
svn_magic__cookie_t *magic_cookie;
- apr_hash_t *config_autoprops = NULL;
apr_array_header_t *ignores = NULL;
svn_magic__init(&magic_cookie, scratch_pool);
@@ -1035,9 +967,10 @@ add(const char *local_abspath,
parent_abspath, local_abspath);
SVN_ERR(svn_io_make_dir_recursively(parent_abspath, scratch_pool));
- SVN_ERR(svn_wc_add_from_disk(ctx->wc_ctx, parent_abspath,
- ctx->notify_func2, ctx->notify_baton2,
- scratch_pool));
+ SVN_ERR(svn_wc_add_from_disk2(ctx->wc_ctx, parent_abspath,
+ NULL /*props*/,
+ ctx->notify_func2, ctx->notify_baton2,
+ scratch_pool));
}
svn_pool_destroy(iterpool);
}
@@ -1048,12 +981,12 @@ add(const char *local_abspath,
/* We use add_dir_recursive for all directory targets
and pass depth along no matter what it is, so that the
target's depth will be set correctly. */
- err = add_dir_recursive(local_abspath, depth, force, no_ignore,
- no_autoprops, magic_cookie, &config_autoprops,
- TRUE, ignores, ctx, scratch_pool, scratch_pool);
+ err = add_dir_recursive(local_abspath, depth, force,
+ no_autoprops, magic_cookie, NULL,
+ !no_ignore, ignores, ctx, scratch_pool);
}
else if (kind == svn_node_file)
- err = add_file(local_abspath, magic_cookie, config_autoprops,
+ err = add_file(local_abspath, magic_cookie, NULL,
no_autoprops, ctx, scratch_pool);
else if (kind == svn_node_none)
{
@@ -1119,11 +1052,11 @@ svn_client_add5(const char *path,
SVN_ERR(svn_dirent_get_absolute(&local_abspath, path, scratch_pool));
/* See if we're being asked to add a wc-root. That's typically not
- okay, unless we're in "force" mode. svn_wc__strictly_is_wc_root()
+ okay, unless we're in "force" mode. svn_wc__is_wcroot()
will return TRUE even if LOCAL_ABSPATH is a *symlink* to a working
copy root, which is a scenario we want to treat differently. */
- err = svn_wc__strictly_is_wc_root(&is_wc_root, ctx->wc_ctx,
- local_abspath, scratch_pool);
+ err = svn_wc__is_wcroot(&is_wc_root, ctx->wc_ctx, local_abspath,
+ scratch_pool);
if (err)
{
if (err->apr_err != SVN_ERR_WC_PATH_NOT_FOUND
Modified: subversion/branches/tree-read-api/subversion/libsvn_client/cat.c
URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/libsvn_client/cat.c?rev=1429457&r1=1429456&r2=1429457&view=diff
==============================================================================
--- subversion/branches/tree-read-api/subversion/libsvn_client/cat.c (original)
+++ subversion/branches/tree-read-api/subversion/libsvn_client/cat.c Sun Jan 6 02:33:34 2013
@@ -103,7 +103,7 @@ svn_client__get_normalized_stream(svn_st
scratch_pool));
SVN_ERR(svn_wc_status3(&status, wc_ctx, local_abspath, scratch_pool,
scratch_pool));
- if (status->text_status != svn_wc_status_normal)
+ if (status->node_status != svn_wc_status_normal)
local_mod = TRUE;
}
Modified: subversion/branches/tree-read-api/subversion/libsvn_client/client.h
URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/libsvn_client/client.h?rev=1429457&r1=1429456&r2=1429457&view=diff
==============================================================================
--- subversion/branches/tree-read-api/subversion/libsvn_client/client.h (original)
+++ subversion/branches/tree-read-api/subversion/libsvn_client/client.h Sun Jan 6 02:33:34 2013
@@ -394,7 +394,6 @@ svn_error_t *svn_client__get_all_auto_pr
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_boolean_t no_ignore,
svn_client_ctx_t *ctx,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
@@ -654,7 +653,10 @@ svn_client__list_internal(const char *pa
as any WC roots under LOCAL_ABSPATH (as limited by DEPTH) using
RA_SESSION. Store the results in *WCROOT_IPROPS, a hash mapping
const char * absolute working copy paths to depth-first ordered arrays
- of svn_prop_inherited_item_t * structures.
+ of svn_prop_inherited_item_t * structures. If WANT_RELPATH_KEYS is true,
+ then any svn_prop_inherited_item_t->path_or_url members returned in
+ *WCROOT_IPROPS are repository relative paths, otherwise these members are
+ URLs.
If LOCAL_ABSPATH has no base then do nothing.
@@ -669,6 +671,7 @@ svn_client__get_inheritable_props(apr_ha
const char *local_abspath,
svn_revnum_t revision,
svn_depth_t depth,
+ svn_boolean_t use_relpath_keys,
svn_ra_session_t *ra_session,
svn_client_ctx_t *ctx,
apr_pool_t *result_pool,
@@ -741,6 +744,7 @@ svn_client__get_diff_summarize_callbacks
svn_wc_diff_callbacks4_t **callbacks,
void **callback_baton,
const char *target,
+ svn_boolean_t reversed,
svn_client_diff_summarize_func_t summarize_func,
void *summarize_baton,
apr_pool_t *pool);