You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by da...@apache.org on 2010/03/30 22:58:01 UTC
svn commit: r929279 [7/20] - in /subversion/branches/svn-patch-improvements:
./ build/ac-macros/ build/generator/ build/generator/templates/
contrib/client-side/emacs/ notes/feedback/ notes/meetings/ notes/wc-ng/
subversion/ subversion/bindings/javahl/...
Modified: subversion/branches/svn-patch-improvements/subversion/bindings/swig/ruby/test/test_core.rb
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/bindings/swig/ruby/test/test_core.rb?rev=929279&r1=929278&r2=929279&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/bindings/swig/ruby/test/test_core.rb (original)
+++ subversion/branches/svn-patch-improvements/subversion/bindings/swig/ruby/test/test_core.rb Tue Mar 30 20:57:53 2010
@@ -793,55 +793,55 @@ EOM
end
def test_range_list_diff
- range_list1 = Svn::Core::RangeList.new([5, 5, true], [9, 13, true])
+ range_list1 = Svn::Core::RangeList.new([4, 5, true], [9, 13, true])
range_list2 = Svn::Core::RangeList.new([7, 11, true])
deleted, added = range_list1.diff(range_list2)
assert_equal([[7, 9, true]], added.collect {|range| range.to_a})
- assert_equal([[5, 5, true], [11, 13, true]],
+ assert_equal([[4, 5, true], [11, 13, true]],
deleted.collect {|range| range.to_a})
end
def test_range_list_merge
- range_list1 = Svn::Core::RangeList.new([5, 5, true],
- [7, 7, true], [9, 13, true])
+ range_list1 = Svn::Core::RangeList.new([4, 5, true],
+ [7, 8, true], [9, 13, true])
range_list2 = Svn::Core::RangeList.new([5, 9, true])
merged = range_list1.merge(range_list2)
- assert_equal([[5, 13, true]], merged.collect {|range| range.to_a})
+ assert_equal([[4, 13, true]], merged.collect {|range| range.to_a})
end
def test_range_list_remove
- range_list1 = Svn::Core::RangeList.new([5, 5, true],
- [7, 7, true], [9, 13, true])
- range_list2 = Svn::Core::RangeList.new([5, 9, true])
+ range_list1 = Svn::Core::RangeList.new([4, 5, true],
+ [7, 8, true], [10, 13, true])
+ range_list2 = Svn::Core::RangeList.new([4, 9, true])
removed = range_list1.remove(range_list2)
- assert_equal([[9, 13, true]], removed.collect {|range| range.to_a})
+ assert_equal([[10, 13, true]], removed.collect {|range| range.to_a})
end
def test_range_list_intersect
- range_list1 = Svn::Core::RangeList.new([5, 9, true])
- range_list2 = Svn::Core::RangeList.new([5, 5, true],
- [7, 7, true], [9, 13, true])
+ range_list1 = Svn::Core::RangeList.new([4, 9, true])
+ range_list2 = Svn::Core::RangeList.new([4, 5, true],
+ [7, 8, true], [9, 13, true])
intersected = range_list1.intersect(range_list2)
- assert_equal([[5, 5, true], [7, 7, true]],
+ assert_equal([[4, 5, true], [7, 8, true]],
intersected.collect {|range| range.to_a})
end
def test_range_list_reverse
- range_list = Svn::Core::RangeList.new([5, 5, true],
- [7, 7, true], [9, 13, true])
+ range_list = Svn::Core::RangeList.new([4, 5, true],
+ [7, 8, true], [10, 13, true])
reversed = range_list.reverse
- assert_equal([[13, 9, true], [7, 7, true], [5, 5, true]],
+ assert_equal([[13, 10, true], [8, 7, true], [5, 4, true]],
reversed.collect {|range| range.to_a})
end
def test_range_list_to_s
- range_list = Svn::Core::RangeList.new([5, 5, true],
- [7, 7, true], [9, 13, true])
+ range_list = Svn::Core::RangeList.new([4, 6, true],
+ [6, 8, true], [9, 13, true])
expectation = "5-6,7-8,10-13"
assert_equal(expectation, range_list.to_s)
assert_not_equal(expectation, range_list.inspect)
Modified: subversion/branches/svn-patch-improvements/subversion/bindings/swig/ruby/test/test_wc.rb
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/bindings/swig/ruby/test/test_wc.rb?rev=929279&r1=929278&r2=929279&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/bindings/swig/ruby/test/test_wc.rb (original)
+++ subversion/branches/svn-patch-improvements/subversion/bindings/swig/ruby/test/test_wc.rb Tue Mar 30 20:57:53 2010
@@ -333,15 +333,6 @@ class SvnWcTest < Test::Unit::TestCase
],
ignored_errors.collect {|path, err| [path, err.class]})
end
-
- Svn::Wc::AdmAccess.open(nil, @wc_path, true, 5) do |access|
- assert_raises(Svn::Error::WcPathFound) do
- access.mark_missing_deleted(path1)
- end
- FileUtils.rm(path1)
- access.mark_missing_deleted(path1)
- access.maybe_set_repos_root(path2, @repos_uri)
- end
end
end
@@ -1091,7 +1082,7 @@ EOE
def test_context_create
assert_nothing_raised do
- result = Svn::Wc::Context.create do |context|
+ result = Svn::Wc::Context.create do |context|
assert_not_nil context
assert_kind_of Svn::Wc::Context, context
end
Modified: subversion/branches/svn-patch-improvements/subversion/bindings/swig/svn_diff.i
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/bindings/swig/svn_diff.i?rev=929279&r1=929278&r2=929279&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/bindings/swig/svn_diff.i (original)
+++ subversion/branches/svn-patch-improvements/subversion/bindings/swig/svn_diff.i Tue Mar 30 20:57:53 2010
@@ -45,6 +45,15 @@
#ifdef SWIGPYTHON
%apply svn_stream_t *WRAPPED_STREAM { svn_stream_t * };
+
+/* The WRAPPED_STREAM typemap can't cope with struct members, and there
+ isn't really a reason to change these. */
+%immutable svn_hunk_t::diff_text;
+%immutable svn_hunk_t::original_text;
+%immutable svn_hunk_t::modified_text;
+
+/* Ditto. */
+%immutable svn_patch_t::patch_file;
#endif
/* ----------------------------------------------------------------------- */
Modified: subversion/branches/svn-patch-improvements/subversion/include/mod_dav_svn.h
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/include/mod_dav_svn.h?rev=929279&r1=929278&r2=929279&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/include/mod_dav_svn.h (original)
+++ subversion/branches/svn-patch-improvements/subversion/include/mod_dav_svn.h Tue Mar 30 20:57:53 2010
@@ -37,7 +37,8 @@ extern "C" {
#endif /* __cplusplus */
-/* Given an apache request R, a URI, and a ROOT_PATH to the svn
+/**
+ Given an apache request R, a URI, and a ROOT_PATH to the svn
location block, process URI and return many things, allocated in
r->pool:
@@ -82,9 +83,9 @@ AP_MODULE_DECLARE(dav_error *) dav_svn_s
const char **repos_path);
-/* Given an apache request R and a ROOT_PATH to the svn location
- block sets *REPOS_PATH to the path of the repository on disk.
-*/
+/**
+ * Given an apache request R and a ROOT_PATH to the svn location
+ * block sets *REPOS_PATH to the path of the repository on disk. */
AP_MODULE_DECLARE(dav_error *) dav_svn_get_repos_path(request_rec *r,
const char *root_path,
const char **repos_path);
Modified: subversion/branches/svn-patch-improvements/subversion/include/private/svn_cmdline_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/include/private/svn_cmdline_private.h?rev=929279&r1=929278&r2=929279&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/include/private/svn_cmdline_private.h (original)
+++ subversion/branches/svn-patch-improvements/subversion/include/private/svn_cmdline_private.h Tue Mar 30 20:57:53 2010
@@ -102,7 +102,7 @@ svn_cmdline__parse_config_option(apr_arr
*/
svn_error_t *
svn_cmdline__apply_config_options(apr_hash_t *config,
- apr_array_header_t *config_options,
+ const apr_array_header_t *config_options,
const char *prefix,
const char *argument_name);
Modified: subversion/branches/svn-patch-improvements/subversion/include/private/svn_mergeinfo_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/include/private/svn_mergeinfo_private.h?rev=929279&r1=929278&r2=929279&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/include/private/svn_mergeinfo_private.h (original)
+++ subversion/branches/svn-patch-improvements/subversion/include/private/svn_mergeinfo_private.h Tue Mar 30 20:57:53 2010
@@ -170,7 +170,7 @@ svn_mergeinfo__filter_mergeinfo_by_range
apr_pool_t *scratch_pool);
/* Filter each mergeinfo in CATALOG as per
- svn_mergeinfo__filter_mergefino_by_ranges and put a deep copy of the
+ svn_mergeinfo__filter_mergeinfo_by_ranges() and put a deep copy of the
result in *FILTERED_CATALOG, allocated in RESULT_POOL. If any mergeinfo
is filtered to an empty hash then filter that path/mergeinfo as well.
If all mergeinfo is filtered or CATALOG is NULL then set *FILTERED_CATALOG
Modified: subversion/branches/svn-patch-improvements/subversion/include/private/svn_opt_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/include/private/svn_opt_private.h?rev=929279&r1=929278&r2=929279&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/include/private/svn_opt_private.h (original)
+++ subversion/branches/svn-patch-improvements/subversion/include/private/svn_opt_private.h Tue Mar 30 20:57:53 2010
@@ -116,7 +116,7 @@ svn_opt__arg_canonicalize_path(const cha
svn_error_t *
svn_opt__args_to_target_array(apr_array_header_t **targets_p,
apr_getopt_t *os,
- apr_array_header_t *known_targets,
+ const apr_array_header_t *known_targets,
apr_pool_t *pool);
/**
Modified: subversion/branches/svn-patch-improvements/subversion/include/private/svn_skel.h
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/include/private/svn_skel.h?rev=929279&r1=929278&r2=929279&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/include/private/svn_skel.h (original)
+++ subversion/branches/svn-patch-improvements/subversion/include/private/svn_skel.h Tue Mar 30 20:57:53 2010
@@ -138,6 +138,10 @@ svn_skel_t *svn_skel__make_empty_list(ap
void svn_skel__prepend(svn_skel_t *skel, svn_skel_t *list);
+/* Append SKEL to LIST. */
+void svn_skel__append(svn_skel_t *list, const svn_skel_t *skel);
+
+
/* Create an atom skel whose contents are the string representation
of the integer VALUE, allocated in RESULT_POOL, and then prepend
it to SKEL. */
Modified: subversion/branches/svn-patch-improvements/subversion/include/private/svn_sqlite.h
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/include/private/svn_sqlite.h?rev=929279&r1=929278&r2=929279&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/include/private/svn_sqlite.h (original)
+++ subversion/branches/svn-patch-improvements/subversion/include/private/svn_sqlite.h Tue Mar 30 20:57:53 2010
@@ -150,7 +150,7 @@ svn_sqlite__prepare(svn_sqlite__stmt_t *
Spec Argument type Item type
---- ----------------- ---------
i apr_int64_t Number
- s const char ** String
+ s const char * String
b const void * Blob data
apr_size_t Blob length
t const svn_token_t * Token mapping table
Modified: subversion/branches/svn-patch-improvements/subversion/include/private/svn_wc_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/include/private/svn_wc_private.h?rev=929279&r1=929278&r2=929279&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/include/private/svn_wc_private.h (original)
+++ subversion/branches/svn-patch-improvements/subversion/include/private/svn_wc_private.h Tue Mar 30 20:57:53 2010
@@ -77,9 +77,7 @@ svn_wc__maybe_get_entry(const svn_wc_ent
/** Given a @a local_abspath with a @a wc_ctx, set @a *switched to
* TRUE if @a local_abspath is switched, otherwise set @a *switched to FALSE.
- * If neither @a local_abspath or its parent have valid URLs, return
- * @c SVN_ERR_ENTRY_MISSING_URL. All temporaryallocations are done in
- * @a scratch_pool.
+ * All temporary allocations are done in * @a scratch_pool.
*/
svn_error_t *
svn_wc__path_switched(svn_boolean_t *switched,
@@ -250,22 +248,6 @@ svn_wc__adm_probe_in_context(svn_wc_adm_
void *cancel_baton,
apr_pool_t *pool);
-/** Like svn_wc_adm_open_anchor(), but with a svn_wc_context_t * to use
- * when opening the access batons.
- *
- * NOT FOR NEW DEVELOPMENT! (See note to svn_wc__adm_open_in_context().)
- */
-svn_error_t *
-svn_wc__adm_open_anchor_in_context(svn_wc_adm_access_t **anchor_access,
- svn_wc_adm_access_t **target_access,
- const char **target,
- svn_wc_context_t *wc_ctx,
- const char *path,
- svn_boolean_t write_lock,
- int levels_to_lock,
- svn_cancel_func_t cancel_func,
- void *cancel_baton,
- apr_pool_t *pool);
/**
@@ -520,13 +502,12 @@ svn_wc__node_get_lock_token(const char *
* @a anchor_abspath is NULL. If @a anchor_abspath is not NULL then
* recursively acquire write locks for the anchor of @a local_abspath
* and return the anchor path in @a *anchor_abspath. Use @a wc_ctx
- * for working copy access.
+ * for working copy access.
*
- * Returns @c SVN_ERR_WC_LOCKED an existing lock is encountered, but
- * may have set locks of it's own; it's not clear how the caller is
- * expected to handle this.
+ * Returns @c SVN_ERR_WC_LOCKED if an existing lock is encountered, in
+ * which case any locks acquired will have been released.
*
- * If @a *anchor_abspath is not NULL it will be set evenwhen
+ * If @a *anchor_abspath is not NULL it will be set even when
* SVN_ERR_WC_LOCKED is returned.
*
* ### @a anchor_abspath should be removed when we move to centralised
@@ -542,8 +523,8 @@ svn_wc__acquire_write_lock(const char **
/**
* Recursively release write locks for @a local_abspath, using @a wc_ctx
- * for working copy access. Locks are not removed if work queue items are
- * present. Only the @c db member of @c wc_ctx is used.
+ * for working copy access. Only locks held by @a wc_ctx are released.
+ * Locks are not removed if work queue items are present.
*/
svn_error_t *
svn_wc__release_write_lock(svn_wc_context_t *wc_ctx,
@@ -569,7 +550,19 @@ svn_wc__call_with_write_lock(svn_wc__wit
const char *local_abspath,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
-
+
+
+/** Mark missing, deleted directory @a local_abspath as 'not-present'
+ * in its parent's list of entries.
+ *
+ * Return #SVN_ERR_WC_PATH_FOUND if @a local_abspath isn't actually a
+ * missing, deleted directory.
+ */
+svn_error_t *
+svn_wc__temp_mark_missing_not_present(const char *local_abspath,
+ svn_wc_context_t *wc_ctx,
+ apr_pool_t *scratch_pool);
+
#ifdef __cplusplus
}
#endif /* __cplusplus */
Modified: subversion/branches/svn-patch-improvements/subversion/include/svn_auth.h
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/include/svn_auth.h?rev=929279&r1=929278&r2=929279&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/include/svn_auth.h (original)
+++ subversion/branches/svn-patch-improvements/subversion/include/svn_auth.h Tue Mar 30 20:57:53 2010
@@ -533,7 +533,7 @@ typedef svn_error_t *(*svn_auth_plaintex
*/
void
svn_auth_open(svn_auth_baton_t **auth_baton,
- apr_array_header_t *providers,
+ const apr_array_header_t *providers,
apr_pool_t *pool);
/** Set an authentication run-time parameter.
Modified: subversion/branches/svn-patch-improvements/subversion/include/svn_client.h
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/include/svn_client.h?rev=929279&r1=929278&r2=929279&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/include/svn_client.h (original)
+++ subversion/branches/svn-patch-improvements/subversion/include/svn_client.h Tue Mar 30 20:57:53 2010
@@ -3018,7 +3018,7 @@ svn_client_mergeinfo_get_merged(apr_hash
* requested then return a #SVN_ERR_UNSUPPORTED_FEATURE error.
*
* @a discover_changed_paths and @a revprops are the same as for
- * svn_client_log4(). Use @a scratch_pool for all temporary allocations.
+ * svn_client_log5(). Use @a scratch_pool for all temporary allocations.
*
* @a ctx is a context used for authentication.
*
@@ -3028,8 +3028,8 @@ svn_client_mergeinfo_get_merged(apr_hash
* @since New in 1.7.
*/
svn_error_t *
-svn_client_mergeinfo_log(const char *path_or_url,
- svn_boolean_t finding_merged,
+svn_client_mergeinfo_log(svn_boolean_t finding_merged,
+ const char *path_or_url,
const svn_opt_revision_t *peg_revision,
const char *merge_source_path_or_url,
const svn_opt_revision_t *src_peg_revision,
@@ -3373,7 +3373,7 @@ typedef struct svn_client_copy_source_t
*/
svn_error_t *
svn_client_copy5(svn_commit_info_t **commit_info_p,
- apr_array_header_t *sources,
+ const apr_array_header_t *sources,
const char *dst_path,
svn_boolean_t copy_as_child,
svn_boolean_t make_parents,
@@ -3392,7 +3392,7 @@ svn_client_copy5(svn_commit_info_t **com
SVN_DEPRECATED
svn_error_t *
svn_client_copy4(svn_commit_info_t **commit_info_p,
- apr_array_header_t *sources,
+ const apr_array_header_t *sources,
const char *dst_path,
svn_boolean_t copy_as_child,
svn_boolean_t make_parents,
@@ -3541,7 +3541,7 @@ svn_client_copy(svn_client_commit_info_t
*/
svn_error_t *
svn_client_move5(svn_commit_info_t **commit_info_p,
- apr_array_header_t *src_paths,
+ const apr_array_header_t *src_paths,
const char *dst_path,
svn_boolean_t force,
svn_boolean_t move_as_child,
@@ -4836,6 +4836,12 @@ svn_client_info(const char *path_or_url,
* Apply a unidiff patch that's located at absolute path
* @a abs_patch_path to the working copy at @a local_abspath.
*
+ * This function makes a best-effort attempt at applying the patch.
+ * It might skip patch targets which cannot be patched (e.g. targets
+ * that are outside of the working copy). It will also reject hunks
+ * which cannot be applied to a target in case the hunk's context
+ * does not match anywhere in the patch target.
+ *
* If @a dry_run is TRUE, the patching process is carried out, and full
* notification feedback is provided, but the working copy is not modified.
*
@@ -4848,11 +4854,37 @@ svn_client_info(const char *path_or_url,
* This is useful when applying a unidiff which was created with the
* original and modified files swapped due to human error.
*
- * Excluding patch targets from the patching process is possible by
- * passing a @a filter_globs array containing elements of type const char *.
- * If @a filter_globs is not NULL, patch targets matching any glob pattern
- * in @a filter_globs will not be patched. The match is performed on the
- * target path as parsed from the patch file, after canonicalization.
+ * Excluding patch targets from the patching process is possible by passing
+ * @a include_patterns and/or @a exclude_patterns arrays containing
+ * elements of type const char *.
+ * If @a include_patterns is not NULL, patch targets not matching any glob
+ * pattern in @a include_patterns will not be patched.
+ * If @a exclude_patterns is not NULL, patch targets matching any glob pattern
+ * in @a exclude_patterns will not be patched
+ * The match is performed on the target path as parsed from the patch file,
+ * after canonicalization.
+ * If both @a include_patterns and @a exclude_patterns are specified,
+ * the @a include_patterns are applied first, i.e. the @a exclude_patterns
+ * are applied to all targets which matched one of the @a include_patterns.
+ *
+ * If @a patched_tempfiles is not NULL, return in @a *patched_tempfiles
+ * a mapping {target path -> path to temporary file containing patched result}
+ * for all patched targets which were neither skipped nor excluded via
+ * @ignore_patterns or @a exlude_patterns.
+ * Note that if all hunks were rejected, the patched result will look just
+ * like the target file, unmodified.
+ * If @a reject_tempfiles is not NULL, return in @a *reject_tempfiles
+ * a mapping {target path -> path to temporary file containing rejected hunks}
+ * Both @a *patched_tempfiles and @a *reject_tempfiles are allocated in
+ * @a result_pool, and the key (target path) used is the path as parsed
+ * from the patch, but in canonicalized form. The value (path to temporary
+ * file) is an absolute path, also in canonicalized form.
+ * The temporary files are closed, and it is the caller's responsibility
+ * to remove them when they are no longer needed.
+ * Using @a patched_tempfiles and @a reject_tempfiles in combination with
+ * @a dry_run = TRUE makes it possible to generate a preview of the result
+ * of the patching process, e.g. for display purposes, without actually
+ * modifying the working copy.
*
* If @a ctx->notify_func2 is non-NULL, invoke @a ctx->notify_func2 with
* @a ctx->notify_baton2 as patching progresses.
@@ -4860,6 +4892,8 @@ svn_client_info(const char *path_or_url,
* If @a ctx->cancel_func is non-NULL, invoke it passing @a
* ctx->cancel_baton at various places during the operation.
*
+ * Use @a scratch_pool for temporary allocations.
+ *
* @since New in 1.7.
*/
svn_error_t *
@@ -4868,9 +4902,13 @@ svn_client_patch(const char *abs_patch_p
svn_boolean_t dry_run,
int strip_count,
svn_boolean_t reverse,
- apr_array_header_t *filter_globs,
+ const apr_array_header_t *include_patterns,
+ const apr_array_header_t *exclude_patterns,
+ apr_hash_t **patched_tempfiles,
+ apr_hash_t **reject_tempfiles,
svn_client_ctx_t *ctx,
- apr_pool_t *pool);
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool);
/** @} */
Modified: subversion/branches/svn-patch-improvements/subversion/include/svn_delta.h
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/include/svn_delta.h?rev=929279&r1=929278&r2=929279&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/include/svn_delta.h (original)
+++ subversion/branches/svn-patch-improvements/subversion/include/svn_delta.h Tue Mar 30 20:57:53 2010
@@ -1138,7 +1138,7 @@ svn_error_t *
svn_delta_path_driver(const svn_delta_editor_t *editor,
void *edit_baton,
svn_revnum_t revision,
- apr_array_header_t *paths,
+ const apr_array_header_t *paths,
svn_delta_path_driver_cb_func_t callback_func,
void *callback_baton,
apr_pool_t *pool);
Modified: subversion/branches/svn-patch-improvements/subversion/include/svn_diff.h
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/include/svn_diff.h?rev=929279&r1=929278&r2=929279&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/include/svn_diff.h (original)
+++ subversion/branches/svn-patch-improvements/subversion/include/svn_diff.h Tue Mar 30 20:57:53 2010
@@ -765,6 +765,118 @@ svn_diff_mem_string_output_merge(svn_str
apr_pool_t *pool);
+
+
+/* Diff parsing. If you want to apply a patch to a working copy
+ * rather than parse it, see svn_client_patch(). */
+
+/**
+ * A single hunk inside a patch
+ *
+ * @since New in 1.7. */
+typedef struct svn_hunk_t {
+ /** The hunk's unidiff text as it appeared in the patch file,
+ * without range information. */
+ svn_stream_t *diff_text;
+
+ /**
+ * The original and modified texts in the hunk range.
+ * Derived from the diff text.
+ *
+ * For example, consider a hunk such as:
+ * @@ -1,5 +1,5 @@
+ * #include <stdio.h>
+ * int main(int argc, char *argv[])
+ * {
+ * - printf("Hello World!\n");
+ * + printf("I like Subversion!\n");
+ * }
+ *
+ * Then, the original text described by the hunk is:
+ * #include <stdio.h>
+ * int main(int argc, char *argv[])
+ * {
+ * printf("Hello World!\n");
+ * }
+ *
+ * And the modified text described by the hunk is:
+ * #include <stdio.h>
+ * int main(int argc, char *argv[])
+ * {
+ * printf("I like Subversion!\n");
+ * }
+ *
+ * Because these streams make use of line filtering and transformation,
+ * they should only be read line-by-line with svn_stream_readline().
+ * Reading them with svn_stream_read() will not yield the expected result,
+ * because it will return the unidiff text from the patch file unmodified.
+ * The streams support resetting.
+ */
+ svn_stream_t *original_text;
+ svn_stream_t *modified_text;
+
+ /**
+ * Hunk ranges as they appeared in the patch file.
+ * All numbers are lines, not bytes. */
+ svn_linenum_t original_start;
+ svn_linenum_t original_length;
+ svn_linenum_t modified_start;
+ svn_linenum_t modified_length;
+
+ /** Number of lines starting with ' ' before first '+' or '-'. */
+ svn_linenum_t leading_context;
+
+ /** Number of lines starting with ' ' after last '+' or '-'. */
+ svn_linenum_t trailing_context;
+} svn_hunk_t;
+
+/**
+ * Data type to manage parsing of patches.
+ *
+ * @since New in 1.7. */
+typedef struct svn_patch_t {
+ /** Path to the patch file. */
+ const char *path;
+
+ /** The patch file itself. */
+ apr_file_t *patch_file;
+
+ /**
+ * The old and new file names as retrieved from the patch file.
+ * These paths are UTF-8 encoded and canonicalized, but otherwise
+ * left unchanged from how they appeared in the patch file. */
+ const char *old_filename;
+ const char *new_filename;
+
+ /**
+ * An array containing an svn_hunk_t object for each hunk parsed
+ * from the patch. */
+ apr_array_header_t *hunks;
+} svn_patch_t;
+
+/**
+ * Return the next @a *patch in @a patch_file.
+ * If no patch can be found, set @a *patch to NULL.
+ * If @a reverse is TRUE, invert the patch while parsing it.
+ * Allocate results in @a result_pool.
+ * Use @a scratch_pool for all other allocations.
+ *
+ * @since New in 1.7. */
+svn_error_t *
+svn_diff_parse_next_patch(svn_patch_t **patch,
+ apr_file_t *patch_file,
+ svn_boolean_t reverse,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool);
+
+/**
+ * Dispose of @a patch, closing any streams used by it.
+ *
+ * @since New in 1.7.
+ */
+svn_error_t *
+svn_diff_close_patch(const svn_patch_t *patch);
+
#ifdef __cplusplus
}
#endif /* __cplusplus */
Modified: subversion/branches/svn-patch-improvements/subversion/include/svn_dirent_uri.h
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/include/svn_dirent_uri.h?rev=929279&r1=929278&r2=929279&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/include/svn_dirent_uri.h (original)
+++ subversion/branches/svn-patch-improvements/subversion/include/svn_dirent_uri.h Tue Mar 30 20:57:53 2010
@@ -587,6 +587,9 @@ svn_uri_is_child(const char *uri1,
* This function is similar as svn_uri_is_child(), except that it supports
* Windows dirents and UNC paths on Windows.
*
+ * ### @todo Makes no attempt to handle one absolute and one relative
+ * dirent, and will simply return NULL.
+ *
* @since New in 1.6.
*/
const char *
Modified: subversion/branches/svn-patch-improvements/subversion/include/svn_fs.h
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/include/svn_fs.h?rev=929279&r1=929278&r2=929279&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/include/svn_fs.h (original)
+++ subversion/branches/svn-patch-improvements/subversion/include/svn_fs.h Tue Mar 30 20:57:53 2010
@@ -934,7 +934,7 @@ svn_fs_change_txn_prop(svn_fs_txn_t *txn
*/
svn_error_t *
svn_fs_change_txn_props(svn_fs_txn_t *txn,
- apr_array_header_t *props,
+ const apr_array_header_t *props,
apr_pool_t *pool);
/** @} */
Modified: subversion/branches/svn-patch-improvements/subversion/include/svn_io.h
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/include/svn_io.h?rev=929279&r1=929278&r2=929279&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/include/svn_io.h (original)
+++ subversion/branches/svn-patch-improvements/subversion/include/svn_io.h Tue Mar 30 20:57:53 2010
@@ -702,7 +702,7 @@ typedef svn_error_t *(*svn_close_fn_t)(v
*/
typedef svn_error_t *(*svn_io_reset_fn_t)(void *baton);
-/* An opaque type which represents a mark on a stream.
+/** An opaque type which represents a mark on a stream.
*
* @see svn_stream_mark().
* @since New in 1.7.
@@ -794,7 +794,7 @@ void
svn_stream_set_reset(svn_stream_t *stream,
svn_io_reset_fn_t reset_fn);
-/** Set @a stream's mark function to @a mark_fn
+/** Set @a stream's mark function to @a mark_fn
*
* @since New in 1.7.
*/
@@ -802,7 +802,7 @@ void
svn_stream_set_mark(svn_stream_t *stream,
svn_io_mark_fn_t mark_fn);
-/** Set @a stream's seek function to @a seek_fn
+/** Set @a stream's seek function to @a seek_fn
*
* @since New in 1.7.
*/
@@ -1091,7 +1091,7 @@ svn_stream_mark(svn_stream_t *stream,
svn_stream_mark_t **mark,
apr_pool_t *pool);
-/* Seek to a @a mark in a generic @a stream.
+/** Seek to a @a mark in a generic @a stream.
* This function returns the #SVN_ERR_STREAM_SEEK_NOT_SUPPORTED error
* if the stream doesn't implement seeking.
*
@@ -1904,7 +1904,7 @@ svn_io_write_version_file(const char *pa
* @since New in 1.7. */
svn_error_t *
svn_io_file_mktemp(apr_file_t **new_file,
- char *templ,
+ const char *templ,
apr_int32_t flags,
apr_pool_t *pool);
Modified: subversion/branches/svn-patch-improvements/subversion/include/svn_mergeinfo.h
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/include/svn_mergeinfo.h?rev=929279&r1=929278&r2=929279&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/include/svn_mergeinfo.h (original)
+++ subversion/branches/svn-patch-improvements/subversion/include/svn_mergeinfo.h Tue Mar 30 20:57:53 2010
@@ -250,7 +250,7 @@ svn_mergeinfo_remove2(svn_mergeinfo_t *m
*/
svn_error_t *
svn_rangelist_diff(apr_array_header_t **deleted, apr_array_header_t **added,
- apr_array_header_t *from, apr_array_header_t *to,
+ const apr_array_header_t *from, const apr_array_header_t *to,
svn_boolean_t consider_inheritance,
apr_pool_t *pool);
@@ -271,7 +271,7 @@ svn_rangelist_diff(apr_array_header_t **
*/
svn_error_t *
svn_rangelist_merge(apr_array_header_t **rangelist,
- apr_array_header_t *changes,
+ const apr_array_header_t *changes,
apr_pool_t *pool);
/** Removes @a eraser (the subtrahend) from @a whiteboard (the
@@ -288,8 +288,8 @@ svn_rangelist_merge(apr_array_header_t *
* @since New in 1.5.
*/
svn_error_t *
-svn_rangelist_remove(apr_array_header_t **output, apr_array_header_t *eraser,
- apr_array_header_t *whiteboard,
+svn_rangelist_remove(apr_array_header_t **output, const apr_array_header_t *eraser,
+ const apr_array_header_t *whiteboard,
svn_boolean_t consider_inheritance,
apr_pool_t *pool);
@@ -311,8 +311,7 @@ svn_mergeinfo_intersect(svn_mergeinfo_t
*
* @a consider_inheritance determines how to account for the inheritability
* of the two mergeinfo's ranges when calculating the range equivalence,
- * as described for svn_mergeinfo_diff(). If @a consider_inheritance is
- * FALSE then @a *mergeinfo's ranges are always inheritable.
+ * @see svn_rangelist_intersect().
*
* @since New in 1.7.
*/
@@ -331,7 +330,11 @@ svn_mergeinfo_intersect2(svn_mergeinfo_t
* @a consider_inheritance determines how to account for the inheritability
* of the two rangelist's ranges when calculating the intersection,
* @see svn_mergeinfo_diff(). If @a consider_inheritance is FALSE then
- * the ranges in @a *rangelist are always inheritable.
+ * ranges with different inheritance can intersect, but the the resulting
+ * @a *rangelist is non-inheritable only if the corresponding ranges from
+ * both @a rangelist1 and @a rangelist2 are non-inheritable.
+ * If @a consider_inheritance is TRUE, then ranges with different
+ * inheritance can never intersect.
*
* Note: @a rangelist1 and @a rangelist2 must be sorted as said by @c
* svn_sort_compare_ranges(). @a *rangelist is guaranteed to be in sorted
@@ -340,8 +343,8 @@ svn_mergeinfo_intersect2(svn_mergeinfo_t
*/
svn_error_t *
svn_rangelist_intersect(apr_array_header_t **rangelist,
- apr_array_header_t *rangelist1,
- apr_array_header_t *rangelist2,
+ const apr_array_header_t *rangelist1,
+ const apr_array_header_t *rangelist2,
svn_boolean_t consider_inheritance,
apr_pool_t *pool);
@@ -382,7 +385,7 @@ svn_rangelist_to_string(svn_string_t **o
*/
svn_error_t *
svn_rangelist_inheritable2(apr_array_header_t **inheritable_rangelist,
- apr_array_header_t *rangelist,
+ const apr_array_header_t *rangelist,
svn_revnum_t start,
svn_revnum_t end,
svn_boolean_t inheritable,
@@ -395,7 +398,7 @@ svn_rangelist_inheritable2(apr_array_hea
*/
svn_error_t *
svn_rangelist_inheritable(apr_array_header_t **inheritable_rangelist,
- apr_array_header_t *rangelist,
+ const apr_array_header_t *rangelist,
svn_revnum_t start,
svn_revnum_t end,
apr_pool_t *pool);
@@ -481,7 +484,7 @@ svn_mergeinfo_dup(svn_mergeinfo_t mergei
* @since New in 1.5.
*/
apr_array_header_t *
-svn_rangelist_dup(apr_array_header_t *rangelist, apr_pool_t *pool);
+svn_rangelist_dup(const apr_array_header_t *rangelist, apr_pool_t *pool);
/**
Modified: subversion/branches/svn-patch-improvements/subversion/include/svn_opt.h
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/include/svn_opt.h?rev=929279&r1=929278&r2=929279&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/include/svn_opt.h (original)
+++ subversion/branches/svn-patch-improvements/subversion/include/svn_opt.h Tue Mar 30 20:57:53 2010
@@ -517,7 +517,7 @@ SVN_DEPRECATED
svn_error_t *
svn_opt_args_to_target_array3(apr_array_header_t **targets_p,
apr_getopt_t *os,
- apr_array_header_t *known_targets,
+ const apr_array_header_t *known_targets,
apr_pool_t *pool);
/**
@@ -533,7 +533,7 @@ SVN_DEPRECATED
svn_error_t *
svn_opt_args_to_target_array2(apr_array_header_t **targets_p,
apr_getopt_t *os,
- apr_array_header_t *known_targets,
+ const apr_array_header_t *known_targets,
apr_pool_t *pool);
@@ -555,7 +555,7 @@ SVN_DEPRECATED
svn_error_t *
svn_opt_args_to_target_array(apr_array_header_t **targets_p,
apr_getopt_t *os,
- apr_array_header_t *known_targets,
+ const apr_array_header_t *known_targets,
svn_opt_revision_t *start_revision,
svn_opt_revision_t *end_revision,
svn_boolean_t extract_revisions,
@@ -764,7 +764,7 @@ svn_opt_print_help(apr_getopt_t *os,
* @since New in 1.7. */
svn_error_t *
svn_opt_eat_peg_revisions(apr_array_header_t **true_targets_p,
- apr_array_header_t *targets,
+ const apr_array_header_t *targets,
apr_pool_t *pool);
#ifdef __cplusplus
Modified: subversion/branches/svn-patch-improvements/subversion/include/svn_ra.h
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/include/svn_ra.h?rev=929279&r1=929278&r2=929279&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/include/svn_ra.h (original)
+++ subversion/branches/svn-patch-improvements/subversion/include/svn_ra.h Tue Mar 30 20:57:53 2010
@@ -1513,7 +1513,7 @@ svn_ra_get_locations(svn_ra_session_t *s
apr_hash_t **locations,
const char *path,
svn_revnum_t peg_revision,
- apr_array_header_t *location_revisions,
+ const apr_array_header_t *location_revisions,
apr_pool_t *pool);
Modified: subversion/branches/svn-patch-improvements/subversion/include/svn_ra_svn.h
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/include/svn_ra_svn.h?rev=929279&r1=929278&r2=929279&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/include/svn_ra_svn.h (original)
+++ subversion/branches/svn-patch-improvements/subversion/include/svn_ra_svn.h Tue Mar 30 20:57:53 2010
@@ -175,7 +175,7 @@ svn_ra_svn_create_conn(apr_socket_t *soc
*/
svn_error_t *
svn_ra_svn_set_capabilities(svn_ra_svn_conn_t *conn,
- apr_array_header_t *list);
+ const apr_array_header_t *list);
/** Return @c TRUE if @a conn has the capability @a capability, or
* @c FALSE if it does not. */
@@ -347,7 +347,7 @@ svn_ra_svn_skip_leading_garbage(svn_ra_s
* tuple specification; use 'B' instead.
*/
svn_error_t *
-svn_ra_svn_parse_tuple(apr_array_header_t *list,
+svn_ra_svn_parse_tuple(const apr_array_header_t *list,
apr_pool_t *pool,
const char *fmt, ...);
@@ -365,7 +365,7 @@ svn_ra_svn_read_tuple(svn_ra_svn_conn_t
* @since New in 1.5.
*/
svn_error_t *
-svn_ra_svn_parse_proplist(apr_array_header_t *list,
+svn_ra_svn_parse_proplist(const apr_array_header_t *list,
apr_pool_t *pool,
apr_hash_t **props);
Modified: subversion/branches/svn-patch-improvements/subversion/include/svn_repos.h
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/include/svn_repos.h?rev=929279&r1=929278&r2=929279&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/include/svn_repos.h (original)
+++ subversion/branches/svn-patch-improvements/subversion/include/svn_repos.h Tue Mar 30 20:57:53 2010
@@ -1311,7 +1311,7 @@ svn_repos_trace_node_locations(svn_fs_t
apr_hash_t **locations,
const char *fs_path,
svn_revnum_t peg_revision,
- apr_array_header_t *location_revisions,
+ const apr_array_header_t *location_revisions,
svn_repos_authz_func_t authz_read_func,
void *authz_read_baton,
apr_pool_t *pool);
@@ -1943,7 +1943,7 @@ svn_repos_fs_change_txn_prop(svn_fs_txn_
*/
svn_error_t *
svn_repos_fs_change_txn_props(svn_fs_txn_t *txn,
- apr_array_header_t *props,
+ const apr_array_header_t *props,
apr_pool_t *pool);
/** @} */
@@ -2656,7 +2656,7 @@ svn_repos_check_revision_access(svn_repo
*/
svn_error_t *
svn_repos_remember_client_capabilities(svn_repos_t *repos,
- apr_array_header_t *capabilities);
+ const apr_array_header_t *capabilities);
Modified: subversion/branches/svn-patch-improvements/subversion/include/svn_sorts.h
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/include/svn_sorts.h?rev=929279&r1=929278&r2=929279&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/include/svn_sorts.h (original)
+++ subversion/branches/svn-patch-improvements/subversion/include/svn_sorts.h Tue Mar 30 20:57:53 2010
@@ -170,7 +170,7 @@ svn_sort__hash(apr_hash_t *ht,
COMPARE_FUNC is defined as for the C stdlib function bsearch(). */
int
svn_sort__bsearch_lower_bound(const void *key,
- apr_array_header_t *array,
+ const apr_array_header_t *array,
int (*compare_func)(const void *, const void *));
/* Insert a shallow copy of *NEW_ELEMENT into the array ARRAY at the index
Modified: subversion/branches/svn-patch-improvements/subversion/include/svn_string.h
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/include/svn_string.h?rev=929279&r1=929278&r2=929279&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/include/svn_string.h (original)
+++ subversion/branches/svn-patch-improvements/subversion/include/svn_string.h Tue Mar 30 20:57:53 2010
@@ -351,7 +351,7 @@ svn_cstring_split_append(apr_array_heade
* of zero or more glob patterns.
*/
svn_boolean_t
-svn_cstring_match_glob_list(const char *str, apr_array_header_t *list);
+svn_cstring_match_glob_list(const char *str, const apr_array_header_t *list);
/**
* Return the number of line breaks in @a msg, allowing any kind of newline
Modified: subversion/branches/svn-patch-improvements/subversion/include/svn_types.h
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/include/svn_types.h?rev=929279&r1=929278&r2=929279&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/include/svn_types.h (original)
+++ subversion/branches/svn-patch-improvements/subversion/include/svn_types.h Tue Mar 30 20:57:53 2010
@@ -114,20 +114,22 @@ typedef struct svn_error_t
/** @defgroup apr_hash_utilities APR Hash Table Helpers
* These functions enable the caller to dereference an APR hash table index
* without type casts or temporary variables.
+ *
+ * ### These are private, and may go away when APR implements them natively.
* @{
*/
/** Return the key of the hash table entry indexed by @a hi. */
const void *
-svn_apr_hash_index_key(const apr_hash_index_t *hi);
+svn__apr_hash_index_key(const apr_hash_index_t *hi);
/** Return the key length of the hash table entry indexed by @a hi. */
apr_ssize_t
-svn_apr_hash_index_klen(const apr_hash_index_t *hi);
+svn__apr_hash_index_klen(const apr_hash_index_t *hi);
/** Return the value of the hash table entry indexed by @a hi. */
void *
-svn_apr_hash_index_val(const apr_hash_index_t *hi);
+svn__apr_hash_index_val(const apr_hash_index_t *hi);
/** @} */
Modified: subversion/branches/svn-patch-improvements/subversion/include/svn_wc.h
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/include/svn_wc.h?rev=929279&r1=929278&r2=929279&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/include/svn_wc.h (original)
+++ subversion/branches/svn-patch-improvements/subversion/include/svn_wc.h Tue Mar 30 20:57:53 2010
@@ -626,6 +626,9 @@ svn_wc_set_adm_dir(const char *name,
/** Callback for external definitions updates
*
+ * ### See implementation of #svn_wc_traversal_info_t for documentation of
+ * the parameters.
+ *
* @since New in 1.7. */
typedef svn_error_t *(*svn_wc_external_update_t)(void *baton,
const char *local_abspath,
@@ -1046,7 +1049,7 @@ typedef enum svn_wc_notify_action_t
* @since New in 1.7. */
svn_wc_notify_update_update_deleted,
- /* The mergeinfo on path was updated. @since New in 1.7. */
+ /** The mergeinfo on path was updated. @since New in 1.7. */
svn_wc_notify_merge_record_info,
/** An working copy directory was upgraded to the latest format
@@ -1248,7 +1251,7 @@ typedef struct svn_wc_notify_t {
* @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;
@@ -3180,7 +3183,7 @@ svn_wc_get_ancestry2(const char **url,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
-/* Similar to svn_wc_get_ancestry2(), but using an adm_access baton / relative
+/** Similar to svn_wc_get_ancestry2(), but using an adm_access baton / relative
* path parameter pair.
*
* @deprecated Provided for backward compatibility with the 1.6 API.
@@ -3309,10 +3312,17 @@ svn_wc_walk_entries(const char *path,
apr_pool_t *pool);
-/** Mark missing @a path as 'deleted' in its @a parent's list of entries.
+/** Mark missing @a path as 'deleted' in its @a parent's list of
+ * entries. @ path should be a directory that is both deleted (via
+ * svn_wc_delete4) and removed (via a system call). This function
+ * should only be called during post-commit processing following a
+ * successful commit editor drive.
*
* Return #SVN_ERR_WC_PATH_FOUND if @a path isn't actually missing.
+ *
+ * @deprecated Provided for backward compatibility with the 1.6 API.
*/
+SVN_DEPRECATED
svn_error_t *
svn_wc_mark_missing_deleted(const char *path,
svn_wc_adm_access_t *parent,
@@ -3842,6 +3852,7 @@ typedef void (*svn_wc_status_func_t)(voi
*
* If @a external_func is non-NULL, call it with @a external_baton if an
* external definition is found while walking @a local_abspath.
+ * ### call it with what other parameters?
*
* This function uses @a scratch_pool for temporary allocations.
*
@@ -3916,6 +3927,9 @@ svn_wc_walk_status(svn_wc_context_t *wc_
* state in it. (Caller should obtain @a traversal_info from
* svn_wc_init_traversal_info().)
*
+ * ### Since r879231 it's not traversal_info, it's external_func/
+ * external_baton which is ...?
+ *
* Allocate the editor itself in @a pool, but the editor does temporary
* allocations in a subpool of @a pool.
*
@@ -3935,7 +3949,7 @@ svn_wc_get_status_editor5(const svn_delt
const apr_array_header_t *ignore_patterns,
svn_wc_status_func4_t status_func,
void *status_baton,
- svn_wc_external_update_t external_update,
+ svn_wc_external_update_t external_func,
void *external_baton,
svn_cancel_func_t cancel_func,
void *cancel_baton,
@@ -3988,7 +4002,7 @@ svn_wc_get_status_editor3(const svn_delt
svn_depth_t depth,
svn_boolean_t get_all,
svn_boolean_t no_ignore,
- apr_array_header_t *ignore_patterns,
+ const apr_array_header_t *ignore_patterns,
svn_wc_status_func2_t status_func,
void *status_baton,
svn_cancel_func_t cancel_func,
@@ -4112,7 +4126,7 @@ svn_wc_copy3(svn_wc_context_t *wc_ctx,
void *notify_baton,
apr_pool_t *scratch_pool);
-/* Similar to svn_wc_copy3(), but takes access batons and a relative path
+/** Similar to svn_wc_copy3(), but takes access batons and a relative path
* and a basename instead of absolute paths and a working copy context.
*
* @since New in 1.2.
@@ -4376,13 +4390,13 @@ svn_wc_add(const char *path,
/** Add a file to a working copy at @a local_abspath, obtaining the
*text-base's contents from @a new_base_contents, the wc file's
- * content from @a new_contents, its base properties from @a
- * new_base_props and wc properties from @a new_props. Use @a wc_ctx
- * for accessing the working copy.
- *
- * The base text and props normally come from the repository file
- * represented by the copyfrom args, see below. The new file will
- * be scheduled for addition with history.
+ * content from @a new_contents, its unmodified properties from @a
+ * new_base_props and its actual properties from @a new_props. Use
+ * @a wc_ctx for accessing the working copy.
+ *
+ * The unmodified text and props normally come from the repository
+ * file represented by the copyfrom args, see below. The new file
+ * will be marked as copy.
*
* @a new_contents and @a new_props may be NULL, in which case
* the working copy text and props are taken from the base files with
@@ -4391,8 +4405,7 @@ svn_wc_add(const char *path,
* @a new_contents must be provided in Normal Form. This is required
* in order to pass both special and non-special files through a stream.
*
- * @a adm_access, or an access baton in its associated set, must
- * contain a write lock for the parent of @a dst_path.
+ * @a wc_ctx must contain a write lock for the parent of @a dst_path.
*
* If @a copyfrom_url is non-NULL, then @a copyfrom_rev must be a
* valid revision number, and together they are the copyfrom history
@@ -4400,8 +4413,8 @@ svn_wc_add(const char *path,
*
* The @a cancel_func and @a cancel_baton are a standard cancellation
* callback, or NULL if no callback is needed. @a notify_func and
- * @a notify_baton are a notification callback, and will be notified
- * of the addition of this file.
+ * @a notify_baton are a notification callback, and (if not NULL)
+ * will be notified of the addition of this file.
*
* Use @a scratch_pool for temporary allocations.
*
@@ -4436,7 +4449,7 @@ svn_wc_add_repos_file4(svn_wc_context_t
void *notify_baton,
apr_pool_t *scratch_pool);
-/* Similar to svn_wc_add_repos_file4, but uses access batons and a
+/** Similar to svn_wc_add_repos_file4, but uses access batons and a
* relative path instead of a working copy context and absolute path.
*
* @since New in 1.6.
@@ -4730,18 +4743,21 @@ svn_wc_committed_queue_create(apr_pool_t
/**
* Queue committed items to be processed later by
- * svn_wc_process_committed_queue().
+ * svn_wc_process_committed_queue2().
*
- * All pointer data passed to this function (@a path, @a adm_access,
- * @a wcprop_changes and @a checksum) should remain valid until the queue
- * has been processed by svn_wc_process_committed_queue().
+ * All pointer data passed to this function (@a local_abspath,
+ * @a wcprop_changes * and @a checksum) should remain valid until the
+ * queue has been processed by svn_wc_process_committed_queue2().
*
- * Record in @a queue that @a path will need to be bumped after a commit
- * succeeds. @a adm_access must hold a write lock appropriate for @a path.
+ * Record in @a queue that @a local_abspath will need to be bumped
+ * after a commit succeeds.
*
* If non-NULL, @a wcprop_changes is an array of <tt>svn_prop_t *</tt>
* changes to wc properties; if an #svn_prop_t->value is NULL, then
* that property is deleted.
+ * ### [JAF] No, a prop whose value is NULL is ignored, not deleted. This
+ * ### seems to be not a set of changes but rather the new complete set of
+ * ### props. And it's renamed to 'new_dav_cache' inside; why?
*
* If @a remove_lock is @c TRUE, any entryprops related to a repository
* lock will be removed.
@@ -4749,11 +4765,13 @@ svn_wc_committed_queue_create(apr_pool_t
* If @a remove_changelist is @c TRUE, any association with a
* changelist will be removed.
*
- * If @a path is a file and @a checksum is non-NULL, use @a checksum as
- * the checksum for the new text base. Otherwise, calculate the checksum
+ * If @a local_abspath is a file and @a checksum is non-NULL, use @a checksum
+ * as the checksum for the new text base. Otherwise, calculate the checksum
* if needed.
+ * ### [JAF] No, it doesn't calculate the checksum, it stores null in wc.db:
+ * ### see svn_wc__process_committed_internal().
*
- * If @a recurse is TRUE and @a path is a directory, then bump every
+ * If @a recurse is TRUE and @a local_abspath is a directory, then bump every
* versioned object at or under @a path. This is usually done for
* copied trees.
*
@@ -4764,8 +4782,26 @@ svn_wc_committed_queue_create(apr_pool_t
* it will bump ALL nodes under the directory, regardless of their
* actual inclusion in the new revision.
*
+ * @since New in 1.7.
+ */
+svn_error_t *
+svn_wc_queue_committed3(svn_wc_committed_queue_t *queue,
+ const char *local_abspath,
+ svn_boolean_t recurse,
+ const apr_array_header_t *wcprop_changes,
+ svn_boolean_t remove_lock,
+ svn_boolean_t remove_changelist,
+ const svn_checksum_t *checksum,
+ apr_pool_t *scratch_pool);
+
+/** Same as svn_wc_queue_committed3() except @a path doesn't have to be an
+ * abspath and @a adm_access is unused.
+ *
* @since New in 1.6.
+ *
+ * @deprecated Provided for backwards compatibility with the 1.6 API.
*/
+SVN_DEPRECATED
svn_error_t *
svn_wc_queue_committed2(svn_wc_committed_queue_t *queue,
const char *path,
@@ -4806,11 +4842,23 @@ svn_wc_queue_committed(svn_wc_committed_
* @a rev_date and @a rev_author are the (server-side) date and author
* of the new revision; one or both may be @c NULL.
*
- * @a adm_access must be associated with all affected directories, and
- * must hold a write lock in each one.
+ * @since New in 1.7.
+ */
+svn_error_t *
+svn_wc_process_committed_queue2(svn_wc_committed_queue_t *queue,
+ svn_wc_context_t *wc_ctx,
+ svn_revnum_t new_revnum,
+ const char *rev_date,
+ const char *rev_author,
+ apr_pool_t *scratch_pool);
+
+/** @see svn_wc_process_committed_queue2()
*
* @since New in 1.5.
+ *
+ * @deprecated Provided for backwards compatibility with the 1.5 API.
*/
+SVN_DEPRECATED
svn_error_t *
svn_wc_process_committed_queue(svn_wc_committed_queue_t *queue,
svn_wc_adm_access_t *adm_access,
@@ -4960,6 +5008,9 @@ svn_wc_process_committed(const char *pat
* state in it. (Caller should obtain @a traversal_info from
* svn_wc_init_traversal_info().)
*
+ * ### Since r879231 it's not traversal_info, it's external_func/
+ * external_baton which is ...?
+ *
* @since New in 1.7.
*/
svn_error_t *
@@ -5222,14 +5273,14 @@ svn_wc_get_update_editor4(const svn_delt
void **edit_baton,
svn_revnum_t *target_revision,
svn_wc_context_t *wc_ctx,
- const char *local_abspath,
+ const char *anchor_abspath,
const char *target_basename,
svn_boolean_t use_commit_times,
svn_depth_t depth,
svn_boolean_t depth_is_sticky,
svn_boolean_t allow_unver_obstructions,
const char *diff3_cmd,
- apr_array_header_t *preserved_exts,
+ const apr_array_header_t *preserved_exts,
svn_wc_get_file_t fetch_func,
void *fetch_baton,
svn_wc_conflict_resolver_func_t conflict_func,
@@ -5274,7 +5325,7 @@ svn_wc_get_update_editor3(svn_revnum_t *
svn_wc_get_file_t fetch_func,
void *fetch_baton,
const char *diff3_cmd,
- apr_array_header_t *preserved_exts,
+ const apr_array_header_t *preserved_exts,
const svn_delta_editor_t **editor,
void **edit_baton,
svn_wc_traversal_info_t *ti,
@@ -5332,65 +5383,14 @@ svn_wc_get_update_editor(svn_revnum_t *t
apr_pool_t *pool);
/**
- * A variant of svn_wc_get_update_editor().
+ * A variant of svn_wc_get_update_editor4().
*
* Set @a *editor and @a *edit_baton to an editor and baton for "switching"
* a working copy to a new @a switch_url. (Right now, this URL must be
* within the same repository that the working copy already comes
* from.) @a switch_url must not be @c NULL.
*
- * @a anchor_abspath is a local working copy directory, with a fully recursive
- * write lock in @a wc_ctx, which will be used as the root of our editor.
- *
- * @a target_basename is the entry in @a anchor_abspath that will actually be
- * updated, or the empty string if all of @a anchor_abspath should be updated.
- *
- * @a target is the entry in @a anchor that will actually be updated, or
- * empty if all of @a anchor should be updated.
- *
- * The editor invokes @a notify_func with @a notify_baton as the switch
- * progresses, if @a notify_func is non-NULL.
- *
- * If @a cancel_func is non-NULL, it will be called with @a cancel_baton as
- * the switch progresses to determine if it should continue.
- *
- * If @a conflict_func is non-NULL, then invoke it with @a
- * conflict_baton whenever a conflict is encountered, giving the
- * callback a chance to resolve the conflict before the editor takes
- * more drastic measures (such as marking a file conflicted, or
- * bailing out of the switch).
- *
- * If @a external_func is non-NULL, then invoke it with @a external_baton
- * whenever external changes are encountered, giving the callback a chance
- * to store the external information for processing.
- *
- * If @a fetch_func is non-NULL, then use it (with @a fetch_baton) as
- * a fallback for retrieving repository files whenever 'copyfrom' args
- * are sent into editor->add_file().
- *
- * If @a diff3_cmd is non-NULL, then use it as the diff3 command for
- * any merging; otherwise, use the built-in merge code.
- *
- * @a preserved_exts is an array of filename patterns which, when
- * matched against the extensions of versioned files, determine for
- * which such files any related generated conflict files will preserve
- * the original file's extension as their own. If a file's extension
- * does not match any of the patterns in @a preserved_exts (which is
- * certainly the case if @a preserved_exts is @c NULL or empty),
- * generated conflict files will carry Subversion's custom extensions.
- *
- * @a target_revision is a pointer to a revision location which, after
- * successful completion of the drive of this editor, will be
- * populated with the revision to which the working copy was updated.
- *
- * If @a use_commit_times is TRUE, then all edited/added files will
- * have their working timestamp set to the last-committed-time. If
- * FALSE, the working files will be touched with the 'now' time.
- *
- * @a depth and @a depth_is_sticky behave as for svn_wc_get_update_editor3().
- *
- * If @a allow_unver_obstructions is TRUE, then allow unversioned
- * obstructions when adding a path.
+ * All other parameters behave as for svn_wc_get_update_editor4().
*
* @since New in 1.7.
*/
@@ -5407,7 +5407,7 @@ svn_wc_get_switch_editor4(const svn_delt
svn_boolean_t depth_is_sticky,
svn_boolean_t allow_unver_obstructions,
const char *diff3_cmd,
- apr_array_header_t *preserved_exts,
+ const apr_array_header_t *preserved_exts,
svn_wc_get_file_t fetch_func,
void *fetch_baton,
svn_wc_conflict_resolver_func_t conflict_func,
@@ -5452,7 +5452,7 @@ svn_wc_get_switch_editor3(svn_revnum_t *
svn_wc_conflict_resolver_func_t conflict_func,
void *conflict_baton,
const char *diff3_cmd,
- apr_array_header_t *preserved_exts,
+ const apr_array_header_t *preserved_exts,
const svn_delta_editor_t **editor,
void **edit_baton,
svn_wc_traversal_info_t *ti,
@@ -6081,8 +6081,7 @@ svn_wc_diff(svn_wc_adm_access_t *anchor,
* If @a original_props is non-@c NULL, then set @a *original_props to
* hashtable (<tt>const char *name</tt> -> <tt>const svn_string_t *value</tt>)
* that represents the 'pristine' property list of @a path. This hashtable is
- * allocated in @a result_pool, and can be used to compare old and new values
- * of properties.
+ * allocated in @a result_pool.
*
* Use @a scratch_pool for temporary allocations.
*/
@@ -6391,10 +6390,24 @@ svn_wc_merge_prop_diffs(svn_wc_notify_st
apr_pool_t *pool);
-/** Given a @a path to a wc file, return a stream to the @a contents of
- * the pristine copy of the file. Use @a wc_ctx to access the working
- * copy.This is needed so clients can do diffs. If the WC has no
- * text-base, return a @c NULL instead of a stream.
+/** Given a @a path to a wc file, return in @a *contents a readonly stream to
+ * the pristine contents of the file that would serve as base content for the
+ * next commit. That means:
+ *
+ * When there is no change in node history scheduled, i.e. when there are only
+ * local text-mods, prop-mods or a delete, return the last checked-out or
+ * updated-/switched-to contents of the file.
+ *
+ * If the file is simply added or replaced (no copy-/move-here involved),
+ * set @a *contents to @c NULL.
+ *
+ * When the file has been locally copied-/moved-here, return the contents of
+ * the copy/move source (even if the copy-/move-here replaces a locally
+ * deleted file).
+ *
+ * If @a local_abspath refers to an unversioned or non-existing path, return
+ * @c SVN_ERR_WC_PATH_NOT_FOUND. Use @a wc_ctx to access the working copy.
+ * @a contents may not be @c NULL (unlike @a *contents).
*
* @since New in 1.7. */
svn_error_t *
@@ -6910,15 +6923,17 @@ 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.
*
- * This process creates a copy of @a local_abspath with keywords and eol
- * untranslated. If @a tempfile is non-NULL, set @a *tempfile to the
- * absolute path to this copy, allocated in @a result_pool. Do not clean
- * up the copy; caller can do that. If @a digest is non-NULL, put the MD5
- * checksum of the temporary file into @a digest, which must point to @c
- * APR_MD5_DIGESTSIZE bytes of storage. (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 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 digest is non-NULL, put the MD5 checksum of (@a local_abspath
+ * translated to repository-normal form) into @a digest, which must point to
+ * @c APR_MD5_DIGESTSIZE bytes of storage.
*
* If @a fulltext, send the untranslated copy of @a local_abspath through
* @a editor as full-text; else send it as svndiff against the current text
@@ -7058,7 +7073,7 @@ svn_wc_get_ignores(apr_array_header_t **
*/
svn_boolean_t
svn_wc_match_ignore_list(const char *str,
- apr_array_header_t *list,
+ const apr_array_header_t *list,
apr_pool_t *pool);
@@ -7141,7 +7156,8 @@ typedef struct svn_wc_revision_status_t
/** Set @a *result_p to point to a new #svn_wc_revision_status_t structure
* containing a summary of the revision range and status of the working copy
* at @a local_abspath (not including "externals"). @a local_abspath must
- * be absolute.
+ * be absolute. Return SVN_ERR_WC_PATH_NOT_FOUND if @a local_abspath is not
+ * a working copy path.
*
* Set @a (*result_p)->min_rev and @a (*result_p)->max_rev respectively to the
* lowest and highest revision numbers in the working copy. If @a committed
Modified: subversion/branches/svn-patch-improvements/subversion/libsvn_client/add.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/libsvn_client/add.c?rev=929279&r1=929278&r2=929279&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/libsvn_client/add.c (original)
+++ subversion/branches/svn-patch-improvements/subversion/libsvn_client/add.c Tue Mar 30 20:57:53 2010
@@ -312,8 +312,8 @@ add_file(const char *local_abspath,
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);
+ 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
Modified: subversion/branches/svn-patch-improvements/subversion/libsvn_client/blame.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/libsvn_client/blame.c?rev=929279&r1=929278&r2=929279&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/libsvn_client/blame.c (original)
+++ subversion/branches/svn-patch-improvements/subversion/libsvn_client/blame.c Tue Mar 30 20:57:53 2010
@@ -381,7 +381,7 @@ window_handler(svn_txdelta_window_t *win
/* Throw an SVN_ERR_CLIENT_IS_BINARY_FILE error if PROP_DIFFS indicates a
binary MIME type. Else, return SVN_NO_ERROR. */
static svn_error_t *
-check_mimetype(apr_array_header_t *prop_diffs, const char *target,
+check_mimetype(const apr_array_header_t *prop_diffs, const char *target,
apr_pool_t *pool)
{
int i;
Modified: subversion/branches/svn-patch-improvements/subversion/libsvn_client/cat.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/libsvn_client/cat.c?rev=929279&r1=929278&r2=929279&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/libsvn_client/cat.c (original)
+++ subversion/branches/svn-patch-improvements/subversion/libsvn_client/cat.c Tue Mar 30 20:57:53 2010
@@ -86,6 +86,12 @@ cat_local_file(svn_wc_context_t *wc_ctx,
{
SVN_ERR(svn_wc_get_pristine_contents2(&input, wc_ctx, local_abspath,
scratch_pool, scratch_pool));
+
+ if (input == NULL)
+ return svn_error_createf(SVN_ERR_ILLEGAL_TARGET, NULL,
+ _("'%s' has no base revision until it is committed"),
+ svn_dirent_local_style(local_abspath, scratch_pool));
+
SVN_ERR(svn_wc_get_prop_diffs2(NULL, &props, wc_ctx, local_abspath,
scratch_pool, scratch_pool));
}
Modified: subversion/branches/svn-patch-improvements/subversion/libsvn_client/cleanup.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/libsvn_client/cleanup.c?rev=929279&r1=929278&r2=929279&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/libsvn_client/cleanup.c (original)
+++ subversion/branches/svn-patch-improvements/subversion/libsvn_client/cleanup.c Tue Mar 30 20:57:53 2010
@@ -34,8 +34,10 @@
#include "svn_dirent_uri.h"
#include "svn_pools.h"
#include "client.h"
+#include "svn_props.h"
#include "svn_private_config.h"
+#include "private/svn_wc_private.h"
/*** Code. ***/
@@ -110,6 +112,10 @@ svn_client_upgrade(const char *path,
apr_pool_t *scratch_pool)
{
const char *local_abspath;
+ apr_hash_t *externals;
+ apr_hash_index_t *hi;
+ apr_pool_t *iterpool;
+ svn_opt_revision_t rev = {svn_opt_revision_unspecified, {0}};
struct repos_info_baton info_baton;
info_baton.pool = scratch_pool;
info_baton.ctx = ctx;
@@ -123,5 +129,73 @@ svn_client_upgrade(const char *path,
ctx->notify_func2, ctx->notify_baton2,
scratch_pool));
+ /* Now it's time to upgrade the externals too. We do it after the wc
+ upgrade to avoid that errors in the externals causes the wc upgrade to
+ fail. Thanks to caching the performance penalty of walking the wc a
+ second time shouldn't be too severe */
+ SVN_ERR(svn_client_propget3(&externals, SVN_PROP_EXTERNALS, path, &rev,
+ &rev, NULL, svn_depth_infinity, NULL, ctx,
+ scratch_pool));
+
+ iterpool = svn_pool_create(scratch_pool);
+
+ for (hi = apr_hash_first(scratch_pool, externals); hi;
+ hi = apr_hash_next(hi))
+ {
+ int i;
+ const char *externals_parent = svn__apr_hash_index_key(hi);
+ svn_string_t *external_desc = svn__apr_hash_index_val(hi);
+ apr_array_header_t *externals_p;
+
+ svn_pool_clear(iterpool);
+ externals_p = apr_array_make(iterpool, 1,
+ sizeof(svn_wc_external_item2_t*));
+
+ SVN_ERR(svn_wc_parse_externals_description3(&externals_p,
+ svn_dirent_dirname(path,
+ iterpool),
+ external_desc->data, TRUE,
+ iterpool));
+ for (i = 0; i < externals_p->nelts; i++)
+ {
+ svn_wc_external_item2_t *item;
+ const char *external_abspath;
+ const char *external_path;
+ svn_node_kind_t kind;
+ svn_error_t *err;
+
+ item = APR_ARRAY_IDX(externals_p, i, svn_wc_external_item2_t*);
+
+ external_path = svn_dirent_join(externals_parent, item->target_dir,
+ iterpool);
+
+ SVN_ERR(svn_dirent_get_absolute(&external_abspath, external_path,
+ iterpool));
+
+ /* This is hack. We can only send dirs to svn_wc_upgrade(). This
+ way we will get an exception saying that the wc must be
+ upgraded if it's a dir. If it's a file then the lookup is done
+ in an adm_dir belonging to the real wc and since that was
+ updated before the externals no error is returned. */
+ err = svn_wc__node_get_kind(&kind, ctx->wc_ctx, external_abspath,
+ FALSE, iterpool);
+
+ if (err && err->apr_err == SVN_ERR_WC_UPGRADE_REQUIRED)
+ {
+ svn_error_clear(err);
+
+ SVN_ERR(svn_wc_upgrade(ctx->wc_ctx, external_abspath,
+ fetch_repos_info, &info_baton,
+ ctx->cancel_func, ctx->cancel_baton,
+ ctx->notify_func2, ctx->notify_baton2,
+ iterpool));
+ }
+ else
+ SVN_ERR(err);
+ }
+ }
+
+ svn_pool_destroy(iterpool);
+
return SVN_NO_ERROR;
}
Modified: subversion/branches/svn-patch-improvements/subversion/libsvn_client/client.h
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/libsvn_client/client.h?rev=929279&r1=929278&r2=929279&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/libsvn_client/client.h (original)
+++ subversion/branches/svn-patch-improvements/subversion/libsvn_client/client.h Tue Mar 30 20:57:53 2010
@@ -388,7 +388,7 @@ svn_error_t *
svn_client__open_ra_session_internal(svn_ra_session_t **ra_session,
const char *base_url,
const char *base_dir,
- apr_array_header_t *commit_items,
+ const apr_array_header_t *commit_items,
svn_boolean_t use_admin,
svn_boolean_t read_only_wc,
svn_client_ctx_t *ctx,
@@ -655,7 +655,8 @@ svn_client__switch_internal(svn_revnum_t
TARGET is a working-copy path, the base of the hierarchy to be
compared. It corresponds to the URL opened in RA_SESSION below.
- WC_CTX is a context for the working copy.
+ WC_CTX is a context for the working copy and should be NULL for
+ operations that do not involve a working copy.
DIFF_CMD/DIFF_CMD_BATON represent the callback and callback argument that
implement the file comparison function
@@ -730,12 +731,9 @@ svn_client__get_diff_summarize_editor(co
*/
typedef struct
{
- /* The source path or url. */
+ /* The absolute source path or url. */
const char *src;
- /* The absolute path of the source. */
- const char *src_abs;
-
/* The base name of the object. It should be the same for both src
and dst. */
const char *base_name;
@@ -756,11 +754,11 @@ typedef struct
/* The source revision number. */
svn_revnum_t src_revnum;
- /* The destination path or url */
+ /* The absolute destination path or url */
const char *dst;
- /* The destination's parent path */
- const char *dst_parent;
+ /* The absolute source path or url of the destination's parent. */
+ const char *dst_parent_abspath;
} svn_client__copy_pair_t;
/* ---------------------------------------------------------------- */
@@ -821,12 +819,12 @@ typedef struct
#define SVN_CLIENT__SINGLE_REPOS_NAME "svn:single-repos"
-/* Recursively crawl a set of working copy paths (PARENT_DIR + each
+/* Recursively crawl a set of working copy paths (DIR_ABSPATH + each
item in the TARGETS array) looking for commit candidates, locking
working copy directories as the crawl progresses. For each
candidate found:
- - create svn_client_commit_item_t for the candidate.
+ - create svn_client_commit_item3_t for the candidate.
- add the structure to an apr_array_header_t array of commit
items that are in the same repository, creating a new array if
@@ -845,13 +843,9 @@ typedef struct
At the successful return of this function, COMMITTABLES will be an
apr_hash_t * hash of apr_array_header_t * arrays (of
- svn_client_commit_item_t * structures), keyed on const char *
+ svn_client_commit_item3_t * structures), keyed on const char *
canonical repository URLs. LOCK_TOKENS will point to a hash table
- with const char * lock tokens, keyed on const char * URLs. Also,
- LOCKED_DIRS will be an apr_hash_t * hash of svn_wc_adm_access_t *
- keyed on const char * working copy path directory names which were
- locked in the process of this crawl. These will need to be
- unlocked again post-commit.
+ with const char * lock tokens, keyed on const char * URLs.
If DEPTH is specified, descend (or not) into each target in TARGETS
as specified by DEPTH; the behavior is the same as that described
@@ -871,8 +865,8 @@ typedef struct
svn_error_t *
svn_client__harvest_committables(apr_hash_t **committables,
apr_hash_t **lock_tokens,
- svn_wc_adm_access_t *parent_dir,
- apr_array_header_t *targets,
+ const char *dir_abspath,
+ const apr_array_header_t *targets,
svn_depth_t depth,
svn_boolean_t just_locked,
const apr_array_header_t *changelists,
@@ -880,12 +874,11 @@ svn_client__harvest_committables(apr_has
apr_pool_t *pool);
-/* Recursively crawl each working copy path SRC in COPY_PAIRS, harvesting
- commit_items into a COMMITABLES hash (see the docstring for
- svn_client__harvest_committables for what that really means, and
- for the relevance of LOCKED_DIRS) as if every entry at or below
- the SRC was to be committed as a set of adds (mostly with history)
- to a new repository URL (DST in COPY_PAIRS).
+/* Recursively crawl each absolute working copy path SRC in COPY_PAIRS,
+ harvesting commit_items into a COMMITABLES hash (see the docstring for
+ svn_client__harvest_committables for what that really means) as if
+ every entry at or below the SRC was to be committed as a set of adds
+ (mostly with history) to a new repository URL (DST in COPY_PAIRS).
If CTX->CANCEL_FUNC is non-null, it will be called with
CTX->CANCEL_BATON while harvesting to determine if the client has
@@ -925,9 +918,11 @@ 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 the caller wants to keep track of any outstanding temporary
- files left after the transmission of text and property mods,
- *TEMPFILES is the place to look.
+ 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.
MD5 checksums, if available, for the new text bases of committed
files are stored in *CHECKSUMS, which maps const char* paths (from the
@@ -935,11 +930,11 @@ svn_client__condense_commit_items(const
null. */
svn_error_t *
svn_client__do_commit(const char *base_url,
- apr_array_header_t *commit_items,
+ const apr_array_header_t *commit_items,
const svn_delta_editor_t *editor,
void *edit_baton,
const char *notify_path_prefix,
- apr_hash_t **tempfiles,
+ apr_hash_t **new_text_base_abspaths,
apr_hash_t **checksums,
svn_client_ctx_t *ctx,
apr_pool_t *pool);