You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by hw...@apache.org on 2010/09/15 21:32:38 UTC
svn commit: r997472 [7/41] - in /subversion/branches/py-tests-as-modules: ./
build/ build/ac-macros/ build/generator/ build/generator/templates/
contrib/server-side/ notes/ notes/tree-conflicts/ notes/wc-ng/
subversion/bindings/javahl/native/ subversio...
Modified: subversion/branches/py-tests-as-modules/subversion/include/svn_ra.h
URL: http://svn.apache.org/viewvc/subversion/branches/py-tests-as-modules/subversion/include/svn_ra.h?rev=997472&r1=997471&r2=997472&view=diff
==============================================================================
--- subversion/branches/py-tests-as-modules/subversion/include/svn_ra.h (original)
+++ subversion/branches/py-tests-as-modules/subversion/include/svn_ra.h Wed Sep 15 19:32:26 2010
@@ -65,7 +65,7 @@ svn_ra_version(void);
* @a close_baton as appropriate.
*
* @a path is relative to the "root" of the session, defined by the
- * @a repos_URL passed to svn_ra_open3() vtable call.
+ * @a repos_URL passed to svn_ra_open4() vtable call.
*
* @a name is the name of the property to fetch. If the property is present,
* then it is returned in @a value. Otherwise, @a *value is set to @c NULL.
@@ -294,7 +294,7 @@ typedef struct svn_ra_reporter3_t
* implementor should assume the directory has no entries or props.
*
* This will *override* any previous set_path() calls made on parent
- * paths. @a path is relative to the URL specified in svn_ra_open3().
+ * paths. @a path is relative to the URL specified in svn_ra_open4().
*
* If @a lock_token is non-NULL, it is the lock token for @a path in the WC.
*
@@ -445,7 +445,7 @@ typedef struct svn_ra_reporter_t
/** A collection of callbacks implemented by libsvn_client which allows
* an RA layer to "pull" information from the client application, or
* possibly store information. libsvn_client passes this vtable to
- * svn_ra_open3().
+ * svn_ra_open4().
*
* Each routine takes a @a callback_baton originally provided with the
* vtable.
@@ -580,8 +580,19 @@ svn_ra_create_callbacks(svn_ra_callbacks
typedef struct svn_ra_session_t svn_ra_session_t;
/**
- * Open a repository session to @a repos_URL. Return an opaque object
- * representing this session in @a *session_p, allocated in @a pool.
+ * Open a repository access session to the repository at @a repos_URL,
+ * or inform the caller regarding a correct URL by which to access
+ * that repository.
+ *
+ * If @a repos_URL can be used successfully to access the repository,
+ * set @a *session_p to an opaque object representing a repository
+ * session for the repository and (if @a corrected_url is non-NULL)
+ * set @a *corrected_url to NULL. If there's a better URL that the
+ * caller should try and @a corrected_url is non-NULL, set
+ * @a *session_p to NULL and @a *corrected_url to the corrected URL. If
+ * there's a better URL that the caller should try, and @a
+ * corrected_url is NULL, return an #SVN_ERR_RA_SESSION_URL_MISMATCH
+ * error. Allocate all returned items in @a pool.
*
* Return @c SVN_ERR_RA_UUID_MISMATCH if @a uuid is non-NULL and not equal
* to the UUID of the repository at @c repos_URL.
@@ -598,8 +609,25 @@ typedef struct svn_ra_session_t svn_ra_s
*
* @see svn_client_open_ra_session().
*
+ * @since New in 1.7.
+ */
+svn_error_t *
+svn_ra_open4(svn_ra_session_t **session_p,
+ const char **corrected_url,
+ const char *repos_URL,
+ const char *uuid,
+ const svn_ra_callbacks2_t *callbacks,
+ void *callback_baton,
+ apr_hash_t *config,
+ apr_pool_t *pool);
+
+/** Similar to svn_ra_open4(), but with @a corrected_url always passed
+ * as @c NULL.
+ *
* @since New in 1.5.
+ * @deprecated Provided for backward compatibility with the 1.6 API.
*/
+SVN_DEPRECATED
svn_error_t *
svn_ra_open3(svn_ra_session_t **session_p,
const char *repos_URL,
@@ -777,8 +805,8 @@ svn_ra_rev_prop(svn_ra_session_t *sessio
* or @c SVN_PROP_REVISION_AUTHOR.
*
* Before @c close_edit returns, but after the commit has succeeded,
- * it will invoke @a callback with the new revision number, the
- * commit date (as a <tt>const char *</tt>), commit author (as a
+ * it will invoke @a callback (if non-NULL) with the new revision number,
+ * the commit date (as a <tt>const char *</tt>), commit author (as a
* <tt>const char *</tt>), and @a callback_baton as arguments. If
* @a callback returns an error, that error will be returned from @c
* close_edit, otherwise @c close_edit will return successfully
@@ -1155,7 +1183,10 @@ svn_ra_do_switch(svn_ra_session_t *sessi
* represented by the @a session's URL, or empty if the entire directory
* is meant to be examined.
*
- * Get status only as deeply as @a depth indicates.
+ * Get status as deeply as @a depth indicates. If @a depth is
+ * #svn_depth_unknown, get the status down to the ambient depth of the
+ * working copy. If @a depth is deeper than the working copy, include changes
+ * that would be needed to populate the working copy to that depth.
*
* The caller may not perform any RA operations using @a session
* before finishing the report, and may not perform any RA operations
@@ -1565,8 +1596,9 @@ svn_ra_get_location_segments(svn_ra_sess
* empty file. In the following calls, the delta will be against the
* fulltext contents for the previous call.
*
- * If @a include_merged_revisions is TRUE, revisions which a included as a
- * result of a merge between @a start and @a end will be included.
+ * If @a include_merged_revisions is TRUE, revisions which are
+ * included as a result of a merge between @a start and @a end will be
+ * included.
*
* @note This functionality is not available in pre-1.1 servers. If the
* server doesn't implement it, an alternative (but much slower)
@@ -1689,6 +1721,11 @@ svn_ra_get_lock(svn_ra_session_t *sessio
* Set @a *locks to a hashtable which represents all locks on or
* below @a path.
*
+ * @a depth limits the returned locks to those associated with paths
+ * within the specified depth of @a path, and must be one of the
+ * following values: #svn_depth_empty, #svn_depth_files,
+ * #svn_depth_immediates, or #svn_depth_infinity.
+ *
* The hashtable maps (const char *) absolute fs paths to (const
* svn_lock_t *) structures. The hashtable -- and all keys and
* values -- are allocated in @a pool.
@@ -1700,8 +1737,23 @@ svn_ra_get_lock(svn_ra_session_t *sessio
* server doesn't implement it, an @c SVN_ERR_RA_NOT_IMPLEMENTED error is
* returned.
*
+ * @since New in 1.7.
+ */
+svn_error_t *
+svn_ra_get_locks2(svn_ra_session_t *session,
+ apr_hash_t **locks,
+ const char *path,
+ svn_depth_t depth,
+ apr_pool_t *pool);
+
+/**
+ * Similar to svn_ra_get_locks2(), but with @a depth always passed as
+ * #svn_depth_infinity.
+ *
* @since New in 1.2.
+ * @deprecated Provided for backward compatibility with the 1.6 API.
*/
+SVN_DEPRECATED
svn_error_t *
svn_ra_get_locks(svn_ra_session_t *session,
apr_hash_t **locks,
Modified: subversion/branches/py-tests-as-modules/subversion/include/svn_ra_svn.h
URL: http://svn.apache.org/viewvc/subversion/branches/py-tests-as-modules/subversion/include/svn_ra_svn.h?rev=997472&r1=997471&r2=997472&view=diff
==============================================================================
--- subversion/branches/py-tests-as-modules/subversion/include/svn_ra_svn.h (original)
+++ subversion/branches/py-tests-as-modules/subversion/include/svn_ra_svn.h Wed Sep 15 19:32:26 2010
@@ -286,11 +286,11 @@ svn_ra_svn_flush(svn_ra_svn_conn_t *conn
* Use the '!' format specifier to write partial tuples when you have
* to transmit an array or other unusual data. For example, to write
* a tuple containing a revision, an array of words, and a boolean:
- * @verbatim
+ * @code
SVN_ERR(svn_ra_svn_write_tuple(conn, pool, "r(!", rev));
for (i = 0; i < n; i++)
SVN_ERR(svn_ra_svn_write_word(conn, pool, words[i]));
- SVN_ERR(svn_ra_svn_write_tuple(conn, pool, "!)b", flag)); @endverbatim
+ SVN_ERR(svn_ra_svn_write_tuple(conn, pool, "!)b", flag)); @endcode
*/
svn_error_t *
svn_ra_svn_write_tuple(svn_ra_svn_conn_t *conn,
Modified: subversion/branches/py-tests-as-modules/subversion/include/svn_repos.h
URL: http://svn.apache.org/viewvc/subversion/branches/py-tests-as-modules/subversion/include/svn_repos.h?rev=997472&r1=997471&r2=997472&view=diff
==============================================================================
--- subversion/branches/py-tests-as-modules/subversion/include/svn_repos.h (original)
+++ subversion/branches/py-tests-as-modules/subversion/include/svn_repos.h Wed Sep 15 19:32:26 2010
@@ -1900,7 +1900,7 @@ svn_repos_fs_begin_txn_for_update(svn_fs
/** @defgroup svn_repos_fs_locks Repository lock wrappers
* @{
- * @since New in 1.2. */
+ */
/** Like svn_fs_lock(), but invoke the @a repos's pre- and
* post-lock hooks before and after the locking action. Use @a pool
@@ -1915,6 +1915,8 @@ svn_repos_fs_begin_txn_for_update(svn_fs
* The pre-lock hook may cause a different token to be used for the
* lock, instead of @a token; see the pre-lock-hook documentation for
* more.
+ *
+ * @since New in 1.2.
*/
svn_error_t *
svn_repos_fs_lock(svn_lock_t **lock,
@@ -1938,6 +1940,8 @@ svn_repos_fs_lock(svn_lock_t **lock,
* hook, return the original error wrapped with
* SVN_ERR_REPOS_POST_UNLOCK_HOOK_FAILED. If the caller sees this
* error, it knows that the unlock succeeded anyway.
+ *
+ * @since New in 1.2.
*/
svn_error_t *
svn_repos_fs_unlock(svn_repos_t *repos,
@@ -1954,7 +1958,31 @@ svn_repos_fs_unlock(svn_repos_t *repos,
* authz_read_func and @a authz_read_baton to "screen" all returned
* locks. That is: do not return any locks on any paths that are
* unreadable in HEAD, just silently omit them.
+ *
+ * @a depth limits the returned locks to those associated with paths
+ * within the specified depth of @a path, and must be one of the
+ * following values: #svn_depth_empty, #svn_depth_files,
+ * #svn_depth_immediates, or #svn_depth_infinity.
+ *
+ * @since New in 1.7.
+ */
+svn_error_t *
+svn_repos_fs_get_locks2(apr_hash_t **locks,
+ svn_repos_t *repos,
+ const char *path,
+ svn_depth_t depth,
+ svn_repos_authz_func_t authz_read_func,
+ void *authz_read_baton,
+ apr_pool_t *pool);
+
+/**
+ * Similar to svn_repos_fs_get_locks2(), but with @a depth always
+ * passed as svn_depth_infinity.
+ *
+ * @since New in 1.2.
+ * @deprecated Provided for backward compatibility with the 1.6 API.
*/
+SVN_DEPRECATED
svn_error_t *
svn_repos_fs_get_locks(apr_hash_t **locks,
svn_repos_t *repos,
@@ -2268,11 +2296,15 @@ svn_repos_node_from_baton(void *edit_bat
#define SVN_REPOS_DUMPFILE_NODE_ACTION "Node-action"
#define SVN_REPOS_DUMPFILE_NODE_COPYFROM_PATH "Node-copyfrom-path"
#define SVN_REPOS_DUMPFILE_NODE_COPYFROM_REV "Node-copyfrom-rev"
+/** @since New in 1.6. */
#define SVN_REPOS_DUMPFILE_TEXT_COPY_SOURCE_MD5 "Text-copy-source-md5"
+/** @since New in 1.6. */
#define SVN_REPOS_DUMPFILE_TEXT_COPY_SOURCE_SHA1 "Text-copy-source-sha1"
#define SVN_REPOS_DUMPFILE_TEXT_COPY_SOURCE_CHECKSUM \
SVN_REPOS_DUMPFILE_TEXT_COPY_SOURCE_MD5
+/** @since New in 1.6. */
#define SVN_REPOS_DUMPFILE_TEXT_CONTENT_MD5 "Text-content-md5"
+/** @since New in 1.6. */
#define SVN_REPOS_DUMPFILE_TEXT_CONTENT_SHA1 "Text-content-sha1"
#define SVN_REPOS_DUMPFILE_TEXT_CONTENT_CHECKSUM \
SVN_REPOS_DUMPFILE_TEXT_CONTENT_MD5
@@ -2284,11 +2316,11 @@ svn_repos_node_from_baton(void *edit_bat
#define SVN_REPOS_DUMPFILE_PROP_DELTA "Prop-delta"
/** @since New in 1.1. */
#define SVN_REPOS_DUMPFILE_TEXT_DELTA "Text-delta"
-/** @since New in 1.5. */
+/** @since New in 1.6. */
#define SVN_REPOS_DUMPFILE_TEXT_DELTA_BASE_MD5 "Text-delta-base-md5"
/** @since New in 1.6. */
#define SVN_REPOS_DUMPFILE_TEXT_DELTA_BASE_SHA1 "Text-delta-base-sha1"
-/** @since New in 1.6. */
+/** @since New in 1.5. */
#define SVN_REPOS_DUMPFILE_TEXT_DELTA_BASE_CHECKSUM \
SVN_REPOS_DUMPFILE_TEXT_DELTA_BASE_MD5
Modified: subversion/branches/py-tests-as-modules/subversion/include/svn_sorts.h
URL: http://svn.apache.org/viewvc/subversion/branches/py-tests-as-modules/subversion/include/svn_sorts.h?rev=997472&r1=997471&r2=997472&view=diff
==============================================================================
--- subversion/branches/py-tests-as-modules/subversion/include/svn_sorts.h (original)
+++ subversion/branches/py-tests-as-modules/subversion/include/svn_sorts.h Wed Sep 15 19:32:26 2010
@@ -76,10 +76,10 @@ typedef struct svn_sort__item_t {
* @c apr_array_header_t. For example, to convert hash @a hsh to a sorted
* array, do this:
*
- * @verbatim
- apr_array_header_t *hdr;
- hdr = svn_sort__hash (hsh, @c svn_sort_compare_items_as_paths, pool);
- @endverbatim
+ * @code
+ apr_array_header_t *array;
+ array = svn_sort__hash(hsh, svn_sort_compare_items_as_paths, pool);
+ @endcode
*/
int
svn_sort_compare_items_as_paths(const svn_sort__item_t *a,
Modified: subversion/branches/py-tests-as-modules/subversion/include/svn_string.h
URL: http://svn.apache.org/viewvc/subversion/branches/py-tests-as-modules/subversion/include/svn_string.h?rev=997472&r1=997471&r2=997472&view=diff
==============================================================================
--- subversion/branches/py-tests-as-modules/subversion/include/svn_string.h (original)
+++ subversion/branches/py-tests-as-modules/subversion/include/svn_string.h Wed Sep 15 19:32:26 2010
@@ -253,6 +253,15 @@ svn_stringbuf_chop(svn_stringbuf_t *str,
void
svn_stringbuf_fillchar(svn_stringbuf_t *str, unsigned char c);
+/** Append a single character @a byte onto @a targetstr.
+ *
+ * reallocs if necessary. @a targetstr is affected, nothing else is.
+ * @since New in 1.7.
+ */
+void
+svn_stringbuf_appendbyte(svn_stringbuf_t *targetstr,
+ char byte);
+
/** Append an array of bytes onto @a targetstr.
*
* reallocs if necessary. @a targetstr is affected, nothing else is.
@@ -388,6 +397,71 @@ svn_cstring_join(const apr_array_header_
int
svn_cstring_casecmp(const char *str1, const char *str2);
+/**
+ * Parse the C string @a str into a 64 bit number, and return it in @a *n.
+ * Assume that the number is represented in base @a base.
+ * Raise an error if conversion fails (e.g. due to overflow), or if the
+ * converted number is smaller than @a minval or larger than @a maxval.
+ *
+ * @since New in 1.7.
+ */
+svn_error_t *
+svn_cstring_strtoi64(apr_int64_t *n, const char *str,
+ apr_int64_t minval, apr_int64_t maxval,
+ int base);
+
+/**
+ * Parse the C string @a str into a 64 bit number, and return it in @a *n.
+ * Assume that the number is represented in base 10.
+ * Raise an error if conversion fails (e.g. due to overflow).
+ *
+ * @since New in 1.7.
+ */
+svn_error_t *
+svn_cstring_atoi64(apr_int64_t *n, const char *str);
+
+/**
+ * Parse the C string @a str into a 32 bit number, and return it in @a *n.
+ * Assume that the number is represented in base 10.
+ * Raise an error if conversion fails (e.g. due to overflow).
+ *
+ * @since New in 1.7.
+ */
+svn_error_t *
+svn_cstring_atoi(int *n, const char *str);
+
+/**
+ * Parse the C string @a str into an unsigned 64 bit number, and return
+ * it in @a *n. Assume that the number is represented in base @a base.
+ * Raise an error if conversion fails (e.g. due to overflow), or if the
+ * converted number is smaller than @a minval or larger than @a maxval.
+ *
+ * @since New in 1.7.
+ */
+svn_error_t *
+svn_cstring_strtoui64(apr_uint64_t *n, const char *str,
+ apr_uint64_t minval, apr_uint64_t maxval,
+ int base);
+
+/**
+ * Parse the C string @a str into an unsigned 64 bit number, and return
+ * it in @a *n. Assume that the number is represented in base 10.
+ * Raise an error if conversion fails (e.g. due to overflow).
+ *
+ * @since New in 1.7.
+ */
+svn_error_t *
+svn_cstring_atoui64(apr_uint64_t *n, const char *str);
+
+/**
+ * Parse the C string @a str into an unsigned 32 bit number, and return
+ * it in @a *n. Assume that the number is represented in base 10.
+ * Raise an error if conversion fails (e.g. due to overflow).
+ *
+ * @since New in 1.7.
+ */
+svn_error_t *
+svn_cstring_atoui(unsigned int *n, const char *str);
/** @} */
Modified: subversion/branches/py-tests-as-modules/subversion/include/svn_types.h
URL: http://svn.apache.org/viewvc/subversion/branches/py-tests-as-modules/subversion/include/svn_types.h?rev=997472&r1=997471&r2=997472&view=diff
==============================================================================
--- subversion/branches/py-tests-as-modules/subversion/include/svn_types.h (original)
+++ subversion/branches/py-tests-as-modules/subversion/include/svn_types.h Wed Sep 15 19:32:26 2010
@@ -131,6 +131,16 @@ svn__apr_hash_index_klen(const apr_hash_
void *
svn__apr_hash_index_val(const apr_hash_index_t *hi);
+/** On Windows, APR_STATUS_IS_ENOTDIR includes several kinds of
+ * invalid-pathname error but not this one, so we include it. */
+/* ### This fix should go into APR. */
+#ifndef WIN32
+#define SVN__APR_STATUS_IS_ENOTDIR(s) APR_STATUS_IS_ENOTDIR(s)
+#else
+#define SVN__APR_STATUS_IS_ENOTDIR(s) (APR_STATUS_IS_ENOTDIR(s) \
+ || ((s) == APR_OS_START_SYSERR + ERROR_INVALID_NAME))
+#endif
+
/** @} */
/** The various types of nodes in the Subversion filesystem. */
@@ -601,6 +611,10 @@ typedef struct svn_commit_info_t
/** error message from post-commit hook, or NULL. */
const char *post_commit_err;
+ /** repository root, may be @c NULL if unknown.
+ @since New in 1.7. */
+ const char *repos_root;
+
} svn_commit_info_t;
Modified: subversion/branches/py-tests-as-modules/subversion/include/svn_wc.h
URL: http://svn.apache.org/viewvc/subversion/branches/py-tests-as-modules/subversion/include/svn_wc.h?rev=997472&r1=997471&r2=997472&view=diff
==============================================================================
--- subversion/branches/py-tests-as-modules/subversion/include/svn_wc.h (original)
+++ subversion/branches/py-tests-as-modules/subversion/include/svn_wc.h Wed Sep 15 19:32:26 2010
@@ -1081,6 +1081,16 @@ typedef enum svn_wc_notify_action_t
/** A hunk from a patch was rejected.
* @since New in 1.7. */
svn_wc_notify_patch_rejected_hunk,
+
+ /** A hunk from a patch was found to already be applied.
+ * @since New in 1.7. */
+ svn_wc_notify_patch_hunk_already_applied,
+
+ /** The server has instructed the client to follow a URL
+ * redirection.
+ * @since New in 1.7. */
+ svn_wc_notify_url_redirect
+
} svn_wc_notify_action_t;
@@ -1244,7 +1254,7 @@ typedef struct svn_wc_notify_t {
* @since New in 1.7 */
svn_revnum_t old_revision;
- /* These fields are used by svn patch to identify the
+ /** These fields are used by svn patch to identify the
* hunk the notification is for. They are line-based
* offsets and lengths parsed from the unidiff hunk header.
* @since New in 1.7. */
@@ -1253,11 +1263,11 @@ typedef struct svn_wc_notify_t {
svn_linenum_t hunk_modified_start;
svn_linenum_t hunk_modified_length;
- /* The line at which a hunk was matched (and applied).
+ /** The line at which a hunk was matched (and applied).
* @since New in 1.7. */
svn_linenum_t hunk_matched_line;
- /* The fuzz factor the hunk was applied with.
+ /** The fuzz factor the hunk was applied with.
* @since New in 1.7 */
int hunk_fuzz;
@@ -1414,11 +1424,11 @@ typedef svn_error_t *(*svn_wc_get_file_t
*/
typedef enum svn_wc_conflict_action_t
{
- svn_wc_conflict_action_edit, /* attempting to change text or props */
- svn_wc_conflict_action_add, /* attempting to add object */
- svn_wc_conflict_action_delete, /* attempting to delete object */
- svn_wc_conflict_action_replace /* attempting to replace object,
- @since New in 1.7 */
+ svn_wc_conflict_action_edit, /**< attempting to change text or props */
+ svn_wc_conflict_action_add, /**< attempting to add object */
+ svn_wc_conflict_action_delete, /**< attempting to delete object */
+ svn_wc_conflict_action_replace /**< attempting to replace object,
+ @since New in 1.7 */
} svn_wc_conflict_action_t;
@@ -2060,20 +2070,20 @@ svn_wc__conflict_description2_dup(
*/
typedef enum svn_wc_conflict_choice_t
{
- /* Don't resolve the conflict now. Let libsvn_wc mark the path
+ /** Don't resolve the conflict now. Let libsvn_wc mark the path
'conflicted', so user can run 'svn resolved' later. */
svn_wc_conflict_choose_postpone,
- /* If there were files to choose from, select one as a way of
+ /** If there were files to choose from, select one as a way of
resolving the conflict here and now. libsvn_wc will then do the
work of "installing" the chosen file.
*/
- svn_wc_conflict_choose_base, /* original version */
- svn_wc_conflict_choose_theirs_full, /* incoming version */
- svn_wc_conflict_choose_mine_full, /* own version */
- svn_wc_conflict_choose_theirs_conflict, /* incoming (for conflicted hunks) */
- svn_wc_conflict_choose_mine_conflict, /* own (for conflicted hunks) */
- svn_wc_conflict_choose_merged /* merged version */
+ svn_wc_conflict_choose_base, /**< original version */
+ svn_wc_conflict_choose_theirs_full, /**< incoming version */
+ svn_wc_conflict_choose_mine_full, /**< own version */
+ svn_wc_conflict_choose_theirs_conflict, /**< incoming (for conflicted hunks) */
+ svn_wc_conflict_choose_mine_conflict, /**< own (for conflicted hunks) */
+ svn_wc_conflict_choose_merged /**< merged version */
} svn_wc_conflict_choice_t;
@@ -2704,13 +2714,20 @@ svn_wc_text_modified_p(svn_boolean_t *mo
svn_wc_adm_access_t *adm_access,
apr_pool_t *pool);
-
/** Set @a *modified_p to non-zero if @a path's properties are modified
* with regard to the base revision, else set @a modified_p to zero.
* @a adm_access must be an access baton for @a path.
*
- * If you want to use this with a post-wc-ng working copy, just call
- * svn_wc_get_prop_diffs2() and examine the output.
+ * @since New in 1.7.
+ */
+svn_error_t *
+svn_wc_props_modified_p2(svn_boolean_t *modified_p,
+ svn_wc_context_t* wc_ctx,
+ const char *local_abspath,
+ apr_pool_t *scratch_pool);
+
+/** Similar to svn_wc_props_modified_p2(), but with a relative path and
+ * adm_access baton.
*
* @deprecated Provided for backward compatibility with the 1.6 API.
*/
@@ -3491,7 +3508,7 @@ enum svn_wc_status_kind
/** text or props have been modified */
svn_wc_status_modified,
- /** local mods received repos mods */
+ /** local mods received repos mods (### unused) */
svn_wc_status_merged,
/** local mods received conflicting repos mods */
@@ -4210,12 +4227,15 @@ svn_wc_status_set_repos_locks(void *set_
* is used for accessing the working copy and must contain a write lock for
* the parent directory of @a dst_abspath,
*
+ * If metadata_only is TRUE then this a database only operation and
+ * the working directories and files are not copied.
+ *
* @a src_abspath must be a file or directory under version control;
* the parent of @a dst_abspath must be a directory under version control
* in the same working copy; @a dst_abspath will be the name of the copied
- * item, and it must not exist already. Note that when @a src points to a
- * versioned file, the working file doesn't necessarily exist in which case
- * its text-base is used instead.
+ * item, and it must not exist already if metadata_only is FALSE. Note that
+ * when @a src points to a versioned file, the working file doesn't
+ * necessarily exist in which case its text-base is used instead.
*
* If @a cancel_func is non-NULL, call it with @a cancel_baton at
* various points during the operation. If it returns an error
@@ -4230,7 +4250,7 @@ svn_wc_status_set_repos_locks(void *set_
* @par Important:
* This is a variant of svn_wc_add4(). No changes will happen
* to the repository until a commit occurs. This scheduling can be
- * removed with svn_client_revert2().
+ * removed with svn_client_revert4().
*
* @since New in 1.7.
*/
@@ -4238,6 +4258,7 @@ svn_error_t *
svn_wc_copy3(svn_wc_context_t *wc_ctx,
const char *src_abspath,
const char *dst_abspath,
+ svn_boolean_t metadata_only,
svn_cancel_func_t cancel_func,
void *cancel_baton,
svn_wc_notify_func2_t notify_func,
@@ -4379,39 +4400,34 @@ svn_wc_delete(const char *path,
apr_pool_t *pool);
/**
- * Register @a local_abspath as a new file external aimed at
- * @a external_url, @a external_peg_rev, and @a external_rev.
+ * Put @a local_abspath under version control by registering it as addition
+ * or copy in the database containing its parent. The new node is scheduled
+ * for addition to the repository below its parent node.
+ *
+ * 1) If the node already exists, it MUST BE the root of a separate working
+ * copy from the same repository as the parent working copy. The new node
+ * and anything below it will be scheduled for addition inside the parent
+ * working copy as a copy of the original location. The separate working
+ * copy will be integrated by this step. In this case, which is only used
+ * by code like that of "svn cp URL@rev path" @a copyfrom_url and
+ * @a copyfrom_rev MUST BE the the url and revision of @a local_abspath
+ * in the separate working copy.
+ *
+ * 2a) If the node was not versioned before it will be scheduled as a local
+ * addition or 2b) if @a copyfrom_url and @a copyfrom_rev are set as a copy
+ * of that location. In this last case the function doesn't set the pristine
+ * version (of a file) and/or pristine properties, which callers should
+ * handle via different APIs. Usually it is easier to call
+ * svn_wc_add_repos_file4() (### or a possible svn_wc_add_repos_dir()) then
+ * using this variant.
*
- * If not @c NULL, @a external_peg_rev and @a external_rev must each
- * be of kind @c svn_opt_revision_number or @c svn_opt_revision_head.
+ * If @a local_abspath does not exist as file, directory or symlink, return
+ * #SVN_ERR_WC_PATH_NOT_FOUND.
*
- * @since New in 1.7.
- */
-svn_error_t *
-svn_wc_register_file_external(svn_wc_context_t *wc_ctx,
- const char *local_abspath,
- const char *external_url,
- const svn_opt_revision_t *external_peg_rev,
- const svn_opt_revision_t *external_rev,
- apr_pool_t *scratch_pool);
-
-/**
- * Put @a local_abspath under version control by adding an entry in its
- * parent, and if @a local_abspath is a directory, adding an
- * administrative area. The new node and anything under it is scheduled
- * for addition to the repository. @a wc_ctx should hold a write lock
- * for the parent directory of @a local_abspath. If @a local_abspath is
- * a directory then an access baton for @a local_abspath will be added
- * to the set containing @a parent_access.
- *
- * If @a local_abspath does not exist, return #SVN_ERR_WC_PATH_NOT_FOUND.
- *
- * If @a local_abspath is a directory, add it at @a depth; otherwise, ignore
- * @a depth.
- *
- * If @a copyfrom_url is non-NULL, it and @a copyfrom_rev are used as
- * `copyfrom' args. This is for copy operations, where one wants
- * to schedule @a local_abspath for addition with a particular history.
+ * If @a local_abspath is an unversioned directory, record @a depth on it;
+ * otherwise, ignore @a depth. (Use #svn_depth_infinity unless you exactly
+ * know what you are doing, or you may create an unexpected sparse working
+ * copy)
*
* If @a cancel_func is non-NULL, call it with @a cancel_baton at
* various points during the operation. If it returns an error
@@ -4420,39 +4436,6 @@ svn_wc_register_file_external(svn_wc_con
* When the @a local_abspath has been added, then @a notify_func will be
* called (if it is not @c NULL) with the @a notify_baton and the path.
*
- * Return #SVN_ERR_WC_NODE_KIND_CHANGE if @a local_abspath is both an
- * unversioned directory and a file that is scheduled for deletion or in
- * state deleted.
- *
- *<pre> ### This function currently does double duty -- it is also
- * ### responsible for "switching" a working copy directory over to a
- * ### new copyfrom ancestry and scheduling it for addition. Here is
- * ### the old doc string from Ben, lightly edited to bring it
- * ### up-to-date, explaining the TRUE, secret life of this function:</pre>
- *
- * Given a @a path within a working copy of type KIND, follow this algorithm:
- *
- * - if @a path is not under version control:
- * - Place it under version control and schedule for addition;
- * if @a copyfrom_url is non-NULL, use it and @a copyfrom_rev as
- * 'copyfrom' history
- *
- * - if @a path is already under version control:
- * (This can only happen when a directory is copied, in which
- * case ancestry must have been supplied as well.)
- *
- * - Schedule the directory itself for addition with copyfrom history.
- * - Mark all its children with a 'copied' flag
- * - Rewrite all the URLs to what they will be after a commit.
- * - ### @todo Remove old wcprops too, see the '###' below.
- *
- *<pre> ### I think possibly the "switchover" functionality should be
- * ### broken out into a separate function, but it's all intertwined in
- * ### the code right now. Ben, thoughts? Hard? Easy? Mauve?</pre>
- *
- * ### Update: see "###" comment in svn_wc_add_repos_file3()'s doc
- * string about this.
- *
* @since New in 1.7.
*/
svn_error_t *
@@ -5273,19 +5256,16 @@ svn_wc_crawl_revisions(const char *path,
/* Updates. */
-/** Set @a *wc_root to @c TRUE if @a path represents a "working copy root",
- * @c FALSE otherwise. Here, @a path is a "working copy root" if its parent
- * directory is not a WC or if its parent directory's repository URL is not
- * the parent of its own repository URL. Thus, a switched subtree is
+/** Set @a *wc_root to @c TRUE if @a local_abspath represents a "working copy
+ * root", @c FALSE otherwise. Here, @a local_abspath is a "working copy root"
+ * if its parent directory is not a WC or if its parent directory's repository
+ * URL is not the parent of its own repository URL. Thus, a switched subtree is
* considered to be a working copy root. Also, a deleted tree-conflict
* victim is considered a "working copy root" because it has no URL.
*
- * If @a path is not found, return the error #SVN_ERR_ENTRY_NOT_FOUND.
- *
- * Use @a pool for any intermediate allocations.
+ * If @a local_abspath is not found, return the error #SVN_ERR_ENTRY_NOT_FOUND.
*
- * @note Due to the way in which "WC-root-ness" is calculated, passing
- * a @a path of `.' to this function will always return @c TRUE.
+ * Use @a scratch_pool for any temporary allocations.
*
* @since New in 1.7.
*/
@@ -5299,6 +5279,8 @@ svn_wc_is_wc_root2(svn_boolean_t *wc_roo
* Similar to svn_wc_is_wc_root2(), but with an access baton and relative
* path.
*
+ * @note If @a path is '', this function will always return @c TRUE.
+ *
* @deprecated Provided for backward compatibility with the 1.6 API.
*/
SVN_DEPRECATED
@@ -5759,11 +5741,14 @@ svn_wc_get_pristine_props(apr_hash_t **p
apr_pool_t *scratch_pool);
-/** Set @a *value to the value of property @a name for @a path, allocating
- * @a *value in @a pool. If no such prop, set @a *value to @c NULL.
- * @a name may be a regular or wc property; if it is an entry property,
- * return the error #SVN_ERR_BAD_PROP_KIND. @a adm_access is an access
- * baton set that contains @a path.
+/** Set @a *value to the value of property @a name for @a local_abspath,
+ * allocating @a *value in @a result_pool. If no such prop, set @a *value
+ * to @c NULL. @a name may be a regular or wc property; if it is an
+ * entry property, return the error #SVN_ERR_BAD_PROP_KIND. @a wc_ctx
+ * is used to access the working copy.
+ *
+ * If @a local_abspath is not a versioned path, return
+ * #SVN_ERR_WC_PATH_NOT_FOUND
*
* @since New in 1.7.
*/
@@ -5778,6 +5763,8 @@ svn_wc_prop_get2(const svn_string_t **va
/** Similar to svn_wc_prop_get2(), but with a #svn_wc_adm_access_t /
* relative path parameter pair.
*
+ * When @a path is not versioned, set @a *value to NULL.
+ *
* @deprecated Provided for backwards compatibility with the 1.6 API.
*/
SVN_DEPRECATED
@@ -5976,6 +5963,10 @@ svn_wc_canonicalize_svn_prop(const svn_s
* appear as a diff against their copy source, or whether such paths will
* appear as if they were newly added in their entirety.
*
+ * If @a use_git_diff_format is TRUE, copied paths will be treated as added
+ * if they weren't modified after being copied. This allows the callbacks
+ * to generate appropriate --git diff headers for such files.
+ *
* If @a use_text_base is TRUE, then compare the repository against
* the working copy's text-base files, rather than the working files.
*
@@ -6004,6 +5995,7 @@ svn_wc_get_diff_editor6(const svn_delta_
svn_depth_t depth,
svn_boolean_t ignore_ancestry,
svn_boolean_t show_copies_as_adds,
+ svn_boolean_t use_git_diff_format,
svn_boolean_t use_text_base,
svn_boolean_t reverse_order,
const apr_array_header_t *changelists,
@@ -6015,7 +6007,7 @@ svn_wc_get_diff_editor6(const svn_delta_
/**
* Similar to svn_wc_get_diff_editor6(), but with an
* #svn_wc_diff_callbacks3_t instead of #svn_wc_diff_callbacks4_t,
- * and @a show_copies_as_adds set to @c FALSE.
+ * @a show_copies_as_adds, and @a use_git_diff_format set to @c FALSE.
*
* @since New in 1.6.
*
@@ -6157,6 +6149,10 @@ svn_wc_get_diff_editor(svn_wc_adm_access
* appear as a diff against their copy source, or whether such paths will
* appear as if they were newly added in their entirety.
*
+ * If @a use_git_diff_format is TRUE, copied paths will be treated as added
+ * if they weren't modified after being copied. This allows the callbacks
+ * to generate appropriate --git diff headers for such files.
+ *
* @a changelists is an array of <tt>const char *</tt> changelist
* names, used as a restrictive filter on items whose differences are
* reported; that is, don't generate diffs about any item unless
@@ -6177,6 +6173,7 @@ svn_wc_diff6(svn_wc_context_t *wc_ctx,
svn_depth_t depth,
svn_boolean_t ignore_ancestry,
svn_boolean_t show_copies_as_adds,
+ svn_boolean_t use_git_diff_format,
const apr_array_header_t *changelists,
svn_cancel_func_t cancel_func,
void *cancel_baton,
@@ -6184,8 +6181,9 @@ svn_wc_diff6(svn_wc_context_t *wc_ctx,
/**
* Similar to svn_wc_diff6(), but with a #svn_wc_diff_callbacks3_t argument
- * instead of #svn_wc_diff_callbacks4_t, and @a show_copies_as_adds set to
- * @c FALSE. It also doesn't allow specifying a cancel function.
+ * instead of #svn_wc_diff_callbacks4_t, @a show_copies_as_adds,
+ * and @a use_git_diff_format set to * @c FALSE.
+ * It also doesn't allow specifying a cancel function.
*
* @since New in 1.6.
*
@@ -6335,11 +6333,10 @@ typedef enum svn_wc_merge_outcome_t
* @a left_abspath and @a right_abspath into @a target_abspath.
* It may help to know that @a left_abspath, @a right_abspath and @a
* target_abspath correspond to "OLDER", "YOURS", and "MINE",
- * respectively, in the diff3 documentation.) Use @a scratch_pool for any
- * temporary allocation.
+ * respectively, in the diff3 documentation.
*
* @a wc_ctx should contain a write lock for the directory containing @a
- * merge_target.
+ * target_abspath.
*
* This function assumes that @a left_abspath and @a right_abspath are
* in repository-normal form (linefeeds, with keywords contracted); if
@@ -6376,7 +6373,7 @@ typedef enum svn_wc_merge_outcome_t
*
* * Copy @a left_abspath, @a right_abspath, and the original @a
* target_abspath to unique names in the same directory as @a
- * merge_target, ending with the suffixes ".LEFT_LABEL", ".RIGHT_LABEL",
+ * target_abspath, ending with the suffixes ".LEFT_LABEL", ".RIGHT_LABEL",
* and ".TARGET_LABEL" respectively.
*
* * Mark @a target_abspath as "text-conflicted", and track the above
@@ -6398,6 +6395,8 @@ typedef enum svn_wc_merge_outcome_t
* If @a dry_run is @c TRUE no files are changed. The outcome of the merge
* is returned in @a *merge_outcome.
*
+ * Use @a scratch_pool for any temporary allocation.
+ *
* @since New in 1.7.
*/
svn_error_t *
@@ -6976,6 +6975,23 @@ svn_wc_revert(const char *path,
void *notify_baton,
apr_pool_t *pool);
+/**
+ * Restores a missing node, @a local_abspath using the @a wc_ctx. Records
+ * the new last modified time of the file for status processing.
+ *
+ * If @a use_commit_times is TRUE, then set restored files' timestamps
+ * to their last-commit-times.
+ *
+ * ### Before Single-DB this function can only restore missing files.
+ *
+ * @since New in 1.7.
+ */
+svn_error_t *
+svn_wc_restore(svn_wc_context_t *wc_ctx,
+ const char *local_abspath,
+ svn_boolean_t use_commit_times,
+ apr_pool_t *scratch_pool);
+
/* Tmp files */
@@ -7017,10 +7033,10 @@ svn_wc_create_tmp_file(apr_file_t **fp,
/* EOL conversion and keyword expansion. */
-/** Set @a xlated_abspath to a translated copy of @a src
+/** Set @a xlated_path to a translated copy of @a src
* or to @a src itself if no translation is necessary.
- * That is, if @a versioned_abspath's properties indicate newline conversion
- * or keyword expansion, point @a *xlated_abspath to a copy of @a src
+ * That is, if @a versioned_file's properties indicate newline conversion or
+ * keyword expansion, point @a *xlated_path to a copy of @a src
* whose newlines and keywords are converted using the translation
* as requested by @a flags.
*
@@ -7037,37 +7053,20 @@ svn_wc_create_tmp_file(apr_file_t **fp,
* #SVN_WC_TRANSLATE_FORCE_COPY flag in @a flags.
*
* This function is generally used to get a file that can be compared
- * meaningfully against @a versioned_abspath's text base, if
- * #SVN_WC_TRANSLATE_TO_NF is specified, against @a versioned_abspath itself
- * if #SVN_WC_TRANSLATE_FROM_NF is specified.
- *
- * The output file is created in the temp file area belonging to
- * @a versioned_abspath. By default it will be deleted at result_pool
- * cleanup. If @a flags includes #SVN_WC_TRANSLATE_NO_OUTPUT_CLEANUP,
- * the default result_pool cleanup handler to remove @a *xlated_abspath is
- * not registered.
- *
- * If an error is returned, the effect on @a *xlated_abspath is undefined.
+ * meaningfully against @a versioned_file's text base, if
+ * @c SVN_WC_TRANSLATE_TO_NF is specified, against @a versioned_file itself
+ * if @c SVN_WC_TRANSLATE_FROM_NF is specified.
+ *
+ * If a new output file is created, it is created in the temp file area
+ * belonging to @a versioned_file. By default it will be deleted at pool
+ * cleanup. If @c SVN_WC_TRANSLATE_NO_OUTPUT_CLEANUP is specified, the
+ * default pool cleanup handler to remove @a *xlated_path is not registered.
+ * If the input file is returned as the output, its lifetime is not
+ * specified.
*
- * @since New in 1.7.
- */
-svn_error_t *
-svn_wc_translated_file3(const char **xlated_abspath,
- const char *src,
- svn_wc_context_t *wc_ctx,
- const char *versioned_abspath,
- apr_uint32_t flags,
- svn_cancel_func_t cancel_func,
- void *cancel_baton,
- apr_pool_t *result_pool,
- apr_pool_t *scratch_pool);
-
-
-/** Similar to svn_wc_translated_file3(), but with an adm_access baton
- * and relative paths instead of a wc_context and absolute paths, with
- * a single pool, and no cancellation func/baton.
+ * If an error is returned, the effect on @a *xlated_path is undefined.
*
- * @since New in 1.4.
+ * @since New in 1.4
* @deprecated Provided for compatibility with the 1.6 API
*/
SVN_DEPRECATED
@@ -7094,38 +7093,22 @@ svn_wc_translated_file(const char **xlat
apr_pool_t *pool);
-/** Returns a @a stream allocated in @a result_pool with access to the given
- * @a local_abspath taking the file properties from @a versioned_abspath
- * using @a wc_ctx.
- *
- * When translation from normal form is requested
- * (#SVN_WC_TRANSLATE_FROM_NF is specified in @a flags), @a path
- * is used as target path and stream read operations are not supported.
- * Conversely, if translation to normal form is requested
- * (#SVN_WC_TRANSLATE_TO_NF is specified in @a flags), @a path is
- * used as source path and stream write operations are not supported.
+/** Returns a @a stream allocated in @a pool with access to the given
+ * @a path taking the file properties from @a versioned_file using
+ * @a adm_access.
+ *
+ * If @a flags includes #SVN_WC_TRANSLATE_FROM_NF, the stream will
+ * translate from Normal Form to working copy form while writing to
+ * @a local_abspath; stream read operations are not supported.
+ * Conversely, if @a flags includes #SVN_WC_TRANSLATE_TO_NF, the stream will
+ * translate from working copy form to Normal Form while reading from
+ * @a local_abspath; stream write operations are not supported.
*
* The @a flags are the same constants as those used for
* svn_wc_translated_file().
*
- * Use @a scratch_pool for temporary allocations.
- *
- * @since New in 1.7.
- */
-svn_error_t *
-svn_wc_translated_stream2(svn_stream_t **stream,
- svn_wc_context_t *wc_ctx,
- const char *local_abspath,
- const char *versioned_abspath,
- apr_uint32_t flags,
- apr_pool_t *result_pool,
- apr_pool_t *scratch_pool);
-
-/** Similar to svn_wc_translated_stream2(), but with an adm_access baton
- * and relative paths instead of a wc_context and absolute paths.
- *
* @since New in 1.5.
- * @deprecated Provided for compatibility with the 1.6 API
+ * @deprecated Provided for compatibility with the 1.6 API.
*/
SVN_DEPRECATED
svn_error_t *
@@ -7144,14 +7127,6 @@ svn_wc_translated_stream(svn_stream_t **
* matching @a file_baton) through @a editor, then close @a file_baton
* afterwards. Use @a scratch_pool for any temporary allocation.
*
- * If @a tempfile is non-NULL, make a copy of @a local_abspath with keywords
- * and eol translated to repository-normal form, and set @a *tempfile to the
- * absolute path to this copy, allocated in @a result_pool. The copy will
- * be in the temporary-text-base directory. Do not clean up the copy;
- * caller can do that. (The purpose of handing back the tmp copy is that it
- * is usually about to become the new text base anyway, but the installation
- * of the new text base is outside the scope of this function.)
- *
* If @a new_text_base_md5_checksum is non-NULL, set
* @a *new_text_base_md5_checksum to the MD5 checksum of (@a local_abspath
* translated to repository-normal form), allocated in @a result_pool.
@@ -7175,8 +7150,7 @@ svn_wc_translated_stream(svn_stream_t **
* @since New in 1.7.
*/
svn_error_t *
-svn_wc_transmit_text_deltas3(const char **tempfile,
- const svn_checksum_t **new_text_base_md5_checksum,
+svn_wc_transmit_text_deltas3(const svn_checksum_t **new_text_base_md5_checksum,
const svn_checksum_t **new_text_base_sha1_checksum,
svn_wc_context_t *wc_ctx,
const char *local_abspath,
@@ -7190,6 +7164,14 @@ svn_wc_transmit_text_deltas3(const char
* and adm_access baton, and the checksum output is an MD5 digest instead of
* two svn_checksum_t objects.
*
+ * If @a tempfile is non-NULL, make a copy of @a path with keywords
+ * and eol translated to repository-normal form, and set @a *tempfile to the
+ * absolute path to this copy, allocated in @a result_pool. The copy will
+ * be in the temporary-text-base directory. Do not clean up the copy;
+ * caller can do that. (The purpose of handing back the tmp copy is that it
+ * is usually about to become the new text base anyway, but the installation
+ * of the new text base is outside the scope of this function.)
+ *
* @since New in 1.4.
* @deprecated Provided for backwards compatibility with the 1.6 API.
*/
Modified: subversion/branches/py-tests-as-modules/subversion/libsvn_client/add.c
URL: http://svn.apache.org/viewvc/subversion/branches/py-tests-as-modules/subversion/libsvn_client/add.c?rev=997472&r1=997471&r2=997472&view=diff
==============================================================================
--- subversion/branches/py-tests-as-modules/subversion/libsvn_client/add.c (original)
+++ subversion/branches/py-tests-as-modules/subversion/libsvn_client/add.c Wed Sep 15 19:32:26 2010
@@ -43,6 +43,7 @@
#include "svn_hash.h"
#include "svn_sorts.h"
#include "client.h"
+#include "svn_ctype.h"
#include "private/svn_wc_private.h"
@@ -80,11 +81,11 @@ trim_string(char **pstr)
char *str = *pstr;
size_t i;
- while (apr_isspace(*str))
+ while (svn_ctype_isspace(*str))
str++;
*pstr = str;
i = strlen(str);
- while ((i > 0) && apr_isspace(str[i-1]))
+ while ((i > 0) && svn_ctype_isspace(str[i-1]))
i--;
str[i] = '\0';
}
@@ -369,78 +370,47 @@ add_dir_recursive(const char *dir_abspat
svn_boolean_t force,
svn_boolean_t no_ignore,
svn_client_ctx_t *ctx,
- apr_pool_t *pool)
+ apr_pool_t *scratch_pool)
{
- apr_dir_t *dir;
- apr_finfo_t this_entry;
svn_error_t *err;
- apr_pool_t *subpool;
- apr_int32_t flags = APR_FINFO_TYPE | APR_FINFO_NAME;
+ apr_pool_t *iterpool;
apr_array_header_t *ignores;
+ apr_hash_t *dirents;
+ apr_hash_index_t *hi;
/* Check cancellation; note that this catches recursive calls too. */
if (ctx->cancel_func)
SVN_ERR(ctx->cancel_func(ctx->cancel_baton));
+ iterpool = svn_pool_create(scratch_pool);
+
/* Add this directory to revision control. */
err = svn_wc_add4(ctx->wc_ctx, dir_abspath, svn_depth_infinity, NULL,
SVN_INVALID_REVNUM, ctx->cancel_func, ctx->cancel_baton,
- ctx->notify_func2, ctx->notify_baton2, pool);
+ ctx->notify_func2, ctx->notify_baton2, iterpool);
if (err && err->apr_err == SVN_ERR_ENTRY_EXISTS && force)
svn_error_clear(err);
else if (err)
return svn_error_return(err);
- subpool = svn_pool_create(pool);
-
if (!no_ignore)
{
SVN_ERR(svn_wc_get_ignores2(&ignores, ctx->wc_ctx, dir_abspath,
- ctx->config, pool, subpool));
+ ctx->config, scratch_pool, iterpool));
}
- SVN_ERR(svn_io_dir_open(&dir, dir_abspath, pool));
+ SVN_ERR(svn_io_get_dirents3(&dirents, dir_abspath, TRUE, scratch_pool,
+ iterpool));
/* Read the directory entries one by one and add those things to
version control. */
- while (1)
+ for (hi = apr_hash_first(scratch_pool, dirents); hi; hi = apr_hash_next(hi))
{
+ const char *name = svn__apr_hash_index_key(hi);
+ svn_io_dirent2_t *dirent = svn__apr_hash_index_val(hi);
const char *abspath;
- svn_pool_clear(subpool);
-
- err = svn_io_dir_read(&this_entry, flags, dir, subpool);
-
- if (err)
- {
- /* Check if we're done reading the dir's entries. */
- if (APR_STATUS_IS_ENOENT(err->apr_err))
- {
- apr_status_t apr_err;
-
- svn_error_clear(err);
- apr_err = apr_dir_close(dir);
- if (apr_err)
- return svn_error_wrap_apr(apr_err,
- _("Can't close directory '%s'"),
- svn_dirent_local_style(dir_abspath,
- subpool));
- break;
- }
- else
- {
- return svn_error_createf(err->apr_err, err,
- _("Error during add of '%s'"),
- svn_dirent_local_style(dir_abspath,
- subpool));
- }
- }
-
- /* Skip entries for this dir and its parent. */
- if (this_entry.name[0] == '.'
- && (this_entry.name[1] == '\0'
- || (this_entry.name[1] == '.' && this_entry.name[2] == '\0')))
- continue;
+ svn_pool_clear(iterpool);
/* Check cancellation so you can cancel during an
* add of a directory with lots of files. */
@@ -448,40 +418,38 @@ add_dir_recursive(const char *dir_abspat
SVN_ERR(ctx->cancel_func(ctx->cancel_baton));
/* Skip over SVN admin directories. */
- if (svn_wc_is_adm_dir(this_entry.name, subpool))
+ if (svn_wc_is_adm_dir(name, iterpool))
continue;
- if ((!no_ignore) && svn_wc_match_ignore_list(this_entry.name,
- ignores, subpool))
+ if ((!no_ignore) && svn_wc_match_ignore_list(name, ignores, iterpool))
continue;
/* Construct the full path of the entry. */
- abspath = svn_dirent_join(dir_abspath, this_entry.name, subpool);
+ abspath = svn_dirent_join(dir_abspath, name, iterpool);
/* Recurse on directories; add files; ignore the rest. */
- if (this_entry.filetype == APR_DIR && depth >= svn_depth_immediates)
+ if (dirent->kind == svn_node_dir && depth >= svn_depth_immediates)
{
svn_depth_t depth_below_here = depth;
if (depth == svn_depth_immediates)
depth_below_here = svn_depth_empty;
SVN_ERR(add_dir_recursive(abspath, depth_below_here,
- force, no_ignore, ctx, subpool));
+ force, no_ignore, ctx, iterpool));
}
- else if (this_entry.filetype != APR_UNKFILE
- && this_entry.filetype != APR_DIR
+ else if ((dirent->kind == svn_node_file || dirent->special)
&& depth >= svn_depth_files)
{
- err = add_file(abspath, ctx, subpool);
+ err = add_file(abspath, ctx, iterpool);
if (err && err->apr_err == SVN_ERR_ENTRY_EXISTS && force)
svn_error_clear(err);
- else if (err)
- return svn_error_return(err);
+ else
+ SVN_ERR(err);
}
}
/* Destroy the per-iteration pool. */
- svn_pool_destroy(subpool);
+ svn_pool_destroy(iterpool);
return SVN_NO_ERROR;
}
@@ -539,6 +507,9 @@ add(void *baton, apr_pool_t *result_pool
/* Go up the directory tree, looking for a versioned directory. If found,
add all the intermediate directories. Otherwise, return
SVN_ERR_CLIENT_NO_VERSIONED_PARENT. */
+/* ### This function needs rewriting into its callers in a style that finds the
+ parent and then acquires an infinite depth lock there for the entire
+ operation */
static svn_error_t *
add_parent_dirs(svn_client_ctx_t *ctx,
const char *local_abspath,
@@ -546,8 +517,10 @@ add_parent_dirs(svn_client_ctx_t *ctx,
{
int format;
const char *parent_abspath;
+ svn_boolean_t own_lock;
+ svn_wc_context_t *wc_ctx = ctx->wc_ctx;
- SVN_ERR(svn_wc_check_wc2(&format, ctx->wc_ctx, local_abspath, scratch_pool));
+ SVN_ERR(svn_wc_check_wc2(&format, wc_ctx, local_abspath, scratch_pool));
if (format > 0)
return SVN_NO_ERROR;
@@ -565,7 +538,15 @@ add_parent_dirs(svn_client_ctx_t *ctx,
parent_abspath = svn_dirent_dirname(local_abspath, scratch_pool);
SVN_ERR(add_parent_dirs(ctx, parent_abspath, scratch_pool));
- SVN_ERR(svn_wc_add4(ctx->wc_ctx, local_abspath, svn_depth_infinity,
+
+ SVN_ERR(svn_wc_locked2(&own_lock, NULL, wc_ctx, parent_abspath,
+ scratch_pool));
+
+ if (!own_lock)
+ SVN_ERR(svn_wc__acquire_write_lock(NULL, wc_ctx, parent_abspath, FALSE,
+ scratch_pool, scratch_pool));
+
+ SVN_ERR(svn_wc_add4(wc_ctx, local_abspath, svn_depth_infinity,
NULL, SVN_INVALID_REVNUM,
ctx->cancel_func, ctx->cancel_baton,
ctx->notify_func2, ctx->notify_baton2,
@@ -573,7 +554,7 @@ add_parent_dirs(svn_client_ctx_t *ctx,
/* ### New dir gets added with its own per-directory lock which we
must release. This code should be redundant when we move to a
single db. */
- SVN_ERR(svn_wc__release_write_lock(ctx->wc_ctx, local_abspath, scratch_pool));
+ SVN_ERR(svn_wc__release_write_lock(wc_ctx, parent_abspath, scratch_pool));
return SVN_NO_ERROR;
}
@@ -593,6 +574,11 @@ svn_client_add4(const char *path,
const char *local_abspath;
struct add_with_write_lock_baton baton;
+ if (svn_path_is_url(path))
+ return svn_error_return(svn_error_createf(SVN_ERR_ILLEGAL_TARGET, NULL,
+ _("'%s' is not a local path"),
+ path));
+
SVN_ERR(svn_dirent_get_absolute(&local_abspath, path, pool));
/* ### this is a hack.
@@ -622,7 +608,8 @@ svn_client_add4(const char *path,
baton.no_ignore = no_ignore;
baton.ctx = ctx;
SVN_ERR(svn_wc__call_with_write_lock(add, &baton, ctx->wc_ctx,
- parent_abspath, pool, pool));
+ parent_abspath, FALSE,
+ pool, pool));
return SVN_NO_ERROR;
}
@@ -667,17 +654,17 @@ add_url_parents(svn_ra_session_t *ra_ses
}
static svn_error_t *
-mkdir_urls(svn_commit_info_t **commit_info_p,
- const apr_array_header_t *urls,
+mkdir_urls(const apr_array_header_t *urls,
svn_boolean_t make_parents,
const apr_hash_t *revprop_table,
+ svn_commit_callback2_t commit_callback,
+ void *commit_baton,
svn_client_ctx_t *ctx,
apr_pool_t *pool)
{
svn_ra_session_t *ra_session = NULL;
const svn_delta_editor_t *editor;
void *edit_baton;
- void *commit_baton;
const char *log_msg;
apr_array_header_t *targets;
apr_hash_t *targets_hash;
@@ -704,9 +691,9 @@ mkdir_urls(svn_commit_info_t **commit_in
const char *first_url = APR_ARRAY_IDX(urls, 0, const char *);
apr_pool_t *iterpool = svn_pool_create(pool);
- SVN_ERR(svn_client__open_ra_session_internal(&ra_session, first_url,
- NULL, NULL, FALSE,
- TRUE, ctx, pool));
+ SVN_ERR(svn_client__open_ra_session_internal(&ra_session, NULL,
+ first_url, NULL, NULL,
+ FALSE, TRUE, ctx, pool));
for (i = 0; i < urls->nelts; i++)
{
@@ -734,7 +721,7 @@ mkdir_urls(svn_commit_info_t **commit_in
if (! targets->nelts)
{
const char *bname;
- svn_uri_split(common, &common, &bname, pool);
+ svn_uri_split(&common, &bname, common, pool);
APR_ARRAY_PUSH(targets, const char *) = bname;
}
else
@@ -756,7 +743,7 @@ mkdir_urls(svn_commit_info_t **commit_in
if (resplit)
{
const char *bname;
- svn_uri_split(common, &common, &bname, pool);
+ svn_uri_split(&common, &bname, common, pool);
for (i = 0; i < targets->nelts; i++)
{
const char *path = APR_ARRAY_IDX(targets, i, const char *);
@@ -806,8 +793,9 @@ mkdir_urls(svn_commit_info_t **commit_in
/* Open an RA session for the URL. Note that we don't have a local
directory, nor a place to put temp files. */
if (!ra_session)
- SVN_ERR(svn_client__open_ra_session_internal(&ra_session, common, NULL,
- NULL, FALSE, TRUE, ctx, pool));
+ SVN_ERR(svn_client__open_ra_session_internal(&ra_session, NULL, common,
+ NULL, NULL, FALSE, TRUE,
+ ctx, pool));
/* URI-decode each target. */
for (i = 0; i < targets->nelts; i++)
@@ -818,10 +806,9 @@ mkdir_urls(svn_commit_info_t **commit_in
}
/* Fetch RA commit editor */
- SVN_ERR(svn_client__commit_get_baton(&commit_baton, commit_info_p, pool));
SVN_ERR(svn_ra_get_commit_editor3(ra_session, &editor, &edit_baton,
commit_revprops,
- svn_client__commit_callback,
+ commit_callback,
commit_baton,
NULL, TRUE, /* No lock tokens */
pool));
@@ -880,10 +867,11 @@ svn_client__make_local_parents(const cha
svn_error_t *
-svn_client_mkdir3(svn_commit_info_t **commit_info_p,
- const apr_array_header_t *paths,
+svn_client_mkdir4(const apr_array_header_t *paths,
svn_boolean_t make_parents,
const apr_hash_t *revprop_table,
+ svn_commit_callback2_t commit_callback,
+ void *commit_baton,
svn_client_ctx_t *ctx,
apr_pool_t *pool)
{
@@ -892,8 +880,8 @@ svn_client_mkdir3(svn_commit_info_t **co
if (svn_path_is_url(APR_ARRAY_IDX(paths, 0, const char *)))
{
- SVN_ERR(mkdir_urls(commit_info_p, paths, make_parents,
- revprop_table, ctx, pool));
+ SVN_ERR(mkdir_urls(paths, make_parents, revprop_table, commit_callback,
+ commit_baton, ctx, pool));
}
else
{
Modified: subversion/branches/py-tests-as-modules/subversion/libsvn_client/cat.c
URL: http://svn.apache.org/viewvc/subversion/branches/py-tests-as-modules/subversion/libsvn_client/cat.c?rev=997472&r1=997471&r2=997472&view=diff
==============================================================================
--- subversion/branches/py-tests-as-modules/subversion/libsvn_client/cat.c (original)
+++ subversion/branches/py-tests-as-modules/subversion/libsvn_client/cat.c Wed Sep 15 19:32:26 2010
@@ -44,17 +44,16 @@
/*** Code. ***/
-/* Helper function to handle copying a potentially translated version of
- local file LOCAL_ABSPATH to OUTPUT. REVISION must be one of the following:
- BASE, COMMITTED, WORKING. Uses SCRATCH_POOL for temporary allocations. */
-static svn_error_t *
-cat_local_file(svn_wc_context_t *wc_ctx,
- const char *local_abspath,
- svn_stream_t *output,
- const svn_opt_revision_t *revision,
- svn_cancel_func_t cancel_func,
- void *cancel_baton,
- apr_pool_t *scratch_pool)
+svn_error_t *
+svn_client__get_normalized_stream(svn_stream_t **normal_stream,
+ svn_wc_context_t *wc_ctx,
+ const char *local_abspath,
+ const svn_opt_revision_t *revision,
+ svn_boolean_t expand_keywords,
+ svn_cancel_func_t cancel_func,
+ void *cancel_baton,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool)
{
apr_hash_t *kw = NULL;
svn_subst_eol_style_t style;
@@ -84,7 +83,7 @@ cat_local_file(svn_wc_context_t *wc_ctx,
if (revision->kind != svn_opt_revision_working)
{
SVN_ERR(svn_wc_get_pristine_contents2(&input, wc_ctx, local_abspath,
- scratch_pool, scratch_pool));
+ result_pool, scratch_pool));
if (input == NULL)
return svn_error_createf(SVN_ERR_ILLEGAL_TARGET, NULL,
_("'%s' has no base revision until it is committed"),
@@ -98,7 +97,7 @@ cat_local_file(svn_wc_context_t *wc_ctx,
svn_wc_status3_t *status;
SVN_ERR(svn_stream_open_readonly(&input, local_abspath, scratch_pool,
- scratch_pool));
+ result_pool));
SVN_ERR(svn_wc_prop_list2(&props, wc_ctx, local_abspath, scratch_pool,
scratch_pool));
@@ -162,18 +161,14 @@ cat_local_file(svn_wc_context_t *wc_ctx,
author, scratch_pool));
}
- /* Our API contract says that OUTPUT will not be closed. The two paths
- below close it, so disown the stream to protect it. The input will
- be closed, which is good (since we opened it). */
- output = svn_stream_disown(output, scratch_pool);
-
/* Wrap the output stream if translation is needed. */
if (eol != NULL || kw != NULL)
- output = svn_subst_stream_translated(output, eol, FALSE, kw, TRUE,
- scratch_pool);
+ input = svn_subst_stream_translated(input, eol, FALSE, kw, expand_keywords,
+ result_pool);
- return svn_error_return(svn_stream_copy3(input, output, cancel_func,
- cancel_baton, scratch_pool));
+ *normal_stream = input;
+
+ return SVN_NO_ERROR;
}
svn_error_t *
@@ -212,11 +207,20 @@ svn_client_cat2(svn_stream_t *out,
&& SVN_CLIENT__REVKIND_IS_LOCAL_TO_WC(revision->kind))
{
const char *local_abspath;
+ svn_stream_t *normal_stream;
SVN_ERR(svn_dirent_get_absolute(&local_abspath, path_or_url, pool));
- return svn_error_return(
- cat_local_file(ctx->wc_ctx, local_abspath, out, revision,
- ctx->cancel_func, ctx->cancel_baton, pool));
+ SVN_ERR(svn_client__get_normalized_stream(&normal_stream, ctx->wc_ctx,
+ local_abspath, revision, TRUE,
+ ctx->cancel_func, ctx->cancel_baton,
+ pool, pool));
+
+ /* We don't promise to close output, so disown it to ensure we don't. */
+ output = svn_stream_disown(output, pool);
+
+ return svn_error_return(svn_stream_copy3(normal_stream, output,
+ ctx->cancel_func,
+ ctx->cancel_baton, pool));
}
/* Get an RA plugin for this filesystem object. */
Modified: subversion/branches/py-tests-as-modules/subversion/libsvn_client/changelist.c
URL: http://svn.apache.org/viewvc/subversion/branches/py-tests-as-modules/subversion/libsvn_client/changelist.c?rev=997472&r1=997471&r2=997472&view=diff
==============================================================================
--- subversion/branches/py-tests-as-modules/subversion/libsvn_client/changelist.c (original)
+++ subversion/branches/py-tests-as-modules/subversion/libsvn_client/changelist.c Wed Sep 15 19:32:26 2010
@@ -36,6 +36,7 @@
#include "client.h"
#include "private/svn_wc_private.h"
+#include "svn_private_config.h"
/* Entry-walker callback for svn_client_add_to_changelist() and
@@ -71,7 +72,11 @@ set_node_changelist(const char *local_ab
/* We only care about files right now. */
if (kind != svn_node_file)
{
- if (b->ctx->notify_func2)
+ /* Notify, unless it's a directory being removed from a changelist.
+ (That is in order to not spam during 'svn cl --remove -R'.)
+ */
+ if (b->ctx->notify_func2
+ && ! (b->changelist == NULL && kind == svn_node_dir))
b->ctx->notify_func2(b->ctx->notify_baton2,
svn_wc_create_notify(local_abspath,
svn_wc_notify_skip,
@@ -102,6 +107,16 @@ svn_client_add_to_changelist(const apr_a
apr_hash_t *changelist_hash = NULL;
int i;
+ for (i = 0; i < paths->nelts; i++)
+ {
+ const char *path = APR_ARRAY_IDX(paths, i, const char *);
+ if (svn_path_is_url(path))
+ return svn_error_return(svn_error_createf(SVN_ERR_ILLEGAL_TARGET,
+ NULL,
+ _("'%s' is not a local path"),
+ path));
+ }
+
if (changelists && changelists->nelts)
SVN_ERR(svn_hash_from_cstring_keys(&changelist_hash, changelists, pool));
@@ -144,6 +159,16 @@ svn_client_remove_from_changelists(const
apr_hash_t *changelist_hash = NULL;
int i;
+ for (i = 0; i < paths->nelts; i++)
+ {
+ const char *path = APR_ARRAY_IDX(paths, i, const char *);
+ if (svn_path_is_url(path))
+ return svn_error_return(svn_error_createf(SVN_ERR_ILLEGAL_TARGET,
+ NULL,
+ _("'%s' is not a local path"),
+ path));
+ }
+
if (changelists && changelists->nelts)
SVN_ERR(svn_hash_from_cstring_keys(&changelist_hash, changelists, pool));
Modified: subversion/branches/py-tests-as-modules/subversion/libsvn_client/cleanup.c
URL: http://svn.apache.org/viewvc/subversion/branches/py-tests-as-modules/subversion/libsvn_client/cleanup.c?rev=997472&r1=997471&r2=997472&view=diff
==============================================================================
--- subversion/branches/py-tests-as-modules/subversion/libsvn_client/cleanup.c (original)
+++ subversion/branches/py-tests-as-modules/subversion/libsvn_client/cleanup.c Wed Sep 15 19:32:26 2010
@@ -32,6 +32,7 @@
#include "svn_client.h"
#include "svn_config.h"
#include "svn_dirent_uri.h"
+#include "svn_path.h"
#include "svn_pools.h"
#include "client.h"
#include "svn_props.h"
@@ -50,6 +51,11 @@ svn_client_cleanup(const char *path,
const char *local_abspath;
svn_error_t *err;
+ if (svn_path_is_url(path))
+ return svn_error_return(svn_error_createf(SVN_ERR_ILLEGAL_TARGET, NULL,
+ _("'%s' is not a local path"),
+ path));
+
SVN_ERR(svn_dirent_get_absolute(&local_abspath, path, scratch_pool));
err = svn_wc_cleanup3(ctx->wc_ctx, local_abspath, ctx->cancel_func,
Modified: subversion/branches/py-tests-as-modules/subversion/libsvn_client/client.h
URL: http://svn.apache.org/viewvc/subversion/branches/py-tests-as-modules/subversion/libsvn_client/client.h?rev=997472&r1=997471&r2=997472&view=diff
==============================================================================
--- subversion/branches/py-tests-as-modules/subversion/libsvn_client/client.h (original)
+++ subversion/branches/py-tests-as-modules/subversion/libsvn_client/client.h Wed Sep 15 19:32:26 2010
@@ -331,17 +331,6 @@ svn_client__path_relative_to_root(const
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
-/* Retrieve the oldest revision of the node at REL_PATH at REV since
- it was last copied (if applicable), and store it in OLDEST_REV. If
- REL_PATH does not exist in that REV, set *OLDEST_REV to
- SVN_INVALID_REVNUM. Use POOL for temporary allocations. */
-svn_error_t *
-svn_client__oldest_rev_at_path(svn_revnum_t *oldest_rev,
- svn_ra_session_t *ra_session,
- const char *rel_path,
- svn_revnum_t rev,
- apr_pool_t *pool);
-
/* A default error handler for use with svn_wc_walk_entries3(). Returns
ERR in all cases. */
svn_error_t *
@@ -360,7 +349,9 @@ svn_client__default_walker_error_handler
#define SVN_CLIENT__HAS_LOG_MSG_FUNC(ctx) \
((ctx)->log_msg_func3 || (ctx)->log_msg_func2 || (ctx)->log_msg_func)
-/* Open an RA session, returning it in *RA_SESSION.
+/* Open an RA session, returning it in *RA_SESSION or a corrected URL
+ in *CORRECTED_URL. (This function mirrors svn_ra_open4(), which
+ see, regarding the interpretation and handling of these two parameters.)
The root of the session is specified by BASE_URL and BASE_DIR.
@@ -386,6 +377,7 @@ svn_client__default_walker_error_handler
avoid confusion with the public API svn_client_open_ra_session(). */
svn_error_t *
svn_client__open_ra_session_internal(svn_ra_session_t **ra_session,
+ const char **corrected_url,
const char *base_url,
const char *base_dir_abspath,
const apr_array_header_t *commit_items,
@@ -398,23 +390,6 @@ svn_client__open_ra_session_internal(svn
/* ---------------------------------------------------------------- */
-/*** Commit ***/
-
-/* Get the commit_baton to be used in couple with commit_callback. */
-svn_error_t *svn_client__commit_get_baton(void **baton,
- svn_commit_info_t **info,
- apr_pool_t *pool);
-
-/* The commit_callback function for storing svn_client_commit_info_t
- pointed by commit_baton. If the commit_info supplied by get_baton
- points to NULL after close_edit, it means the commit is a no-op.
-*/
-svn_error_t *svn_client__commit_callback(const svn_commit_info_t *commit_info,
- void *baton,
- apr_pool_t *pool);
-
-/* ---------------------------------------------------------------- */
-
/*** Status ***/
/* Verify that the path can be deleted without losing stuff,
@@ -866,13 +841,14 @@ typedef struct
svn_error_t *
svn_client__harvest_committables(apr_hash_t **committables,
apr_hash_t **lock_tokens,
- const char *dir_abspath,
+ const char *base_dir_abspath,
const apr_array_header_t *targets,
svn_depth_t depth,
svn_boolean_t just_locked,
const apr_array_header_t *changelists,
svn_client_ctx_t *ctx,
- apr_pool_t *pool);
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool);
/* Recursively crawl each absolute working copy path SRC in COPY_PAIRS,
@@ -888,7 +864,8 @@ svn_error_t *
svn_client__get_copy_committables(apr_hash_t **committables,
const apr_array_header_t *copy_pairs,
svn_client_ctx_t *ctx,
- apr_pool_t *pool);
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool);
/* A qsort()-compatible sort routine for sorting an array of
@@ -919,12 +896,6 @@ svn_client__condense_commit_items(const
NOTIFY_PATH_PREFIX will be passed to CTX->notify_func2() as the
common absolute path prefix of the committed paths. It can be NULL.
- If NEW_TEXT_BASE_ABSPATHS is not NULL, create in the temporary-text-base
- directory a copy of the working version of each file transmitted, but
- with keywords and eol translated to repository-normal form, and set
- *NEW_TEXT_BASE_ABSPATHS to a hash that maps (const char *) paths (from
- the items' paths) to the (const char *) abspaths of these files.
-
If MD5_CHECKSUMS is not NULL, set *MD5_CHECKSUMS to a hash containing,
for each file transmitted, a mapping from the commit-item's (const
char *) path to the (const svn_checksum_t *) MD5 checksum of its new text
@@ -938,7 +909,6 @@ svn_client__do_commit(const char *base_u
const svn_delta_editor_t *editor,
void *edit_baton,
const char *notify_path_prefix,
- apr_hash_t **new_text_base_abspaths,
apr_hash_t **md5_checksums,
apr_hash_t **sha1_checksums,
svn_client_ctx_t *ctx,
@@ -1008,6 +978,8 @@ svn_client__handle_externals(apr_hash_t
behaves as for svn_client__handle_externals(), except that ambient
depths are presumed to be svn_depth_infinity.
+ 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.
@@ -1020,6 +992,7 @@ svn_client__fetch_externals(apr_hash_t *
const char *repos_root_url,
svn_depth_t requested_depth,
svn_boolean_t is_export,
+ const char *native_eol,
svn_boolean_t *timestamp_sleep,
svn_client_ctx_t *ctx,
apr_pool_t *pool);
@@ -1064,6 +1037,20 @@ svn_client__ensure_revprop_table(apr_has
svn_client_ctx_t *ctx,
apr_pool_t *pool);
+/* Return a potentially translated version of local file LOCAL_ABSPATH
+ in NORMAL_STREAM. REVISION must be one of the following: BASE, COMMITTED,
+ WORKING. Uses SCRATCH_POOL for temporary allocations. */
+svn_error_t *
+svn_client__get_normalized_stream(svn_stream_t **normal_stream,
+ svn_wc_context_t *wc_ctx,
+ const char *local_abspath,
+ const svn_opt_revision_t *revision,
+ svn_boolean_t expand_keywords,
+ svn_cancel_func_t cancel_func,
+ void *cancel_baton,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool);
+
/* Return true if KIND is a revision kind that is dependent on the working
* copy. Otherwise, return false. */
Modified: subversion/branches/py-tests-as-modules/subversion/libsvn_client/cmdline.c
URL: http://svn.apache.org/viewvc/subversion/branches/py-tests-as-modules/subversion/libsvn_client/cmdline.c?rev=997472&r1=997471&r2=997472&view=diff
==============================================================================
--- subversion/branches/py-tests-as-modules/subversion/libsvn_client/cmdline.c (original)
+++ subversion/branches/py-tests-as-modules/subversion/libsvn_client/cmdline.c Wed Sep 15 19:32:26 2010
@@ -121,9 +121,18 @@ check_root_url_of_target(const char **ro
/* It is OK if the given target does not exist, it just means
* we will not be able to determine the root url from this particular
* argument.
+ *
+ * If the target itself is a URL to a repository that does not exist,
+ * that's fine, too. The callers will deal with this argument in an
+ * appropriate manter if it does not make any sense.
+ *
+ * Also tolerate locally added targets ("bad revision" error).
*/
if ((err->apr_err == SVN_ERR_ENTRY_NOT_FOUND)
- || (err->apr_err == SVN_ERR_WC_NOT_WORKING_COPY))
+ || (err->apr_err == SVN_ERR_WC_PATH_NOT_FOUND)
+ || (err->apr_err == SVN_ERR_WC_NOT_WORKING_COPY)
+ || (err->apr_err == SVN_ERR_RA_LOCAL_REPOS_OPEN_FAILED)
+ || (err->apr_err == SVN_ERR_CLIENT_BAD_REVISION))
{
svn_error_clear(err);
return SVN_NO_ERROR;