You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2013/10/30 02:04:26 UTC
svn commit: r1536949 [2/6] - in /subversion/branches/fsfs-improvements: ./
build/ build/ac-macros/ build/generator/ notes/http-and-webdav/
subversion/bindings/javahl/ subversion/bindings/javahl/native/
subversion/bindings/javahl/src/org/apache/subversi...
Modified: subversion/branches/fsfs-improvements/subversion/libsvn_client/merge.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/libsvn_client/merge.c?rev=1536949&r1=1536948&r2=1536949&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/libsvn_client/merge.c (original)
+++ subversion/branches/fsfs-improvements/subversion/libsvn_client/merge.c Wed Oct 30 01:04:22 2013
@@ -6729,7 +6729,7 @@ merge_range_find_extremes(svn_revnum_t *
}
}
-/* Wrapper around svn_ra_get_log2(). Invoke RECEIVER with RECEIVER_BATON
+/* Wrapper around svn_ra_get_log3(). Invoke RECEIVER with RECEIVER_BATON
* on each commit from YOUNGEST_REV to OLDEST_REV in which TARGET_RELPATH
* changed. TARGET_RELPATH is relative to RA_SESSION's URL.
* Important: Revision properties are not retrieved by this function for
@@ -6753,10 +6753,11 @@ get_log(svn_ra_session_t *ra_session,
revprops = apr_array_make(pool, 0, sizeof(const char *));
- SVN_ERR(svn_ra_get_log2(ra_session, log_targets, youngest_rev,
+ SVN_ERR(svn_ra_get_log3(ra_session, log_targets, youngest_rev,
oldest_rev, 0 /* limit */, discover_changed_paths,
FALSE /* strict_node_history */,
FALSE /* include_merged_revisions */,
+ svn_move_behavior_no_moves, /* ### really? */
revprops, receiver, receiver_baton, pool));
return SVN_NO_ERROR;
Modified: subversion/branches/fsfs-improvements/subversion/libsvn_client/mergeinfo.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/libsvn_client/mergeinfo.c?rev=1536949&r1=1536948&r2=1536949&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/libsvn_client/mergeinfo.c (original)
+++ subversion/branches/fsfs-improvements/subversion/libsvn_client/mergeinfo.c Wed Oct 30 01:04:22 2013
@@ -1566,13 +1566,14 @@ logs_for_mergeinfo_rangelist(const char
target = apr_array_make(scratch_pool, 1, sizeof(const char *));
APR_ARRAY_PUSH(target, const char *) = "";
- SVN_ERR(svn_ra_get_log2(ra_session, target,
+ SVN_ERR(svn_ra_get_log3(ra_session, target,
oldest_revs_first ? oldest_rev : youngest_rev,
oldest_revs_first ? youngest_rev : oldest_rev,
0 /* limit */,
discover_changed_paths,
FALSE /* strict_node_history */,
FALSE /* include_merged_revisions */,
+ svn_move_behavior_no_moves, /* ### really? */
revprops,
filter_log_entry_with_rangelist, &fleb,
scratch_pool));
Modified: subversion/branches/fsfs-improvements/subversion/libsvn_client/patch.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/libsvn_client/patch.c?rev=1536949&r1=1536948&r2=1536949&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/libsvn_client/patch.c (original)
+++ subversion/branches/fsfs-improvements/subversion/libsvn_client/patch.c Wed Oct 30 01:04:22 2013
@@ -1726,7 +1726,7 @@ copy_lines_to_target(target_content_t *c
SVN_ERR(readline(content, &target_line, iterpool, iterpool));
if (! content->eof)
target_line = apr_pstrcat(iterpool, target_line, content->eol_str,
- (char *)NULL);
+ SVN_VA_NULL);
len = strlen(target_line);
SVN_ERR(content->write(content->write_baton, target_line,
len, iterpool));
Modified: subversion/branches/fsfs-improvements/subversion/libsvn_delta/compat.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/libsvn_delta/compat.c?rev=1536949&r1=1536948&r2=1536949&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/libsvn_delta/compat.c (original)
+++ subversion/branches/fsfs-improvements/subversion/libsvn_delta/compat.c Wed Oct 30 01:04:22 2013
@@ -23,7 +23,6 @@
#include <stddef.h>
-#include "svn_private_config.h"
#include "svn_types.h"
#include "svn_error.h"
#include "svn_delta.h"
@@ -35,6 +34,7 @@
#include "svn_pools.h"
#include "private/svn_delta_private.h"
+#include "svn_private_config.h"
struct file_rev_handler_wrapper_baton {
@@ -1628,7 +1628,7 @@ apply_change(void **dir_baton,
/* Make this an FS path by prepending "/" */
if (copyfrom_url[0] != '/')
copyfrom_url = apr_pstrcat(scratch_pool, "/",
- copyfrom_url, NULL);
+ copyfrom_url, SVN_VA_NULL);
}
copyfrom_rev = change->copyfrom_rev;
Modified: subversion/branches/fsfs-improvements/subversion/libsvn_fs/editor.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/libsvn_fs/editor.c?rev=1536949&r1=1536948&r2=1536949&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/libsvn_fs/editor.c (original)
+++ subversion/branches/fsfs-improvements/subversion/libsvn_fs/editor.c Wed Oct 30 01:04:22 2013
@@ -62,7 +62,7 @@ struct edit_baton {
svn_fs_root_t *root;
};
-#define FSPATH(relpath, pool) apr_pstrcat(pool, "/", relpath, NULL)
+#define FSPATH(relpath, pool) apr_pstrcat(pool, "/", relpath, SVN_VA_NULL)
#define UNUSED(x) ((void)(x))
Modified: subversion/branches/fsfs-improvements/subversion/libsvn_fs/fs-loader.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/libsvn_fs/fs-loader.c?rev=1536949&r1=1536948&r2=1536949&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/libsvn_fs/fs-loader.c (original)
+++ subversion/branches/fsfs-improvements/subversion/libsvn_fs/fs-loader.c Wed Oct 30 01:04:22 2013
@@ -989,177 +989,12 @@ svn_fs_revision_root_revision(svn_fs_roo
return root->is_txn_root ? SVN_INVALID_REVNUM : root->rev;
}
-/* Return TRUE, if CHANGE deleted the node previously found at its target
- path. */
-static svn_boolean_t
-is_deletion(svn_fs_path_change2_t *change)
-{
- return change->change_kind == svn_fs_path_change_movereplace
- || change->change_kind == svn_fs_path_change_replace
- || change->change_kind == svn_fs_path_change_delete;
-}
-
-/* Change all moves in CHANGES to ADD. Use POOL for temporary allocations.
- */
-static void
-turn_moves_into_copies(apr_hash_t *changes,
- apr_pool_t *pool)
-{
- apr_hash_index_t *hi;
- for (hi = apr_hash_first(pool, changes); hi; hi = apr_hash_next(hi))
- {
- const char *key;
- apr_ssize_t klen;
- svn_fs_path_change2_t *change;
- apr_hash_this(hi, (const void **)&key, &klen, (void**)&change);
-
- switch (change->change_kind)
- {
- case svn_fs_path_change_move:
- change->change_kind = svn_fs_path_change_add;
- break;
-
- case svn_fs_path_change_movereplace:
- change->change_kind = svn_fs_path_change_replace;
- break;
-
- default:
- break;
- }
- }
-}
-
-/* Replace ADDs with MOVes, if they are unique, have a matching deletion
- * and if the copy-from revision is REVISION-1. Use POOL for temporary
- * allocations.
- */
-static void
-turn_unique_copies_into_moves(apr_hash_t *changes,
- svn_revnum_t revision,
- apr_pool_t *pool)
-{
- apr_hash_index_t *hi;
- apr_hash_t *unique_copy_sources;
- const char **sources;
- int i;
-
- /* find all copy-from paths (ADD and MOV alike) */
-
- svn_boolean_t any_deletion = FALSE;
- apr_array_header_t *copy_sources
- = apr_array_make(pool, apr_hash_count(changes), sizeof(const char*));
-
- for (hi = apr_hash_first(pool, changes); hi; hi = apr_hash_next(hi))
- {
- svn_fs_path_change2_t *change;
- apr_hash_this(hi, NULL, NULL, (void**)&change);
-
- if (change->copyfrom_path && change->copyfrom_rev == revision-1)
- APR_ARRAY_PUSH(copy_sources, const char *)
- = change->copyfrom_path;
-
- any_deletion |= is_deletion(change);
- }
-
- /* no suitable copy-from or no deletion -> no moves */
-
- if (!copy_sources->nelts || !any_deletion)
- return;
-
- /* identify copy-from paths that have been mentioned exactly once */
-
- sources = (const char **)copy_sources->elts;
- qsort(sources, copy_sources->nelts, copy_sources->elt_size,
- (int (*)(const void *, const void *))svn_sort_compare_paths);
-
- unique_copy_sources = apr_hash_make(pool);
- for (i = 0; i < copy_sources->nelts; ++i)
- if ( (i == 0 || strcmp(sources[i-1], sources[i]))
- && (i == copy_sources->nelts-1 || strcmp(sources[i+1], sources[i])))
- {
- apr_hash_set(unique_copy_sources, sources[i],
- APR_HASH_KEY_STRING, sources[i]);
- }
-
- /* no unique copy-from paths -> no moves */
-
- if (!apr_hash_count(unique_copy_sources))
- return;
-
- /* Replace all additions, replacements with a unique copy-from path,
- the correct copy-from rev and a matching deletion in this revision,
- with moves and move-replacements, respectively. */
-
- for (hi = apr_hash_first(pool, changes); hi; hi = apr_hash_next(hi))
- {
- const char *key;
- apr_ssize_t klen;
- svn_fs_path_change2_t *change, *copy_from_change;
-
- apr_hash_this(hi, (const void **)&key, &klen, (void**)&change);
- if ( change->copyfrom_rev != revision-1
- || !change->copyfrom_path
- || !apr_hash_get(unique_copy_sources, change->copyfrom_path,
- APR_HASH_KEY_STRING))
- continue;
-
- copy_from_change = apr_hash_get(changes, change->copyfrom_path,
- APR_HASH_KEY_STRING);
- if (!copy_from_change || !is_deletion(copy_from_change))
- continue;
-
- /* There is a deletion of the ADD's copy-from path in *REVISION*.
- This can either be the same as in REVISION-1 (o.k.) or must have
- been replaced by some other node. However, that would imply that
- it still got deleted as part of the replacement, i.e. both cases
- are o.k. */
-
- switch (change->change_kind)
- {
- case svn_fs_path_change_add:
- change->change_kind = svn_fs_path_change_move;
- break;
-
- case svn_fs_path_change_replace:
- change->change_kind = svn_fs_path_change_movereplace;
- break;
-
- default:
- break;
- }
- }
-}
-
svn_error_t *
-svn_fs_paths_changed3(apr_hash_t **changed_paths_p,
+svn_fs_paths_changed2(apr_hash_t **changed_paths_p,
svn_fs_root_t *root,
- svn_move_behavior_t move_behavior,
- apr_pool_t *pool)
-{
- SVN_ERR(root->vtable->paths_changed(changed_paths_p, root, pool));
- switch(move_behavior)
- {
- case svn_move_behavior_no_moves:
- turn_moves_into_copies(*changed_paths_p, pool);
- break;
-
- case svn_move_behavior_auto_moves:
- turn_unique_copies_into_moves(*changed_paths_p, root->rev, pool);
- break;
-
- default:
- break;
- }
-
- return SVN_NO_ERROR;
-}
-
-svn_error_t *
-svn_fs_paths_changed2(apr_hash_t **changed_paths_p, svn_fs_root_t *root,
apr_pool_t *pool)
{
- return svn_fs_paths_changed3(changed_paths_p, root,
- svn_move_behavior_no_moves, pool);
+ return root->vtable->paths_changed(changed_paths_p, root, pool);
}
svn_error_t *
@@ -1169,8 +1004,7 @@ svn_fs_paths_changed(apr_hash_t **change
apr_hash_t *changed_paths_new_structs;
apr_hash_index_t *hi;
- SVN_ERR(svn_fs_paths_changed3(&changed_paths_new_structs, root,
- svn_move_behavior_no_moves, pool));
+ SVN_ERR(svn_fs_paths_changed2(&changed_paths_new_structs, root, pool));
*changed_paths_p = apr_hash_make(pool);
for (hi = apr_hash_first(pool, changed_paths_new_structs);
hi;
Modified: subversion/branches/fsfs-improvements/subversion/libsvn_fs_base/bdb/locks-table.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/libsvn_fs_base/bdb/locks-table.c?rev=1536949&r1=1536948&r2=1536949&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/libsvn_fs_base/bdb/locks-table.c (original)
+++ subversion/branches/fsfs-improvements/subversion/libsvn_fs_base/bdb/locks-table.c Wed Oct 30 01:04:22 2013
@@ -257,7 +257,7 @@ svn_fs_bdb__locks_get(svn_fs_t *fs,
DB_SET_RANGE);
if (!svn_fspath__is_root(path, strlen(path)))
- lookup_path = apr_pstrcat(pool, path, "/", (char *)NULL);
+ lookup_path = apr_pstrcat(pool, path, "/", SVN_VA_NULL);
lookup_len = strlen(lookup_path);
/* As long as the prefix of the returned KEY matches LOOKUP_PATH we
Modified: subversion/branches/fsfs-improvements/subversion/libsvn_fs_base/lock.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/libsvn_fs_base/lock.c?rev=1536949&r1=1536948&r2=1536949&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/libsvn_fs_base/lock.c (original)
+++ subversion/branches/fsfs-improvements/subversion/libsvn_fs_base/lock.c Wed Oct 30 01:04:22 2013
@@ -253,7 +253,7 @@ svn_fs_base__generate_lock_token(const c
generate a URI that matches the DAV RFC. We could change this to
some other URI scheme someday, if we wish. */
*token = apr_pstrcat(pool, "opaquelocktoken:",
- svn_uuid_generate(pool), (char *)NULL);
+ svn_uuid_generate(pool), SVN_VA_NULL);
return SVN_NO_ERROR;
}
Modified: subversion/branches/fsfs-improvements/subversion/libsvn_fs_fs/caching.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/libsvn_fs_fs/caching.c?rev=1536949&r1=1536948&r2=1536949&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/libsvn_fs_fs/caching.c (original)
+++ subversion/branches/fsfs-improvements/subversion/libsvn_fs_fs/caching.c Wed Oct 30 01:04:22 2013
@@ -375,7 +375,7 @@ svn_fs_fs__initialize_caches(svn_fs_t *f
"fsfs:", fs->uuid,
"/", normalize_key_part(fs->path, pool),
":",
- (char *)NULL);
+ SVN_VA_NULL);
svn_memcache_t *memcache;
svn_membuffer_t *membuffer;
svn_boolean_t no_handler;
@@ -394,7 +394,7 @@ svn_fs_fs__initialize_caches(svn_fs_t *f
fs,
pool));
- prefix = apr_pstrcat(pool, "ns:", cache_namespace, ":", prefix, NULL);
+ prefix = apr_pstrcat(pool, "ns:", cache_namespace, ":", prefix, SVN_VA_NULL);
membuffer = svn_cache__get_global_membuffer_cache();
@@ -434,7 +434,7 @@ svn_fs_fs__initialize_caches(svn_fs_t *f
svn_fs_fs__serialize_id,
svn_fs_fs__deserialize_id,
sizeof(svn_revnum_t),
- apr_pstrcat(pool, prefix, "RRI", (char *)NULL),
+ apr_pstrcat(pool, prefix, "RRI", SVN_VA_NULL),
0,
fs,
no_handler,
@@ -449,7 +449,7 @@ svn_fs_fs__initialize_caches(svn_fs_t *f
svn_fs_fs__dag_serialize,
svn_fs_fs__dag_deserialize,
APR_HASH_KEY_STRING,
- apr_pstrcat(pool, prefix, "DAG", (char *)NULL),
+ apr_pstrcat(pool, prefix, "DAG", SVN_VA_NULL),
SVN_CACHE__MEMBUFFER_LOW_PRIORITY,
fs,
no_handler,
@@ -466,7 +466,7 @@ svn_fs_fs__initialize_caches(svn_fs_t *f
svn_fs_fs__serialize_dir_entries,
svn_fs_fs__deserialize_dir_entries,
sizeof(pair_cache_key_t),
- apr_pstrcat(pool, prefix, "DIR", (char *)NULL),
+ apr_pstrcat(pool, prefix, "DIR", SVN_VA_NULL),
SVN_CACHE__MEMBUFFER_LOW_PRIORITY,
fs,
no_handler,
@@ -482,7 +482,7 @@ svn_fs_fs__initialize_caches(svn_fs_t *f
svn_fs_fs__deserialize_manifest,
sizeof(svn_revnum_t),
apr_pstrcat(pool, prefix, "PACK-MANIFEST",
- (char *)NULL),
+ SVN_VA_NULL),
SVN_CACHE__MEMBUFFER_HIGH_PRIORITY,
fs,
no_handler,
@@ -496,7 +496,7 @@ svn_fs_fs__initialize_caches(svn_fs_t *f
svn_fs_fs__serialize_node_revision,
svn_fs_fs__deserialize_node_revision,
sizeof(pair_cache_key_t),
- apr_pstrcat(pool, prefix, "NODEREVS", (char *)NULL),
+ apr_pstrcat(pool, prefix, "NODEREVS", SVN_VA_NULL),
SVN_CACHE__MEMBUFFER_HIGH_PRIORITY,
fs,
no_handler,
@@ -510,7 +510,7 @@ svn_fs_fs__initialize_caches(svn_fs_t *f
svn_fs_fs__serialize_rep_header,
svn_fs_fs__deserialize_rep_header,
sizeof(representation_cache_key_t),
- apr_pstrcat(pool, prefix, "REPHEADER", (char *)NULL),
+ apr_pstrcat(pool, prefix, "REPHEADER", SVN_VA_NULL),
SVN_CACHE__MEMBUFFER_HIGH_PRIORITY,
fs,
no_handler,
@@ -524,7 +524,7 @@ svn_fs_fs__initialize_caches(svn_fs_t *f
svn_fs_fs__serialize_changes,
svn_fs_fs__deserialize_changes,
sizeof(svn_revnum_t),
- apr_pstrcat(pool, prefix, "CHANGES", (char *)NULL),
+ apr_pstrcat(pool, prefix, "CHANGES", SVN_VA_NULL),
0,
fs,
no_handler,
@@ -540,7 +540,7 @@ svn_fs_fs__initialize_caches(svn_fs_t *f
/* Values are svn_stringbuf_t */
NULL, NULL,
sizeof(pair_cache_key_t),
- apr_pstrcat(pool, prefix, "TEXT", (char *)NULL),
+ apr_pstrcat(pool, prefix, "TEXT", SVN_VA_NULL),
SVN_CACHE__MEMBUFFER_LOW_PRIORITY,
fs,
no_handler,
@@ -554,7 +554,7 @@ svn_fs_fs__initialize_caches(svn_fs_t *f
svn_fs_fs__deserialize_properties,
sizeof(pair_cache_key_t),
apr_pstrcat(pool, prefix, "PROP",
- (char *)NULL),
+ SVN_VA_NULL),
SVN_CACHE__MEMBUFFER_LOW_PRIORITY,
fs,
no_handler,
@@ -568,7 +568,7 @@ svn_fs_fs__initialize_caches(svn_fs_t *f
svn_fs_fs__deserialize_mergeinfo,
APR_HASH_KEY_STRING,
apr_pstrcat(pool, prefix, "MERGEINFO",
- (char *)NULL),
+ SVN_VA_NULL),
0,
fs,
no_handler,
@@ -582,7 +582,7 @@ svn_fs_fs__initialize_caches(svn_fs_t *f
NULL, NULL,
APR_HASH_KEY_STRING,
apr_pstrcat(pool, prefix, "HAS_MERGEINFO",
- (char *)NULL),
+ SVN_VA_NULL),
0,
fs,
no_handler,
@@ -607,7 +607,7 @@ svn_fs_fs__initialize_caches(svn_fs_t *f
svn_fs_fs__deserialize_properties,
sizeof(pair_cache_key_t),
apr_pstrcat(pool, prefix, "REVPROP",
- (char *)NULL),
+ SVN_VA_NULL),
SVN_CACHE__MEMBUFFER_HIGH_PRIORITY,
fs,
no_handler,
@@ -629,7 +629,7 @@ svn_fs_fs__initialize_caches(svn_fs_t *f
svn_fs_fs__deserialize_txdelta_window,
sizeof(window_cache_key_t),
apr_pstrcat(pool, prefix, "TXDELTA_WINDOW",
- (char *)NULL),
+ SVN_VA_NULL),
0,
fs,
no_handler,
@@ -643,7 +643,7 @@ svn_fs_fs__initialize_caches(svn_fs_t *f
NULL, NULL,
sizeof(window_cache_key_t),
apr_pstrcat(pool, prefix, "COMBINED_WINDOW",
- (char *)NULL),
+ SVN_VA_NULL),
SVN_CACHE__MEMBUFFER_LOW_PRIORITY,
fs,
no_handler,
@@ -726,7 +726,7 @@ svn_fs_fs__initialize_txn_caches(svn_fs_
"/", fs->path,
":", txn_id,
":", svn_uuid_generate(pool), ":",
- (char *)NULL);
+ SVN_VA_NULL);
/* We don't support caching for concurrent transactions in the SAME
* FSFS session. Maybe, you forgot to clean POOL. */
@@ -747,7 +747,7 @@ svn_fs_fs__initialize_txn_caches(svn_fs_
svn_fs_fs__deserialize_dir_entries,
APR_HASH_KEY_STRING,
apr_pstrcat(pool, prefix, "TXNDIR",
- (char *)NULL),
+ SVN_VA_NULL),
0,
fs,
TRUE,
Modified: subversion/branches/fsfs-improvements/subversion/libsvn_fs_fs/fs.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/libsvn_fs_fs/fs.c?rev=1536949&r1=1536948&r2=1536949&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/libsvn_fs_fs/fs.c (original)
+++ subversion/branches/fsfs-improvements/subversion/libsvn_fs_fs/fs.c Wed Oct 30 01:04:22 2013
@@ -82,7 +82,7 @@ fs_serialized_init(svn_fs_t *fs, apr_poo
SVN_ERR_ASSERT(fs->uuid);
key = apr_pstrcat(pool, SVN_FSFS_SHARED_USERDATA_PREFIX, fs->uuid,
- (char *) NULL);
+ SVN_VA_NULL);
status = apr_pool_userdata_get(&val, key, common_pool);
if (status)
return svn_error_wrap_apr(status, _("Can't fetch FSFS shared data"));
Modified: subversion/branches/fsfs-improvements/subversion/libsvn_fs_fs/fs_fs.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/libsvn_fs_fs/fs_fs.c?rev=1536949&r1=1536948&r2=1536949&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/libsvn_fs_fs/fs_fs.c (original)
+++ subversion/branches/fsfs-improvements/subversion/libsvn_fs_fs/fs_fs.c Wed Oct 30 01:04:22 2013
@@ -245,6 +245,31 @@ check_format_file_buffer_numeric(const c
pool);
}
+/* Return the error SVN_ERR_FS_UNSUPPORTED_FORMAT if FS's format
+ number is not the same as a format number supported by this
+ Subversion. */
+static svn_error_t *
+check_format(int format)
+{
+ /* Blacklist. These formats may be either younger or older than
+ SVN_FS_FS__FORMAT_NUMBER, but we don't support them. */
+ if (format == SVN_FS_FS__PACKED_REVPROP_SQLITE_DEV_FORMAT)
+ return svn_error_createf(SVN_ERR_FS_UNSUPPORTED_FORMAT, NULL,
+ _("Found format '%d', only created by "
+ "unreleased dev builds; see "
+ "http://subversion.apache.org"
+ "/docs/release-notes/1.7#revprop-packing"),
+ format);
+
+ /* We support all formats from 1-current simultaneously */
+ if (1 <= format && format <= SVN_FS_FS__FORMAT_NUMBER)
+ return SVN_NO_ERROR;
+
+ return svn_error_createf(SVN_ERR_FS_UNSUPPORTED_FORMAT, NULL,
+ _("Expected FS format between '1' and '%d'; found format '%d'"),
+ SVN_FS_FS__FORMAT_NUMBER, format);
+}
+
/* Read the format number and maximum number of files per directory
from PATH and return them in *PFORMAT and *MAX_FILES_PER_DIR
respectively.
@@ -295,6 +320,9 @@ read_format(int *pformat, int *max_files
SVN_ERR(check_format_file_buffer_numeric(buf->data, 0, path, pool));
SVN_ERR(svn_cstring_atoi(pformat, buf->data));
+ /* Check that we support this format at all */
+ SVN_ERR(check_format(*pformat));
+
/* Set the default values for anything that can be set via an option. */
*max_files_per_dir = 0;
@@ -377,31 +405,6 @@ svn_fs_fs__write_format(svn_fs_t *fs,
return svn_io_set_file_read_only(path, FALSE, pool);
}
-/* Return the error SVN_ERR_FS_UNSUPPORTED_FORMAT if FS's format
- number is not the same as a format number supported by this
- Subversion. */
-static svn_error_t *
-check_format(int format)
-{
- /* Blacklist. These formats may be either younger or older than
- SVN_FS_FS__FORMAT_NUMBER, but we don't support them. */
- if (format == SVN_FS_FS__PACKED_REVPROP_SQLITE_DEV_FORMAT)
- return svn_error_createf(SVN_ERR_FS_UNSUPPORTED_FORMAT, NULL,
- _("Found format '%d', only created by "
- "unreleased dev builds; see "
- "http://subversion.apache.org"
- "/docs/release-notes/1.7#revprop-packing"),
- format);
-
- /* We support all formats from 1-current simultaneously */
- if (1 <= format && format <= SVN_FS_FS__FORMAT_NUMBER)
- return SVN_NO_ERROR;
-
- return svn_error_createf(SVN_ERR_FS_UNSUPPORTED_FORMAT, NULL,
- _("Expected FS format between '1' and '%d'; found format '%d'"),
- SVN_FS_FS__FORMAT_NUMBER, format);
-}
-
svn_boolean_t
svn_fs_fs__fs_supports_mergeinfo(svn_fs_t *fs)
{
@@ -633,7 +636,6 @@ svn_fs_fs__open(svn_fs_t *fs, const char
/* Read the FS format number. */
SVN_ERR(read_format(&format, &max_files_per_dir,
path_format(fs, pool), pool));
- SVN_ERR(check_format(format));
/* Now we've got a format number no matter what. */
ffd->format = format;
@@ -698,7 +700,6 @@ upgrade_body(void *baton, apr_pool_t *po
/* Read the FS format number and max-files-per-dir setting. */
SVN_ERR(read_format(&format, &max_files_per_dir, format_path, pool));
- SVN_ERR(check_format(format));
/* If the config file does not exist, create one. */
SVN_ERR(svn_io_check_path(svn_dirent_join(fs->path, PATH_CONFIG, pool),
@@ -1084,7 +1085,7 @@ svn_fs_fs__set_uuid(svn_fs_t *fs,
uuid = svn_uuid_generate(pool);
/* Make sure we have a copy in FS->POOL, and append a newline. */
- my_uuid = apr_pstrcat(fs->pool, uuid, "\n", (char *)NULL);
+ my_uuid = apr_pstrcat(fs->pool, uuid, "\n", SVN_VA_NULL);
my_uuid_len = strlen(my_uuid);
/* We use the permissions of the 'current' file, because the 'uuid'
Modified: subversion/branches/fsfs-improvements/subversion/libsvn_fs_fs/lock.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/libsvn_fs_fs/lock.c?rev=1536949&r1=1536948&r2=1536949&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/libsvn_fs_fs/lock.c (original)
+++ subversion/branches/fsfs-improvements/subversion/libsvn_fs_fs/lock.c Wed Oct 30 01:04:22 2013
@@ -133,7 +133,7 @@ digest_path_from_digest(const char *fs_p
{
return svn_dirent_join_many(pool, fs_path, PATH_LOCKS_DIR,
apr_pstrmemdup(pool, digest, DIGEST_SUBDIR_LEN),
- digest, NULL);
+ digest, SVN_VA_NULL);
}
@@ -151,7 +151,7 @@ digest_path_from_path(const char **diges
*digest_path = svn_dirent_join_many(pool, fs_path, PATH_LOCKS_DIR,
apr_pstrmemdup(pool, digest,
DIGEST_SUBDIR_LEN),
- digest, NULL);
+ digest, SVN_VA_NULL);
return SVN_NO_ERROR;
}
@@ -959,7 +959,7 @@ svn_fs_fs__generate_lock_token(const cha
generate a URI that matches the DAV RFC. We could change this to
some other URI scheme someday, if we wish. */
*token = apr_pstrcat(pool, "opaquelocktoken:",
- svn_uuid_generate(pool), (char *)NULL);
+ svn_uuid_generate(pool), SVN_VA_NULL);
return SVN_NO_ERROR;
}
Modified: subversion/branches/fsfs-improvements/subversion/libsvn_fs_fs/transaction.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/libsvn_fs_fs/transaction.c?rev=1536949&r1=1536948&r2=1536949&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/libsvn_fs_fs/transaction.c (original)
+++ subversion/branches/fsfs-improvements/subversion/libsvn_fs_fs/transaction.c Wed Oct 30 01:04:22 2013
@@ -999,8 +999,8 @@ create_txn_dir(const char **id_p,
fs->path,
PATH_TXNS_DIR,
apr_pstrcat(pool, *id_p, PATH_EXT_TXN,
- (char *)NULL),
- NULL);
+ SVN_VA_NULL),
+ SVN_VA_NULL);
return svn_io_dir_make(txn_dir, APR_OS_DEFAULT, pool);
}
@@ -1024,7 +1024,7 @@ create_txn_dir_pre_1_5(const char **id_p
/* Try to create directories named "<txndir>/<rev>-<uniqueifier>.txn". */
prefix = svn_dirent_join_many(pool, fs->path, PATH_TXNS_DIR,
- apr_psprintf(pool, "%ld", rev), NULL);
+ apr_psprintf(pool, "%ld", rev), SVN_VA_NULL);
subpool = svn_pool_create(pool);
for (i = 1; i <= 99999; i++)
@@ -2707,15 +2707,18 @@ write_final_changed_path_info(apr_off_t
/* all moves specify the "copy-from-rev" as REV-1 */
if (svn_fs_fs__supports_move(fs))
- for (hi = apr_hash_first(pool, changed_paths); hi; hi = apr_hash_next(hi))
- {
- svn_fs_path_change2_t *change;
- apr_hash_this(hi, NULL, NULL, (void **)&change);
-
- if ( (change->change_kind == svn_fs_path_change_move)
- || (change->change_kind == svn_fs_path_change_movereplace))
- change->copyfrom_rev = new_rev - 1;
- }
+ {
+ for (hi = apr_hash_first(pool, changed_paths);
+ hi;
+ hi = apr_hash_next(hi))
+ {
+ svn_fs_path_change2_t *change = svn__apr_hash_index_val(hi);
+
+ if ( (change->change_kind == svn_fs_path_change_move)
+ || (change->change_kind == svn_fs_path_change_movereplace))
+ change->copyfrom_rev = new_rev - 1;
+ }
+ }
SVN_ERR(svn_fs_fs__write_changes(svn_stream_from_aprfile2(file, TRUE, pool),
fs, changed_paths, TRUE, pool));
@@ -2880,23 +2883,23 @@ verify_locks(svn_fs_t *fs,
Allocate the hashed strings in POOL. */
static svn_error_t *
check_for_duplicate_move_source(apr_hash_t *source_paths,
- change_t *change,
+ svn_fs_path_change2_t *change,
apr_pool_t *pool)
{
- if ( change->info.change_kind == svn_fs_path_change_move
- || change->info.change_kind == svn_fs_path_change_movereplace)
- if (change->info.copyfrom_path)
+ if ( change->change_kind == svn_fs_path_change_move
+ || change->change_kind == svn_fs_path_change_movereplace)
+ if (change->copyfrom_path)
{
- apr_size_t len = strlen(change->info.copyfrom_path);
- if (apr_hash_get(source_paths, change->info.copyfrom_path, len))
+ apr_size_t len = strlen(change->copyfrom_path);
+ if (apr_hash_get(source_paths, change->copyfrom_path, len))
return svn_error_createf(SVN_ERR_FS_AMBIGUOUS_MOVE, NULL,
_("Path '%s' has been moved to more than one target"),
- change->info.copyfrom_path);
+ change->copyfrom_path);
apr_hash_set(source_paths,
- apr_pstrmemdup(pool, change->info.copyfrom_path, len),
+ apr_pstrmemdup(pool, change->copyfrom_path, len),
len,
- change->info.copyfrom_path);
+ change->copyfrom_path);
}
return SVN_NO_ERROR;
@@ -2929,12 +2932,12 @@ verify_moves(svn_fs_t *fs,
{
const char *path;
apr_ssize_t len;
- change_t *change;
+ svn_fs_path_change2_t *change;
apr_hash_this(hi, (const void**)&path, &len, (void**)&change);
- if ( change->info.copyfrom_path
- && ( change->info.change_kind == svn_fs_path_change_move
- || change->info.change_kind == svn_fs_path_change_movereplace))
+ if ( change->copyfrom_path
+ && ( change->change_kind == svn_fs_path_change_move
+ || change->change_kind == svn_fs_path_change_movereplace))
{
svn_sort__item_t *item = apr_array_push(moves);
item->key = path;
@@ -2942,9 +2945,9 @@ verify_moves(svn_fs_t *fs,
item->value = change;
}
- if ( change->info.change_kind == svn_fs_path_change_delete
- || change->info.change_kind == svn_fs_path_change_replace
- || change->info.change_kind == svn_fs_path_change_movereplace)
+ if ( change->change_kind == svn_fs_path_change_delete
+ || change->change_kind == svn_fs_path_change_replace
+ || change->change_kind == svn_fs_path_change_movereplace)
APR_ARRAY_PUSH(deletions, const char *) = path;
}
@@ -2975,10 +2978,9 @@ verify_moves(svn_fs_t *fs,
deleted_path);
if (relpath)
{
- change_t *closed_move = closest_move_item->value;
+ svn_fs_path_change2_t *closed_move = closest_move_item->value;
APR_ARRAY_IDX(deletions, i, const char*)
- = svn_dirent_join(closed_move->info.copyfrom_path, relpath,
- pool);
+ = svn_dirent_join(closed_move->copyfrom_path, relpath, pool);
}
}
}
@@ -3004,7 +3006,8 @@ verify_moves(svn_fs_t *fs,
changes_p = (change_t **)&changes->elts;
for (i = 0; i < changes->nelts; ++i)
- SVN_ERR(check_for_duplicate_move_source(source_paths, changes_p[i],
+ SVN_ERR(check_for_duplicate_move_source(source_paths,
+ &changes_p[i]->info,
pool));
}
@@ -3012,23 +3015,24 @@ verify_moves(svn_fs_t *fs,
for (i = 0; i < moves->nelts; ++i)
{
- change_t *change = APR_ARRAY_IDX(moves, i, svn_sort__item_t).value;
+ svn_fs_path_change2_t *change
+ = APR_ARRAY_IDX(moves, i, svn_sort__item_t).value;
/* there must be a deletion of move's copy-from path
(or any of its parents) */
int closest_deletion_idx
- = svn_sort__bsearch_lower_bound(change->info.copyfrom_path, deletions,
+ = svn_sort__bsearch_lower_bound(change->copyfrom_path, deletions,
svn_sort_compare_paths);
if (closest_deletion_idx < deletions->nelts)
{
const char *closest_deleted_path
= APR_ARRAY_IDX(deletions, closest_deletion_idx, const char *);
if (!svn_dirent_is_ancestor(closest_deleted_path,
- change->info.copyfrom_path))
+ change->copyfrom_path))
return svn_error_createf(SVN_ERR_FS_INCOMPLETE_MOVE, NULL,
_("Path '%s' has been moved without being deleted"),
- change->info.copyfrom_path);
+ change->copyfrom_path);
}
}
Modified: subversion/branches/fsfs-improvements/subversion/libsvn_fs_fs/tree.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/libsvn_fs_fs/tree.c?rev=1536949&r1=1536948&r2=1536949&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/libsvn_fs_fs/tree.c (original)
+++ subversion/branches/fsfs-improvements/subversion/libsvn_fs_fs/tree.c Wed Oct 30 01:04:22 2013
@@ -1241,15 +1241,14 @@ get_dag(dag_node_t **dag_node_p,
if (! node)
{
- /* Canonicalize the input PATH. */
- if (! svn_fs__is_canonical_abspath(path))
- {
- path = svn_fs__canonicalize_abspath(path, pool);
-
- /* Try again with the corrected path. */
- SVN_ERR(dag_node_cache_get(&node, root, path, needs_lock_cache,
- pool));
- }
+ /* Canonicalize the input PATH. As it turns out, >95% of all paths
+ * seen here during e.g. svnadmin verify are non-canonical, i.e.
+ * miss the leading '/'. Unconditional canonicalization has a net
+ * performance benefit over previously checking path for being
+ * canonical. */
+ path = svn_fs__canonicalize_abspath(path, pool);
+ SVN_ERR(dag_node_cache_get(&node, root, path, needs_lock_cache,
+ pool));
if (! node)
{
@@ -4370,7 +4369,7 @@ make_txn_root(svn_fs_root_t **root_p,
APR_HASH_KEY_STRING,
32, 20, FALSE,
apr_pstrcat(pool, txn, ":TXN",
- (char *)NULL),
+ SVN_VA_NULL),
root->pool));
/* Initialize transaction-local caches in FS.
Modified: subversion/branches/fsfs-improvements/subversion/libsvn_fs_fs/util.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/libsvn_fs_fs/util.c?rev=1536949&r1=1536948&r2=1536949&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/libsvn_fs_fs/util.c (original)
+++ subversion/branches/fsfs-improvements/subversion/libsvn_fs_fs/util.c Wed Oct 30 01:04:22 2013
@@ -98,7 +98,7 @@ svn_fs_fs__path_rev_packed(svn_fs_t *fs,
apr_psprintf(pool,
"%ld" PATH_EXT_PACKED_SHARD,
rev / ffd->max_files_per_dir),
- kind, NULL);
+ kind, SVN_VA_NULL);
}
const char *
@@ -110,7 +110,7 @@ svn_fs_fs__path_rev_shard(svn_fs_t *fs,
return svn_dirent_join_many(pool, fs->path, PATH_REVS_DIR,
apr_psprintf(pool, "%ld",
rev / ffd->max_files_per_dir),
- NULL);
+ SVN_VA_NULL);
}
const char *
@@ -128,7 +128,7 @@ svn_fs_fs__path_rev(svn_fs_t *fs, svn_re
}
return svn_dirent_join_many(pool, fs->path, PATH_REVS_DIR,
- apr_psprintf(pool, "%ld", rev), NULL);
+ apr_psprintf(pool, "%ld", rev), SVN_VA_NULL);
}
const char *
@@ -155,7 +155,7 @@ svn_fs_fs__path_revprops_shard(svn_fs_t
return svn_dirent_join_many(pool, fs->path, PATH_REVPROPS_DIR,
apr_psprintf(pool, "%ld",
rev / ffd->max_files_per_dir),
- NULL);
+ SVN_VA_NULL);
}
const char *
@@ -169,7 +169,7 @@ svn_fs_fs__path_revprops_pack_shard(svn_
return svn_dirent_join_many(pool, fs->path, PATH_REVPROPS_DIR,
apr_psprintf(pool, "%ld" PATH_EXT_PACKED_SHARD,
rev / ffd->max_files_per_dir),
- NULL);
+ SVN_VA_NULL);
}
const char *
@@ -187,7 +187,7 @@ svn_fs_fs__path_revprops(svn_fs_t *fs,
}
return svn_dirent_join_many(pool, fs->path, PATH_REVPROPS_DIR,
- apr_psprintf(pool, "%ld", rev), NULL);
+ apr_psprintf(pool, "%ld", rev), SVN_VA_NULL);
}
/* Return TO_ADD appended to the C string representation of TXN_ID.
@@ -199,7 +199,7 @@ combine_txn_id_string(const svn_fs_fs__i
apr_pool_t *pool)
{
return apr_pstrcat(pool, svn_fs_fs__id_txn_unparse(txn_id, pool),
- to_add, (char *)NULL);
+ to_add, SVN_VA_NULL);
}
const char *
@@ -211,7 +211,7 @@ svn_fs_fs__path_txn_dir(svn_fs_t *fs,
return svn_dirent_join_many(pool, fs->path, PATH_TXNS_DIR,
combine_txn_id_string(txn_id, PATH_EXT_TXN,
pool),
- NULL);
+ SVN_VA_NULL);
}
const char *
@@ -224,7 +224,7 @@ svn_fs_fs__path_txn_proto_rev(svn_fs_t *
return svn_dirent_join_many(pool, fs->path, PATH_TXN_PROTOS_DIR,
combine_txn_id_string(txn_id, PATH_EXT_REV,
pool),
- NULL);
+ SVN_VA_NULL);
else
return svn_dirent_join(svn_fs_fs__path_txn_dir(fs, txn_id, pool),
PATH_REV, pool);
@@ -241,7 +241,7 @@ svn_fs_fs__path_txn_proto_rev_lock(svn_f
combine_txn_id_string(txn_id,
PATH_EXT_REV_LOCK,
pool),
- NULL);
+ SVN_VA_NULL);
else
return svn_dirent_join(svn_fs_fs__path_txn_dir(fs, txn_id, pool),
PATH_REV_LOCK, pool);
@@ -268,7 +268,7 @@ svn_fs_fs__path_txn_node_props(svn_fs_t
apr_pool_t *pool)
{
return apr_pstrcat(pool, svn_fs_fs__path_txn_node_rev(fs, id, pool),
- PATH_EXT_PROPS, (char *)NULL);
+ PATH_EXT_PROPS, SVN_VA_NULL);
}
const char *
@@ -277,7 +277,7 @@ svn_fs_fs__path_txn_node_children(svn_fs
apr_pool_t *pool)
{
return apr_pstrcat(pool, svn_fs_fs__path_txn_node_rev(fs, id, pool),
- PATH_EXT_CHILDREN, (char *)NULL);
+ PATH_EXT_CHILDREN, SVN_VA_NULL);
}
const char *
@@ -292,7 +292,7 @@ svn_fs_fs__path_node_origin(svn_fs_t *fs
buffer[len - 1] = '\0';
return svn_dirent_join_many(pool, fs->path, PATH_NODE_ORIGINS_DIR,
- buffer, NULL);
+ buffer, SVN_VA_NULL);
}
const char *
Propchange: subversion/branches/fsfs-improvements/subversion/libsvn_fs_x/
------------------------------------------------------------------------------
Merged /subversion/trunk/subversion/libsvn_fs_x:r1532580-1536946
Modified: subversion/branches/fsfs-improvements/subversion/libsvn_fs_x/caching.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/libsvn_fs_x/caching.c?rev=1536949&r1=1536948&r2=1536949&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/libsvn_fs_x/caching.c (original)
+++ subversion/branches/fsfs-improvements/subversion/libsvn_fs_x/caching.c Wed Oct 30 01:04:22 2013
@@ -379,7 +379,7 @@ svn_fs_x__initialize_caches(svn_fs_t *fs
"fsx:", fs->uuid,
"/", normalize_key_part(fs->path, pool),
":",
- (char *)NULL);
+ SVN_VA_NULL);
svn_memcache_t *memcache;
svn_membuffer_t *membuffer;
svn_boolean_t no_handler;
@@ -438,7 +438,7 @@ svn_fs_x__initialize_caches(svn_fs_t *fs
svn_fs_x__serialize_id,
svn_fs_x__deserialize_id,
sizeof(svn_revnum_t),
- apr_pstrcat(pool, prefix, "RRI", (char *)NULL),
+ apr_pstrcat(pool, prefix, "RRI", SVN_VA_NULL),
0,
fs,
no_handler,
@@ -453,7 +453,7 @@ svn_fs_x__initialize_caches(svn_fs_t *fs
svn_fs_x__dag_serialize,
svn_fs_x__dag_deserialize,
APR_HASH_KEY_STRING,
- apr_pstrcat(pool, prefix, "DAG", (char *)NULL),
+ apr_pstrcat(pool, prefix, "DAG", SVN_VA_NULL),
SVN_CACHE__MEMBUFFER_LOW_PRIORITY,
fs,
no_handler,
@@ -470,7 +470,7 @@ svn_fs_x__initialize_caches(svn_fs_t *fs
svn_fs_x__serialize_dir_entries,
svn_fs_x__deserialize_dir_entries,
sizeof(pair_cache_key_t),
- apr_pstrcat(pool, prefix, "DIR", (char *)NULL),
+ apr_pstrcat(pool, prefix, "DIR", SVN_VA_NULL),
SVN_CACHE__MEMBUFFER_LOW_PRIORITY,
fs,
no_handler,
@@ -486,7 +486,7 @@ svn_fs_x__initialize_caches(svn_fs_t *fs
svn_fs_x__deserialize_manifest,
sizeof(svn_revnum_t),
apr_pstrcat(pool, prefix, "PACK-MANIFEST",
- (char *)NULL),
+ SVN_VA_NULL),
SVN_CACHE__MEMBUFFER_HIGH_PRIORITY,
fs,
no_handler,
@@ -500,7 +500,7 @@ svn_fs_x__initialize_caches(svn_fs_t *fs
svn_fs_x__serialize_node_revision,
svn_fs_x__deserialize_node_revision,
sizeof(pair_cache_key_t),
- apr_pstrcat(pool, prefix, "NODEREVS", (char *)NULL),
+ apr_pstrcat(pool, prefix, "NODEREVS", SVN_VA_NULL),
SVN_CACHE__MEMBUFFER_HIGH_PRIORITY,
fs,
no_handler,
@@ -514,7 +514,7 @@ svn_fs_x__initialize_caches(svn_fs_t *fs
svn_fs_x__serialize_rep_header,
svn_fs_x__deserialize_rep_header,
sizeof(representation_cache_key_t),
- apr_pstrcat(pool, prefix, "REPHEADER", (char *)NULL),
+ apr_pstrcat(pool, prefix, "REPHEADER", SVN_VA_NULL),
SVN_CACHE__MEMBUFFER_HIGH_PRIORITY,
fs,
no_handler,
@@ -528,7 +528,7 @@ svn_fs_x__initialize_caches(svn_fs_t *fs
svn_fs_x__serialize_changes,
svn_fs_x__deserialize_changes,
sizeof(svn_revnum_t),
- apr_pstrcat(pool, prefix, "CHANGES", (char *)NULL),
+ apr_pstrcat(pool, prefix, "CHANGES", SVN_VA_NULL),
0,
fs,
no_handler,
@@ -544,7 +544,7 @@ svn_fs_x__initialize_caches(svn_fs_t *fs
/* Values are svn_stringbuf_t */
NULL, NULL,
sizeof(pair_cache_key_t),
- apr_pstrcat(pool, prefix, "TEXT", (char *)NULL),
+ apr_pstrcat(pool, prefix, "TEXT", SVN_VA_NULL),
SVN_CACHE__MEMBUFFER_LOW_PRIORITY,
fs,
no_handler,
@@ -558,7 +558,7 @@ svn_fs_x__initialize_caches(svn_fs_t *fs
svn_fs_x__deserialize_properties,
sizeof(pair_cache_key_t),
apr_pstrcat(pool, prefix, "PROP",
- (char *)NULL),
+ SVN_VA_NULL),
SVN_CACHE__MEMBUFFER_LOW_PRIORITY,
fs,
no_handler,
@@ -572,7 +572,7 @@ svn_fs_x__initialize_caches(svn_fs_t *fs
svn_fs_x__deserialize_mergeinfo,
APR_HASH_KEY_STRING,
apr_pstrcat(pool, prefix, "MERGEINFO",
- (char *)NULL),
+ SVN_VA_NULL),
0,
fs,
no_handler,
@@ -586,7 +586,7 @@ svn_fs_x__initialize_caches(svn_fs_t *fs
NULL, NULL,
APR_HASH_KEY_STRING,
apr_pstrcat(pool, prefix, "HAS_MERGEINFO",
- (char *)NULL),
+ SVN_VA_NULL),
0,
fs,
no_handler,
@@ -611,7 +611,7 @@ svn_fs_x__initialize_caches(svn_fs_t *fs
svn_fs_x__deserialize_properties,
sizeof(pair_cache_key_t),
apr_pstrcat(pool, prefix, "REVPROP",
- (char *)NULL),
+ SVN_VA_NULL),
SVN_CACHE__MEMBUFFER_HIGH_PRIORITY,
fs,
no_handler,
@@ -633,7 +633,7 @@ svn_fs_x__initialize_caches(svn_fs_t *fs
svn_fs_x__deserialize_txdelta_window,
sizeof(window_cache_key_t),
apr_pstrcat(pool, prefix, "TXDELTA_WINDOW",
- (char *)NULL),
+ SVN_VA_NULL),
0,
fs,
no_handler,
@@ -647,7 +647,7 @@ svn_fs_x__initialize_caches(svn_fs_t *fs
NULL, NULL,
sizeof(window_cache_key_t),
apr_pstrcat(pool, prefix, "COMBINED_WINDOW",
- (char *)NULL),
+ SVN_VA_NULL),
SVN_CACHE__MEMBUFFER_LOW_PRIORITY,
fs,
no_handler,
@@ -667,7 +667,7 @@ svn_fs_x__initialize_caches(svn_fs_t *fs
svn_fs_x__deserialize_noderevs_container,
sizeof(pair_cache_key_t),
apr_pstrcat(pool, prefix, "NODEREVSCNT",
- (char *)NULL),
+ SVN_VA_NULL),
SVN_CACHE__MEMBUFFER_HIGH_PRIORITY,
fs,
no_handler,
@@ -680,7 +680,7 @@ svn_fs_x__initialize_caches(svn_fs_t *fs
svn_fs_x__deserialize_changes_container,
sizeof(pair_cache_key_t),
apr_pstrcat(pool, prefix, "CHANGESCNT",
- (char *)NULL),
+ SVN_VA_NULL),
0,
fs,
no_handler,
@@ -693,7 +693,7 @@ svn_fs_x__initialize_caches(svn_fs_t *fs
svn_fs_x__deserialize_reps_container,
sizeof(pair_cache_key_t),
apr_pstrcat(pool, prefix, "REPSCNT",
- (char *)NULL),
+ SVN_VA_NULL),
0,
fs,
no_handler,
@@ -707,7 +707,7 @@ svn_fs_x__initialize_caches(svn_fs_t *fs
svn_fs_x__deserialize_l2p_header,
sizeof(pair_cache_key_t),
apr_pstrcat(pool, prefix, "L2P_HEADER",
- (char *)NULL),
+ SVN_VA_NULL),
SVN_CACHE__MEMBUFFER_HIGH_PRIORITY,
fs,
no_handler,
@@ -720,7 +720,7 @@ svn_fs_x__initialize_caches(svn_fs_t *fs
svn_fs_x__deserialize_l2p_page,
sizeof(svn_fs_x__page_cache_key_t),
apr_pstrcat(pool, prefix, "L2P_PAGE",
- (char *)NULL),
+ SVN_VA_NULL),
SVN_CACHE__MEMBUFFER_HIGH_PRIORITY,
fs,
no_handler,
@@ -733,7 +733,7 @@ svn_fs_x__initialize_caches(svn_fs_t *fs
svn_fs_x__deserialize_p2l_header,
sizeof(pair_cache_key_t),
apr_pstrcat(pool, prefix, "P2L_HEADER",
- (char *)NULL),
+ SVN_VA_NULL),
SVN_CACHE__MEMBUFFER_HIGH_PRIORITY,
fs,
no_handler,
@@ -746,7 +746,7 @@ svn_fs_x__initialize_caches(svn_fs_t *fs
svn_fs_x__deserialize_p2l_page,
sizeof(svn_fs_x__page_cache_key_t),
apr_pstrcat(pool, prefix, "P2L_PAGE",
- (char *)NULL),
+ SVN_VA_NULL),
SVN_CACHE__MEMBUFFER_HIGH_PRIORITY,
fs,
no_handler,
@@ -823,7 +823,7 @@ svn_fs_x__initialize_txn_caches(svn_fs_t
"/", fs->path,
":", txn_id,
":", svn_uuid_generate(pool), ":",
- (char *)NULL);
+ SVN_VA_NULL);
/* We don't support caching for concurrent transactions in the SAME
* FSX session. Maybe, you forgot to clean POOL. */
@@ -844,7 +844,7 @@ svn_fs_x__initialize_txn_caches(svn_fs_t
svn_fs_x__deserialize_dir_entries,
APR_HASH_KEY_STRING,
apr_pstrcat(pool, prefix, "TXNDIR",
- (char *)NULL),
+ SVN_VA_NULL),
0,
fs,
TRUE,
Modified: subversion/branches/fsfs-improvements/subversion/libsvn_fs_x/changes.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/libsvn_fs_x/changes.c?rev=1536949&r1=1536948&r2=1536949&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/libsvn_fs_x/changes.c (original)
+++ subversion/branches/fsfs-improvements/subversion/libsvn_fs_x/changes.c Wed Oct 30 01:04:22 2013
@@ -249,8 +249,10 @@ svn_fs_x__changes_get_list(apr_array_hea
/* validate index */
if (idx + 1 >= (apr_size_t)changes->offsets->nelts)
return svn_error_createf(SVN_ERR_FS_CONTAINER_INDEX, NULL,
- _("Changes list index %" APR_SIZE_T_FMT
- " exceeds container size %d"),
+ apr_psprintf(pool,
+ _("Changes list index %%%s"
+ " exceeds container size %%d"),
+ APR_SIZE_T_FMT),
idx, changes->offsets->nelts - 1);
/* range of changes to return */
Modified: subversion/branches/fsfs-improvements/subversion/libsvn_fs_x/fs.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/libsvn_fs_x/fs.c?rev=1536949&r1=1536948&r2=1536949&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/libsvn_fs_x/fs.c (original)
+++ subversion/branches/fsfs-improvements/subversion/libsvn_fs_x/fs.c Wed Oct 30 01:04:22 2013
@@ -82,7 +82,7 @@ x_serialized_init(svn_fs_t *fs, apr_pool
SVN_ERR_ASSERT(fs->uuid);
key = apr_pstrcat(pool, SVN_FSX_SHARED_USERDATA_PREFIX, fs->uuid,
- (char *) NULL);
+ SVN_VA_NULL);
status = apr_pool_userdata_get(&val, key, common_pool);
if (status)
return svn_error_wrap_apr(status, _("Can't fetch FSX shared data"));
Modified: subversion/branches/fsfs-improvements/subversion/libsvn_fs_x/fs_x.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/libsvn_fs_x/fs_x.c?rev=1536949&r1=1536948&r2=1536949&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/libsvn_fs_x/fs_x.c (original)
+++ subversion/branches/fsfs-improvements/subversion/libsvn_fs_x/fs_x.c Wed Oct 30 01:04:22 2013
@@ -864,7 +864,7 @@ svn_fs_x__set_uuid(svn_fs_t *fs,
uuid = svn_uuid_generate(pool);
/* Make sure we have a copy in FS->POOL, and append a newline. */
- my_uuid = apr_pstrcat(fs->pool, uuid, "\n", (char *)NULL);
+ my_uuid = apr_pstrcat(fs->pool, uuid, "\n", SVN_VA_NULL);
my_uuid_len = strlen(my_uuid);
/* We use the permissions of the 'current' file, because the 'uuid'
Modified: subversion/branches/fsfs-improvements/subversion/libsvn_fs_x/index.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/libsvn_fs_x/index.c?rev=1536949&r1=1536948&r2=1536949&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/libsvn_fs_x/index.c (original)
+++ subversion/branches/fsfs-improvements/subversion/libsvn_fs_x/index.c Wed Oct 30 01:04:22 2013
@@ -1220,13 +1220,16 @@ static svn_error_t *
l2p_page_get_offset(l2p_page_baton_t *baton,
const l2p_page_t *page,
const apr_off_t *offsets,
- const apr_uint32_t *sub_items)
+ const apr_uint32_t *sub_items,
+ apr_pool_t *pool)
{
/* overflow check */
if (page->entry_count <= baton->page_offset)
return svn_error_createf(SVN_ERR_FS_ITEM_INDEX_OVERFLOW , NULL,
- _("Item index %" APR_UINT64_T_FMT
- " too large in revision %ld"),
+ apr_psprintf(pool,
+ _("Item index %%%s too large in"
+ " revision %%ld"),
+ APR_UINT64_T_FMT),
baton->item_index, baton->revision);
/* return the result */
@@ -1254,7 +1257,7 @@ l2p_page_access_func(void **out,
= svn_temp_deserializer__ptr(page, (const void *const *)&page->sub_items);
/* return the requested data */
- return l2p_page_get_offset(baton, page, offsets, sub_items);
+ return l2p_page_get_offset(baton, page, offsets, sub_items, result_pool);
}
/* Data request structure used by l2p_page_table_access_func.
@@ -1484,7 +1487,7 @@ l2p_index_lookup(apr_off_t *offset,
/* cache the page and extract the result we need */
SVN_ERR(svn_cache__set(ffd->l2p_page_cache, &key, page, pool));
SVN_ERR(l2p_page_get_offset(&page_baton, page, page->offsets,
- page->sub_items));
+ page->sub_items, pool));
/* prefetch pages from following and preceding revisions */
pages = apr_array_make(pool, 16, sizeof(l2p_page_table_entry_t));
Modified: subversion/branches/fsfs-improvements/subversion/libsvn_fs_x/lock.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/libsvn_fs_x/lock.c?rev=1536949&r1=1536948&r2=1536949&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/libsvn_fs_x/lock.c (original)
+++ subversion/branches/fsfs-improvements/subversion/libsvn_fs_x/lock.c Wed Oct 30 01:04:22 2013
@@ -134,7 +134,7 @@ digest_path_from_digest(const char *fs_p
{
return svn_dirent_join_many(pool, fs_path, PATH_LOCKS_DIR,
apr_pstrmemdup(pool, digest, DIGEST_SUBDIR_LEN),
- digest, NULL);
+ digest, SVN_VA_NULL);
}
@@ -152,7 +152,7 @@ digest_path_from_path(const char **diges
*digest_path = svn_dirent_join_many(pool, fs_path, PATH_LOCKS_DIR,
apr_pstrmemdup(pool, digest,
DIGEST_SUBDIR_LEN),
- digest, NULL);
+ digest, SVN_VA_NULL);
return SVN_NO_ERROR;
}
@@ -959,7 +959,7 @@ svn_fs_x__generate_lock_token(const char
generate a URI that matches the DAV RFC. We could change this to
some other URI scheme someday, if we wish. */
*token = apr_pstrcat(pool, "opaquelocktoken:",
- svn_uuid_generate(pool), (char *)NULL);
+ svn_uuid_generate(pool), SVN_VA_NULL);
return SVN_NO_ERROR;
}
Modified: subversion/branches/fsfs-improvements/subversion/libsvn_fs_x/noderevs.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/libsvn_fs_x/noderevs.c?rev=1536949&r1=1536948&r2=1536949&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/libsvn_fs_x/noderevs.c (original)
+++ subversion/branches/fsfs-improvements/subversion/libsvn_fs_x/noderevs.c Wed Oct 30 01:04:22 2013
@@ -468,8 +468,10 @@ svn_fs_x__noderevs_get(node_revision_t *
/* validate index */
if (idx >= (apr_size_t)container->noderevs->nelts)
return svn_error_createf(SVN_ERR_FS_CONTAINER_INDEX, NULL,
- _("Node revision index %" APR_SIZE_T_FMT
- " exceeds container size %d"),
+ apr_psprintf(pool,
+ _("Node revision index %%%s"
+ " exceeds container size %%d"),
+ APR_SIZE_T_FMT),
idx, container->noderevs->nelts);
/* allocate result struct and fill it field by field */
@@ -720,9 +722,11 @@ read_reps(apr_array_header_t **reps_p,
bytes = svn_packed__get_bytes(digest_stream, &len);
if (len != sizeof(rep.md5_digest))
return svn_error_createf(SVN_ERR_FS_CONTAINER_INDEX, NULL,
- _("Unexpected MD5 digest size %"
- APR_SIZE_T_FMT),
- len);
+ apr_psprintf(pool,
+ _("Unexpected MD5"
+ " digest size %%%s"),
+ APR_SIZE_T_FMT),
+ len);
memcpy(rep.md5_digest, bytes, sizeof(rep.md5_digest));
if (rep.has_sha1)
@@ -730,9 +734,11 @@ read_reps(apr_array_header_t **reps_p,
bytes = svn_packed__get_bytes(digest_stream, &len);
if (len != sizeof(rep.sha1_digest))
return svn_error_createf(SVN_ERR_FS_CONTAINER_INDEX, NULL,
- _("Unexpected SHA1 digest size %"
- APR_SIZE_T_FMT),
- len);
+ apr_psprintf(pool,
+ _("Unexpected SHA1"
+ " digest size %%%s"),
+ APR_SIZE_T_FMT),
+ len);
memcpy(rep.sha1_digest, bytes, sizeof(rep.sha1_digest));
}
Modified: subversion/branches/fsfs-improvements/subversion/libsvn_fs_x/transaction.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/libsvn_fs_x/transaction.c?rev=1536949&r1=1536948&r2=1536949&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/libsvn_fs_x/transaction.c (original)
+++ subversion/branches/fsfs-improvements/subversion/libsvn_fs_x/transaction.c Wed Oct 30 01:04:22 2013
@@ -1044,8 +1044,8 @@ create_txn_dir(const char **id_p,
fs->path,
PATH_TXNS_DIR,
apr_pstrcat(pool, *id_p, PATH_EXT_TXN,
- (char *)NULL),
- NULL);
+ SVN_VA_NULL),
+ SVN_VA_NULL);
return svn_io_dir_make(txn_dir, APR_OS_DEFAULT, pool);
}
Modified: subversion/branches/fsfs-improvements/subversion/libsvn_fs_x/tree.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/libsvn_fs_x/tree.c?rev=1536949&r1=1536948&r2=1536949&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/libsvn_fs_x/tree.c (original)
+++ subversion/branches/fsfs-improvements/subversion/libsvn_fs_x/tree.c Wed Oct 30 01:04:22 2013
@@ -4293,7 +4293,7 @@ make_txn_root(svn_fs_root_t **root_p,
APR_HASH_KEY_STRING,
32, 20, FALSE,
apr_pstrcat(pool, txn, ":TXN",
- (char *)NULL),
+ SVN_VA_NULL),
root->pool));
/* Initialize transaction-local caches in FS.
Modified: subversion/branches/fsfs-improvements/subversion/libsvn_fs_x/util.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/libsvn_fs_x/util.c?rev=1536949&r1=1536948&r2=1536949&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/libsvn_fs_x/util.c (original)
+++ subversion/branches/fsfs-improvements/subversion/libsvn_fs_x/util.c Wed Oct 30 01:04:22 2013
@@ -141,7 +141,7 @@ svn_fs_x__path_rev_packed(svn_fs_t *fs,
apr_psprintf(pool,
"%ld" PATH_EXT_PACKED_SHARD,
rev / ffd->max_files_per_dir),
- kind, NULL);
+ kind, SVN_VA_NULL);
}
const char *
@@ -151,7 +151,7 @@ svn_fs_x__path_rev_shard(svn_fs_t *fs, s
return svn_dirent_join_many(pool, fs->path, PATH_REVS_DIR,
apr_psprintf(pool, "%ld",
rev / ffd->max_files_per_dir),
- NULL);
+ SVN_VA_NULL);
}
const char *
@@ -202,7 +202,7 @@ svn_fs_x__path_revprops_shard(svn_fs_t *
return svn_dirent_join_many(pool, fs->path, PATH_REVPROPS_DIR,
apr_psprintf(pool, "%ld",
rev / ffd->max_files_per_dir),
- NULL);
+ SVN_VA_NULL);
}
const char *
@@ -215,7 +215,7 @@ svn_fs_x__path_revprops_pack_shard(svn_f
return svn_dirent_join_many(pool, fs->path, PATH_REVPROPS_DIR,
apr_psprintf(pool, "%ld" PATH_EXT_PACKED_SHARD,
rev / ffd->max_files_per_dir),
- NULL);
+ SVN_VA_NULL);
}
const char *
@@ -235,7 +235,7 @@ combine_txn_id_string(const svn_fs_x__id
apr_pool_t *pool)
{
return apr_pstrcat(pool, svn_fs_x__id_txn_unparse(txn_id, pool),
- to_add, (char *)NULL);
+ to_add, SVN_VA_NULL);
}
const char *
@@ -247,7 +247,7 @@ svn_fs_x__path_txn_dir(svn_fs_t *fs,
return svn_dirent_join_many(pool, fs->path, PATH_TXNS_DIR,
combine_txn_id_string(txn_id, PATH_EXT_TXN,
pool),
- NULL);
+ SVN_VA_NULL);
}
/* Return the name of the sha1->rep mapping file in transaction TXN_ID
@@ -336,7 +336,7 @@ svn_fs_x__path_txn_proto_rev(svn_fs_t *f
return svn_dirent_join_many(pool, fs->path, PATH_TXN_PROTOS_DIR,
combine_txn_id_string(txn_id, PATH_EXT_REV,
pool),
- NULL);
+ SVN_VA_NULL);
}
const char *
@@ -348,7 +348,7 @@ svn_fs_x__path_txn_proto_rev_lock(svn_fs
combine_txn_id_string(txn_id,
PATH_EXT_REV_LOCK,
pool),
- NULL);
+ SVN_VA_NULL);
}
const char *
@@ -372,14 +372,14 @@ svn_fs_x__path_txn_node_props(svn_fs_t *
apr_pool_t *pool)
{
return apr_pstrcat(pool, svn_fs_x__path_txn_node_rev(fs, id, pool),
- PATH_EXT_PROPS, (char *)NULL);
+ PATH_EXT_PROPS, SVN_VA_NULL);
}
const char *
svn_fs_x__path_txn_node_children(svn_fs_t *fs, const svn_fs_id_t *id, apr_pool_t *pool)
{
return apr_pstrcat(pool, svn_fs_x__path_txn_node_rev(fs, id, pool),
- PATH_EXT_CHILDREN, (char *)NULL);
+ PATH_EXT_CHILDREN, SVN_VA_NULL);
}
const char *
@@ -394,7 +394,7 @@ svn_fs_x__path_node_origin(svn_fs_t *fs,
buffer[len - 1] = '\0';
return svn_dirent_join_many(pool, fs->path, PATH_NODE_ORIGINS_DIR,
- buffer, NULL);
+ buffer, SVN_VA_NULL);
}
Modified: subversion/branches/fsfs-improvements/subversion/libsvn_ra_local/ra_plugin.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/libsvn_ra_local/ra_plugin.c?rev=1536949&r1=1536948&r2=1536949&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/libsvn_ra_local/ra_plugin.c (original)
+++ subversion/branches/fsfs-improvements/subversion/libsvn_ra_local/ra_plugin.c Wed Oct 30 01:04:22 2013
@@ -240,7 +240,7 @@ reporter_link_path(void *reporter_baton,
if (relpath[0] == '\0')
fs_path = "/";
else
- fs_path = apr_pstrcat(pool, "/", relpath, (char *)NULL);
+ fs_path = apr_pstrcat(pool, "/", relpath, SVN_VA_NULL);
return svn_repos_link_path3(rbaton->report_baton, path, fs_path, revision,
depth, start_empty, lock_token, pool);
@@ -327,7 +327,7 @@ make_reporter(svn_ra_session_t *session,
"'%s'"), other_url, sess->repos_url);
other_fs_path = apr_pstrcat(scratch_pool, "/", other_relpath,
- (char *)NULL);
+ SVN_VA_NULL);
}
/* Pass back our reporter */
@@ -604,7 +604,7 @@ svn_ra_local__open(svn_ra_session_t *ses
if (client_string)
sess->useragent = apr_pstrcat(pool, USER_AGENT " ",
- client_string, (char *)NULL);
+ client_string, SVN_VA_NULL);
else
sess->useragent = USER_AGENT;
Modified: subversion/branches/fsfs-improvements/subversion/libsvn_ra_serf/commit.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/libsvn_ra_serf/commit.c?rev=1536949&r1=1536948&r2=1536949&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/libsvn_ra_serf/commit.c (original)
+++ subversion/branches/fsfs-improvements/subversion/libsvn_ra_serf/commit.c Wed Oct 30 01:04:22 2013
@@ -726,9 +726,9 @@ proppatch_walker(void *baton,
/* Use the namespace prefix instead of adding the xmlns attribute to support
property names containing ':' */
if (strcmp(ns, SVN_DAV_PROP_NS_SVN) == 0)
- prop_name = apr_pstrcat(wb->body_pool, "S:", name, (char *)NULL);
+ prop_name = apr_pstrcat(wb->body_pool, "S:", name, SVN_VA_NULL);
else if (strcmp(ns, SVN_DAV_PROP_NS_CUSTOM) == 0)
- prop_name = apr_pstrcat(wb->body_pool, "C:", name, (char *)NULL);
+ prop_name = apr_pstrcat(wb->body_pool, "C:", name, SVN_VA_NULL);
if (cdata_bkt)
svn_ra_serf__add_open_tag_buckets(body_bkt, alloc, prop_name,
@@ -824,7 +824,7 @@ maybe_set_lock_token_header(serf_bucket_
token_uri = apr_uri_unparse(pool, &uri, 0);
token_header = apr_pstrcat(pool, "<", token_uri, "> (<", token, ">)",
- (char *)NULL);
+ SVN_VA_NULL);
serf_bucket_headers_set(headers, "If", token_header);
}
}
@@ -1132,7 +1132,7 @@ setup_delete_headers(serf_bucket_t *head
const char *token_header;
token_header = apr_pstrcat(pool, "<", ctx->path, "> (<",
- ctx->lock_token, ">)", (char *)NULL);
+ ctx->lock_token, ">)", SVN_VA_NULL);
serf_bucket_headers_set(headers, "If", token_header);
@@ -1933,18 +1933,11 @@ add_file(const char *path,
if (handler->sline.code != 404)
{
- if (handler->sline.code != 200)
- {
- svn_error_t *err;
-
- err = svn_ra_serf__error_on_status(handler->sline,
- handler->path,
- handler->location);
-
- SVN_ERR(err);
- }
+ SVN_ERR(svn_ra_serf__error_on_status(handler->sline,
+ handler->path,
+ handler->location));
- return svn_error_createf(SVN_ERR_FS_ALREADY_EXISTS, NULL,
+ return svn_error_createf(SVN_ERR_FS_ALREADY_EXISTS, NULL,
_("File '%s' already exists"), path);
}
}
Modified: subversion/branches/fsfs-improvements/subversion/libsvn_ra_serf/getlocks.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/libsvn_ra_serf/getlocks.c?rev=1536949&r1=1536948&r2=1536949&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/libsvn_ra_serf/getlocks.c (original)
+++ subversion/branches/fsfs-improvements/subversion/libsvn_ra_serf/getlocks.c Wed Oct 30 01:04:22 2013
@@ -241,7 +241,7 @@ svn_ra_serf__get_locks(svn_ra_session_t
lock_ctx = apr_pcalloc(pool, sizeof(*lock_ctx));
lock_ctx->pool = pool;
- lock_ctx->path = apr_pstrcat(pool, "/", rel_path, (char *)NULL);
+ lock_ctx->path = apr_pstrcat(pool, "/", rel_path, SVN_VA_NULL);
lock_ctx->requested_depth = depth;
lock_ctx->hash = apr_hash_make(pool);
Modified: subversion/branches/fsfs-improvements/subversion/libsvn_ra_serf/locks.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/libsvn_ra_serf/locks.c?rev=1536949&r1=1536948&r2=1536949&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/libsvn_ra_serf/locks.c (original)
+++ subversion/branches/fsfs-improvements/subversion/libsvn_ra_serf/locks.c Wed Oct 30 01:04:22 2013
@@ -602,7 +602,7 @@ svn_ra_serf__unlock(svn_ra_session_t *ra
}
unlock_ctx.force = force;
- unlock_ctx.token = apr_pstrcat(iterpool, "<", token, ">", (char *)NULL);
+ unlock_ctx.token = apr_pstrcat(iterpool, "<", token, ">", SVN_VA_NULL);
req_url = svn_path_url_add_component2(session->session_url.path, path,
iterpool);
Modified: subversion/branches/fsfs-improvements/subversion/libsvn_ra_serf/log.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/libsvn_ra_serf/log.c?rev=1536949&r1=1536948&r2=1536949&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/libsvn_ra_serf/log.c (original)
+++ subversion/branches/fsfs-improvements/subversion/libsvn_ra_serf/log.c Wed Oct 30 01:04:22 2013
@@ -60,6 +60,8 @@ enum log_state_e {
HAS_CHILDREN,
ADDED_PATH,
REPLACED_PATH,
+ MOVED_PATH,
+ MOVE_REPLACED_PATH,
DELETED_PATH,
MODIFIED_PATH,
SUBTRACTIVE_MERGE
@@ -137,6 +139,14 @@ static const svn_ra_serf__xml_transition
TRUE, { "?node-kind", "?text-mods", "?prop-mods",
"?copyfrom-path", "?copyfrom-rev", NULL }, TRUE },
+ { ITEM, S_, "moved-path", MOVED_PATH,
+ TRUE, { "?node-kind", "?text-mods", "?prop-mods",
+ "?copyfrom-path", "?copyfrom-rev", NULL }, TRUE },
+
+ { ITEM, S_, "replaced-by-moved-path", MOVE_REPLACED_PATH,
+ TRUE, { "?node-kind", "?text-mods", "?prop-mods",
+ "?copyfrom-path", "?copyfrom-rev", NULL }, TRUE },
+
{ ITEM, S_, "deleted-path", DELETED_PATH,
TRUE, { "?node-kind", "?text-mods", "?prop-mods", NULL }, TRUE },
@@ -384,6 +394,10 @@ log_closed(svn_ra_serf__xml_estate_t *xe
action = 'A';
else if (leaving_state == REPLACED_PATH)
action = 'R';
+ else if (leaving_state == MOVED_PATH)
+ action = 'V';
+ else if (leaving_state == MOVE_REPLACED_PATH)
+ action = 'E';
else if (leaving_state == DELETED_PATH)
action = 'D';
else
Modified: subversion/branches/fsfs-improvements/subversion/libsvn_ra_serf/property.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/libsvn_ra_serf/property.c?rev=1536949&r1=1536948&r2=1536949&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/libsvn_ra_serf/property.c (original)
+++ subversion/branches/fsfs-improvements/subversion/libsvn_ra_serf/property.c Wed Oct 30 01:04:22 2013
@@ -838,10 +838,10 @@ svn_ra_serf__svnname_from_wirename(const
return apr_pstrdup(result_pool, name);
if (strcmp(ns, SVN_DAV_PROP_NS_SVN) == 0)
- return apr_pstrcat(result_pool, SVN_PROP_PREFIX, name, (char *)NULL);
+ return apr_pstrcat(result_pool, SVN_PROP_PREFIX, name, SVN_VA_NULL);
if (strcmp(ns, SVN_PROP_PREFIX) == 0)
- return apr_pstrcat(result_pool, SVN_PROP_PREFIX, name, (char *)NULL);
+ return apr_pstrcat(result_pool, SVN_PROP_PREFIX, name, SVN_VA_NULL);
if (strcmp(name, SVN_DAV__VERSION_NAME) == 0)
return SVN_PROP_ENTRY_COMMITTED_REV;
@@ -869,7 +869,7 @@ svn_ra_serf__svnname_from_wirename(const
}
/* An unknown namespace, must be a custom property. */
- return apr_pstrcat(result_pool, ns, name, (char *)NULL);
+ return apr_pstrcat(result_pool, ns, name, SVN_VA_NULL);
}
@@ -928,9 +928,9 @@ select_revprops(void *baton,
if (strcmp(ns, SVN_DAV_PROP_NS_CUSTOM) == 0)
prop_name = name;
else if (strcmp(ns, SVN_DAV_PROP_NS_SVN) == 0)
- prop_name = apr_pstrcat(result_pool, SVN_PROP_PREFIX, name, (char *)NULL);
+ prop_name = apr_pstrcat(result_pool, SVN_PROP_PREFIX, name, SVN_VA_NULL);
else if (strcmp(ns, SVN_PROP_PREFIX) == 0)
- prop_name = apr_pstrcat(result_pool, SVN_PROP_PREFIX, name, (char *)NULL);
+ prop_name = apr_pstrcat(result_pool, SVN_PROP_PREFIX, name, SVN_VA_NULL);
else if (strcmp(ns, "") == 0)
prop_name = name;
else
Modified: subversion/branches/fsfs-improvements/subversion/libsvn_ra_serf/serf.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/libsvn_ra_serf/serf.c?rev=1536949&r1=1536948&r2=1536949&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/libsvn_ra_serf/serf.c (original)
+++ subversion/branches/fsfs-improvements/subversion/libsvn_ra_serf/serf.c Wed Oct 30 01:04:22 2013
@@ -511,7 +511,7 @@ svn_ra_serf__open(svn_ra_session_t *sess
if (client_string)
serf_sess->useragent = apr_pstrcat(pool, get_user_agent_string(pool), " ",
- client_string, (char *)NULL);
+ client_string, SVN_VA_NULL);
else
serf_sess->useragent = get_user_agent_string(pool);
Modified: subversion/branches/fsfs-improvements/subversion/libsvn_ra_serf/update.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/libsvn_ra_serf/update.c?rev=1536949&r1=1536948&r2=1536949&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/libsvn_ra_serf/update.c (original)
+++ subversion/branches/fsfs-improvements/subversion/libsvn_ra_serf/update.c Wed Oct 30 01:04:22 2013
@@ -2700,7 +2700,7 @@ link_path(void *report_baton,
SVN_ERR(svn_ra_serf__get_relative_path(&link, uri.path, report->sess,
NULL, pool));
- link = apr_pstrcat(pool, "/", link, (char *)NULL);
+ link = apr_pstrcat(pool, "/", link, SVN_VA_NULL);
svn_xml_make_open_tag(&buf, pool, svn_xml_protect_pcdata, "S:entry",
"rev", apr_ltoa(pool, revision),