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/08/09 16:56:48 UTC
svn commit: r1512328 - in /subversion/branches/log-addressing: ./
subversion/bindings/javahl/tests/org/apache/subversion/javahl/
subversion/include/ subversion/include/private/ subversion/libsvn_fs_fs/
subversion/libsvn_fs_x/ subversion/libsvn_ra_serf/...
Author: stefan2
Date: Fri Aug 9 14:56:47 2013
New Revision: 1512328
URL: http://svn.apache.org/r1512328
Log:
On the log-addressing branch: sync with the parent branch up to rev r1512323.
There were no conflicts.
Added:
subversion/branches/log-addressing/tools/dist/nominate.pl
- copied unchanged from r1512323, subversion/branches/fsfs-improvements/tools/dist/nominate.pl
Modified:
subversion/branches/log-addressing/ (props changed)
subversion/branches/log-addressing/subversion/bindings/javahl/tests/org/apache/subversion/javahl/SVNRemoteTests.java
subversion/branches/log-addressing/subversion/include/private/svn_utf_private.h
subversion/branches/log-addressing/subversion/include/svn_config.h
subversion/branches/log-addressing/subversion/libsvn_fs_fs/hotcopy.c
subversion/branches/log-addressing/subversion/libsvn_fs_x/ (props changed)
subversion/branches/log-addressing/subversion/libsvn_ra_serf/commit.c
subversion/branches/log-addressing/subversion/libsvn_subr/packed_data.c
subversion/branches/log-addressing/subversion/libsvn_subr/utf.c
subversion/branches/log-addressing/subversion/libsvn_subr/utf8proc.c
subversion/branches/log-addressing/subversion/libsvn_wc/wc.h
subversion/branches/log-addressing/subversion/mod_authz_svn/mod_authz_svn.c
subversion/branches/log-addressing/subversion/po/sv.po
subversion/branches/log-addressing/subversion/svnadmin/svnadmin.c
subversion/branches/log-addressing/subversion/svnauth/ (props changed)
subversion/branches/log-addressing/subversion/svnmucc/svnmucc.c
subversion/branches/log-addressing/subversion/svnserve/serve.c
subversion/branches/log-addressing/subversion/svnserve/server.h
subversion/branches/log-addressing/subversion/tests/cmdline/davautocheck.sh
subversion/branches/log-addressing/subversion/tests/cmdline/merge_tests.py
subversion/branches/log-addressing/subversion/tests/cmdline/svnadmin_tests.py
subversion/branches/log-addressing/subversion/tests/libsvn_fs_fs/ (props changed)
subversion/branches/log-addressing/subversion/tests/libsvn_fs_x/ (props changed)
subversion/branches/log-addressing/subversion/tests/libsvn_fs_x/fs-x-pack-test.c
subversion/branches/log-addressing/subversion/tests/libsvn_subr/utf-test.c
subversion/branches/log-addressing/tools/client-side/svn-bench/svn-bench.c
subversion/branches/log-addressing/tools/dev/svnraisetreeconflict/svnraisetreeconflict.c
subversion/branches/log-addressing/tools/dev/unix-build/Makefile.svn
subversion/branches/log-addressing/tools/dist/backport.pl
subversion/branches/log-addressing/tools/server-side/svn-rep-sharing-stats.c
subversion/branches/log-addressing/tools/server-side/svnauthz.c
Propchange: subversion/branches/log-addressing/
------------------------------------------------------------------------------
Merged /subversion/branches/fsfs-improvements:r1511150-1512323
Merged /subversion/trunk:r1511146-1512319
Modified: subversion/branches/log-addressing/subversion/bindings/javahl/tests/org/apache/subversion/javahl/SVNRemoteTests.java
URL: http://svn.apache.org/viewvc/subversion/branches/log-addressing/subversion/bindings/javahl/tests/org/apache/subversion/javahl/SVNRemoteTests.java?rev=1512328&r1=1512327&r2=1512328&view=diff
==============================================================================
--- subversion/branches/log-addressing/subversion/bindings/javahl/tests/org/apache/subversion/javahl/SVNRemoteTests.java (original)
+++ subversion/branches/log-addressing/subversion/bindings/javahl/tests/org/apache/subversion/javahl/SVNRemoteTests.java Fri Aug 9 14:56:47 2013
@@ -1134,7 +1134,7 @@ public class SVNRemoteTests extends SVNT
ISVNRemote session = getSession();
List<ISVNRemote.FileRevision> result =
- session.getFileRevisions("iota", 0, 1, false);
+ session.getFileRevisions("iota", 0, 1, true);
assertEquals(1, result.size());
ISVNRemote.FileRevision rev = result.get(0);
assertEquals("/iota", rev.getPath());
Modified: subversion/branches/log-addressing/subversion/include/private/svn_utf_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/log-addressing/subversion/include/private/svn_utf_private.h?rev=1512328&r1=1512327&r2=1512328&view=diff
==============================================================================
--- subversion/branches/log-addressing/subversion/include/private/svn_utf_private.h (original)
+++ subversion/branches/log-addressing/subversion/include/private/svn_utf_private.h Fri Aug 9 14:56:47 2013
@@ -73,6 +73,18 @@ svn_utf__last_valid(const char *src, apr
const char *
svn_utf__last_valid2(const char *src, apr_size_t len);
+/* Copy LENGTH bytes of SRC, converting characters as follows:
+ - Pass characters from the ASCII subset to the result
+ - Strip all combining marks from the string
+ - Represent other valid Unicode chars as {U+XXXX}
+ - Replace invalid Unicode chars with {U?XXXX}
+ - Represent chars that are not valid UTF-8 as ?\XX
+ - Replace codes outside the Unicode range with a sequence of ?\XX
+ - Represent the null byte as \0
+ Allocate the result in POOL. */
+const char *
+svn_utf__fuzzy_escape(const char *src, apr_size_t length, apr_pool_t *pool);
+
const char *
svn_utf__cstring_from_utf8_fuzzy(const char *src,
apr_pool_t *pool,
@@ -100,6 +112,14 @@ svn_utf__normcmp(int *result,
const char *str2, apr_size_t len2,
svn_membuf_t *buf1, svn_membuf_t *buf2);
+/* Check if STRING is a valid, NFC-normalized UTF-8 string. Note that
+ * a FALSE return value may indicate that STRING is not valid UTF-8 at
+ * all.
+ *
+ * Use SCRATCH_POOL for temporary allocations.
+ */
+svn_boolean_t
+svn_utf__is_normalized(const char *string, apr_pool_t *scratch_pool);
/* Pattern matching similar to the the SQLite LIKE and GLOB
* operators. PATTERN, KEY and ESCAPE must all point to UTF-8
Modified: subversion/branches/log-addressing/subversion/include/svn_config.h
URL: http://svn.apache.org/viewvc/subversion/branches/log-addressing/subversion/include/svn_config.h?rev=1512328&r1=1512327&r2=1512328&view=diff
==============================================================================
--- subversion/branches/log-addressing/subversion/include/svn_config.h (original)
+++ subversion/branches/log-addressing/subversion/include/svn_config.h Fri Aug 9 14:56:47 2013
@@ -172,10 +172,12 @@ typedef struct svn_config_t svn_config_t
/* We want this to be printed on two lines in the generated config file,
* but we don't want the # character to end up in the variable.
*/
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
#define SVN_CONFIG__DEFAULT_GLOBAL_IGNORES_LINE_1 \
"*.o *.lo *.la *.al .libs *.so *.so.[0-9]* *.a *.pyc *.pyo __pycache__"
#define SVN_CONFIG__DEFAULT_GLOBAL_IGNORES_LINE_2 \
"*.rej *~ #*# .#* .*.swp .DS_Store"
+#endif
#define SVN_CONFIG_DEFAULT_GLOBAL_IGNORES \
SVN_CONFIG__DEFAULT_GLOBAL_IGNORES_LINE_1 " " \
Modified: subversion/branches/log-addressing/subversion/libsvn_fs_fs/hotcopy.c
URL: http://svn.apache.org/viewvc/subversion/branches/log-addressing/subversion/libsvn_fs_fs/hotcopy.c?rev=1512328&r1=1512327&r2=1512328&view=diff
==============================================================================
--- subversion/branches/log-addressing/subversion/libsvn_fs_fs/hotcopy.c (original)
+++ subversion/branches/log-addressing/subversion/libsvn_fs_fs/hotcopy.c Fri Aug 9 14:56:47 2013
@@ -380,26 +380,23 @@ hotcopy_update_current(svn_revnum_t *dst
}
-/* Remove revisions between START_REV (inclusive) and END_REV (non-inclusive)
- * from DST_FS. Assume sharding as per MAX_FILES_PER_DIR.
+/* Remove revision or revprop files between START_REV (inclusive) and
+ * END_REV (non-inclusive) from folder DST_SUBDIR in DST_FS. Assume
+ * sharding as per MAX_FILES_PER_DIR.
* Use SCRATCH_POOL for temporary allocations. */
static svn_error_t *
-hotcopy_remove_rev_files(svn_fs_t *dst_fs,
- svn_revnum_t start_rev,
- svn_revnum_t end_rev,
- int max_files_per_dir,
- apr_pool_t *scratch_pool)
+hotcopy_remove_files(svn_fs_t *dst_fs,
+ const char *dst_subdir,
+ svn_revnum_t start_rev,
+ svn_revnum_t end_rev,
+ int max_files_per_dir,
+ apr_pool_t *scratch_pool)
{
- const char *dst_subdir;
const char *shard;
const char *dst_subdir_shard;
svn_revnum_t rev;
apr_pool_t *iterpool;
- SVN_ERR_ASSERT(start_rev <= end_rev);
-
- dst_subdir = svn_dirent_join(dst_fs->path, PATH_REVS_DIR, scratch_pool);
-
/* Pre-compute paths for initial shard. */
shard = apr_psprintf(scratch_pool, "%ld", start_rev / max_files_per_dir);
dst_subdir_shard = svn_dirent_join(dst_subdir, shard, scratch_pool);
@@ -407,8 +404,7 @@ hotcopy_remove_rev_files(svn_fs_t *dst_f
iterpool = svn_pool_create(scratch_pool);
for (rev = start_rev; rev < end_rev; rev++)
{
- const char *rev_path;
-
+ const char *path;
svn_pool_clear(iterpool);
/* If necessary, update paths for shard. */
@@ -418,19 +414,66 @@ hotcopy_remove_rev_files(svn_fs_t *dst_f
dst_subdir_shard = svn_dirent_join(dst_subdir, shard, scratch_pool);
}
- rev_path = svn_dirent_join(dst_subdir_shard,
- apr_psprintf(iterpool, "%ld", rev),
- iterpool);
+ /* remove files for REV */
+ path = svn_dirent_join(dst_subdir_shard,
+ apr_psprintf(iterpool, "%ld", rev),
+ iterpool);
/* Make the rev file writable and remove it. */
- SVN_ERR(svn_io_set_file_read_write(rev_path, TRUE, iterpool));
- SVN_ERR(svn_io_remove_file2(rev_path, TRUE, iterpool));
+ SVN_ERR(svn_io_set_file_read_write(path, TRUE, iterpool));
+ SVN_ERR(svn_io_remove_file2(path, TRUE, iterpool));
}
+
svn_pool_destroy(iterpool);
return SVN_NO_ERROR;
}
+/* Remove revisions between START_REV (inclusive) and END_REV (non-inclusive)
+ * from DST_FS. Assume sharding as per MAX_FILES_PER_DIR.
+ * Use SCRATCH_POOL for temporary allocations. */
+static svn_error_t *
+hotcopy_remove_rev_files(svn_fs_t *dst_fs,
+ svn_revnum_t start_rev,
+ svn_revnum_t end_rev,
+ int max_files_per_dir,
+ apr_pool_t *scratch_pool)
+{
+ SVN_ERR_ASSERT(start_rev <= end_rev);
+ SVN_ERR(hotcopy_remove_files(dst_fs,
+ svn_dirent_join(dst_fs->path,
+ PATH_REVS_DIR,
+ scratch_pool),
+ start_rev, end_rev,
+ max_files_per_dir, scratch_pool));
+
+ return SVN_NO_ERROR;
+}
+
+/* Remove revision properties between START_REV (inclusive) and END_REV
+ * (non-inclusive) from DST_FS. Assume sharding as per MAX_FILES_PER_DIR.
+ * Use SCRATCH_POOL for temporary allocations. Revision 0 revprops will
+ * not be deleted. */
+static svn_error_t *
+hotcopy_remove_revprop_files(svn_fs_t *dst_fs,
+ svn_revnum_t start_rev,
+ svn_revnum_t end_rev,
+ int max_files_per_dir,
+ apr_pool_t *scratch_pool)
+{
+ SVN_ERR_ASSERT(start_rev <= end_rev);
+
+ /* don't delete rev 0 props */
+ SVN_ERR(hotcopy_remove_files(dst_fs,
+ svn_dirent_join(dst_fs->path,
+ PATH_REVPROPS_DIR,
+ scratch_pool),
+ start_rev ? start_rev : 1, end_rev,
+ max_files_per_dir, scratch_pool));
+
+ return SVN_NO_ERROR;
+}
+
/* Verify that DST_FS is a suitable destination for an incremental
* hotcopy from SRC_FS. */
static svn_error_t *
@@ -467,6 +510,27 @@ hotcopy_incremental_check_preconditions(
return SVN_NO_ERROR;
}
+/* Remove folder PATH. Ignore errors due to the sub-tree not being empty.
+ * CANCEL_FUNC and CANCEL_BATON do the usual thing.
+ * Use POOL for temporary allocations.
+ */
+static svn_error_t *
+remove_folder(const char *path,
+ svn_cancel_func_t cancel_func,
+ void *cancel_baton,
+ apr_pool_t *pool)
+{
+ svn_error_t *err = svn_io_remove_dir2(path, TRUE,
+ cancel_func, cancel_baton, pool);
+
+ if (err && APR_STATUS_IS_ENOTEMPTY(err->apr_err))
+ {
+ svn_error_clear(err);
+ err = SVN_NO_ERROR;
+ }
+
+ return svn_error_trace(err);
+}
/* Baton for hotcopy_body(). */
struct hotcopy_body_baton {
@@ -646,8 +710,6 @@ hotcopy_body(void *baton, apr_pool_t *po
/* First, copy packed shards. */
for (rev = 0; rev < src_min_unpacked_rev; rev += max_files_per_dir)
{
- svn_error_t *err;
-
svn_pool_clear(iterpool);
if (cancel_func)
@@ -667,21 +729,23 @@ hotcopy_body(void *baton, apr_pool_t *po
/* Remove revision files which are now packed. */
if (incremental)
- SVN_ERR(hotcopy_remove_rev_files(dst_fs, rev, rev + max_files_per_dir,
- max_files_per_dir, iterpool));
+ {
+ SVN_ERR(hotcopy_remove_rev_files(dst_fs, rev,
+ rev + max_files_per_dir,
+ max_files_per_dir, iterpool));
+ SVN_ERR(hotcopy_remove_revprop_files(dst_fs, rev,
+ rev + max_files_per_dir,
+ max_files_per_dir, iterpool));
+ }
/* Now that all revisions have moved into the pack, the original
* rev dir can be removed. */
- err = svn_io_remove_dir2(svn_fs_fs__path_rev_shard(dst_fs, rev,
- iterpool),
- TRUE, cancel_func, cancel_baton, iterpool);
- if (err)
- {
- if (APR_STATUS_IS_ENOTEMPTY(err->apr_err))
- svn_error_clear(err);
- else
- return svn_error_trace(err);
- }
+ SVN_ERR(remove_folder(svn_fs_fs__path_rev_shard(dst_fs, rev, iterpool),
+ cancel_func, cancel_baton, iterpool));
+ if (rev > 0)
+ SVN_ERR(remove_folder(svn_fs_fs__path_revprops_shard(dst_fs, rev,
+ iterpool),
+ cancel_func, cancel_baton, iterpool));
}
if (cancel_func)
Propchange: subversion/branches/log-addressing/subversion/libsvn_fs_x/
------------------------------------------------------------------------------
Reverse-merged /subversion/branches/fsx/subversion/libsvn_fs_x:r1508041-1509914
Reverse-merged /subversion/trunk/subversion/libsvn_fs_x:r1509915-1509916
Reverse-merged /subversion/branches/fsfs-format7/subversion/libsvn_fs_x:r1498103,1498155,1500054,1507729-1507732,1507735-1507736
Merged /subversion/trunk/subversion/libsvn_fs_x:r1511146-1512319
Merged /subversion/branches/fsfs-improvements/subversion/libsvn_fs_x:r1511150-1512323
Modified: subversion/branches/log-addressing/subversion/libsvn_ra_serf/commit.c
URL: http://svn.apache.org/viewvc/subversion/branches/log-addressing/subversion/libsvn_ra_serf/commit.c?rev=1512328&r1=1512327&r2=1512328&view=diff
==============================================================================
--- subversion/branches/log-addressing/subversion/libsvn_ra_serf/commit.c (original)
+++ subversion/branches/log-addressing/subversion/libsvn_ra_serf/commit.c Fri Aug 9 14:56:47 2013
@@ -382,7 +382,7 @@ checkout_dir(dir_context_t *dir,
apr_pool_t *scratch_pool)
{
svn_error_t *err;
- dir_context_t *p_dir = dir;
+ dir_context_t *c_dir = dir;
const char *checkout_url;
const char **working;
@@ -393,28 +393,25 @@ checkout_dir(dir_context_t *dir,
/* Is this directory or one of our parent dirs newly added?
* If so, we're already implicitly checked out. */
- while (p_dir)
+ while (c_dir)
{
- if (p_dir->added)
+ if (c_dir->added)
{
- /* Calculate how much of the relpath to skip to compose the
- * working_url. If the relpath is an empty string then the parent
- * is the root of the commit and we need to just add the entire
- * relpath to the parent's working_url. Otherwise we need to skip
- * the strlen(parent->relpath) + 1 to account for the slash.
- * It is safe to assume that every added directory has a parent. */
- dir_context_t *parent = p_dir->parent_dir;
- size_t skip = strlen(parent->relpath);
- if (skip)
- skip++;
+ /* Calculate the working_url by skipping the shared ancestor between
+ * the c_dir_parent->relpath and dir->relpath. This is safe since an
+ * add is guaranteed to have a parent that is checked out. */
+ dir_context_t *c_dir_parent = c_dir->parent_dir;
+ const char *relpath = svn_relpath_skip_ancestor(c_dir_parent->relpath,
+ dir->relpath);
/* Implicitly checkout this dir now. */
+ SVN_ERR_ASSERT(c_dir_parent->working_url);
dir->working_url = svn_path_url_add_component2(
- parent->working_url,
- dir->relpath + skip, dir->pool);
+ c_dir_parent->working_url,
+ relpath, dir->pool);
return SVN_NO_ERROR;
}
- p_dir = p_dir->parent_dir;
+ c_dir = c_dir->parent_dir;
}
/* We could be called twice for the root: once to checkout the baseline;
@@ -555,6 +552,7 @@ checkout_file(file_context_t *file,
if (parent_dir->added)
{
/* Implicitly checkout this file now. */
+ SVN_ERR_ASSERT(parent_dir->working_url);
file->working_url = svn_path_url_add_component2(
parent_dir->working_url,
svn_relpath_skip_ancestor(
Modified: subversion/branches/log-addressing/subversion/libsvn_subr/packed_data.c
URL: http://svn.apache.org/viewvc/subversion/branches/log-addressing/subversion/libsvn_subr/packed_data.c?rev=1512328&r1=1512327&r2=1512328&view=diff
==============================================================================
--- subversion/branches/log-addressing/subversion/libsvn_subr/packed_data.c (original)
+++ subversion/branches/log-addressing/subversion/libsvn_subr/packed_data.c Fri Aug 9 14:56:47 2013
@@ -907,12 +907,15 @@ read_byte_stream_structure(svn_stringbuf
svn_packed__byte_stream_t *stream,
svn_packed__int_stream_t *first_int_stream)
{
- /* read parameters from the TREE_STRUCT buffer */
- apr_size_t dummy = (apr_size_t)read_packed_uint(tree_struct);
- apr_size_t lengths_stream_index = (apr_size_t)read_packed_uint(tree_struct);
- apr_size_t packed_size = (apr_size_t)read_packed_uint(tree_struct);
+ apr_size_t lengths_stream_index;
+ apr_size_t packed_size;
apr_size_t i;
+ /* read parameters from the TREE_STRUCT buffer */
+ (void) (apr_size_t)read_packed_uint(tree_struct); /* discard first uint */
+ lengths_stream_index = (apr_size_t)read_packed_uint(tree_struct);
+ packed_size = (apr_size_t)read_packed_uint(tree_struct);
+
/* allocate byte sequence buffer size */
svn_stringbuf_ensure(stream->packed, packed_size);
stream->packed->len = packed_size;
Modified: subversion/branches/log-addressing/subversion/libsvn_subr/utf.c
URL: http://svn.apache.org/viewvc/subversion/branches/log-addressing/subversion/libsvn_subr/utf.c?rev=1512328&r1=1512327&r2=1512328&view=diff
==============================================================================
--- subversion/branches/log-addressing/subversion/libsvn_subr/utf.c (original)
+++ subversion/branches/log-addressing/subversion/libsvn_subr/utf.c Fri Aug 9 14:56:47 2013
@@ -480,58 +480,6 @@ get_uton_xlate_handle_node(xlate_handle_
}
-/* Copy LEN bytes of SRC, converting non-ASCII and zero bytes to ?\nnn
- sequences, allocating the result in POOL. */
-static const char *
-fuzzy_escape(const char *src, apr_size_t len, apr_pool_t *pool)
-{
- const char *src_orig = src, *src_end = src + len;
- apr_size_t new_len = 0;
- char *new;
- const char *new_orig;
-
- /* First count how big a dest string we'll need. */
- while (src < src_end)
- {
- if (! svn_ctype_isascii(*src) || *src == '\0')
- new_len += 5; /* 5 slots, for "?\XXX" */
- else
- new_len += 1; /* one slot for the 7-bit char */
-
- src++;
- }
-
- /* Allocate that amount, plus one slot for '\0' character. */
- new = apr_palloc(pool, new_len + 1);
-
- new_orig = new;
-
- /* And fill it up. */
- while (src_orig < src_end)
- {
- if (! svn_ctype_isascii(*src_orig) || src_orig == '\0')
- {
- /* This is the same format as svn_xml_fuzzy_escape uses, but that
- function escapes different characters. Please keep in sync!
- ### If we add another fuzzy escape somewhere, we should abstract
- ### this out to a common function. */
- apr_snprintf(new, 6, "?\\%03u", (unsigned char) *src_orig);
- new += 5;
- }
- else
- {
- *new = *src_orig;
- new += 1;
- }
-
- src_orig++;
- }
-
- *new = '\0';
-
- return new_orig;
-}
-
/* Convert SRC_LENGTH bytes of SRC_DATA in NODE->handle, store the result
in *DEST, which is allocated in POOL. */
static svn_error_t *
@@ -609,8 +557,8 @@ convert_to_stringbuf(xlate_handle_node_t
(pool, _("Can't convert string from '%s' to '%s':"),
node->frompage, node->topage);
- err = svn_error_create(apr_err, NULL, fuzzy_escape(src_data,
- src_length, pool));
+ err = svn_error_create(
+ apr_err, NULL, svn_utf__fuzzy_escape(src_data, src_length, pool));
return svn_error_create(apr_err, err, errstr);
}
/* Else, exited due to success. Trim the result buffer down to the
@@ -1007,7 +955,7 @@ svn_utf__cstring_from_utf8_fuzzy(const c
const char *escaped, *converted;
svn_error_t *err;
- escaped = fuzzy_escape(src, strlen(src), pool);
+ escaped = svn_utf__fuzzy_escape(src, strlen(src), pool);
/* Okay, now we have a *new* UTF-8 string, one that's guaranteed to
contain only 7-bit bytes :-). Recode to native... */
Modified: subversion/branches/log-addressing/subversion/libsvn_subr/utf8proc.c
URL: http://svn.apache.org/viewvc/subversion/branches/log-addressing/subversion/libsvn_subr/utf8proc.c?rev=1512328&r1=1512327&r2=1512328&view=diff
==============================================================================
--- subversion/branches/log-addressing/subversion/libsvn_subr/utf8proc.c (original)
+++ subversion/branches/log-addressing/subversion/libsvn_subr/utf8proc.c Fri Aug 9 14:56:47 2013
@@ -37,7 +37,6 @@
const char *svn_utf__utf8proc_version(void)
{
/* Unused static function warning removal hack. */
- UNUSED(utf8proc_codepoint_valid);
UNUSED(utf8proc_NFD);
UNUSED(utf8proc_NFC);
UNUSED(utf8proc_NFKD);
@@ -48,19 +47,21 @@ const char *svn_utf__utf8proc_version(vo
-/* Fill the given BUFFER with an NFD UCS-4 representation of the UTF-8
- * STRING. If LENGTH is SVN_UTF__UNKNOWN_LENGTH, assume STRING is
- * NUL-terminated; otherwise look only at the first LENGTH bytes in
+/* Fill the given BUFFER with decomposed UCS-4 representation of the
+ * UTF-8 STRING. If LENGTH is SVN_UTF__UNKNOWN_LENGTH, assume STRING
+ * is NUL-terminated; otherwise look only at the first LENGTH bytes in
* STRING. Upon return, BUFFER->data points at an array of UCS-4
- * characters and *RESULT_LENGTH contains the length of the array.
+ * characters, and return the length of the array. TRANSFORM_FLAGS
+ * define exactly how the decomposition is performed.
*
- * A returned error may indicate that STRING contains invalid UTF-8 or
- * invalid Unicode codepoints. Any error message comes from utf8proc.
+ * A negative return value is an utf8proc error code and may indicate
+ * that STRING contains invalid UTF-8 or was so long that an overflow
+ * occurred.
*/
-static svn_error_t *
-decompose_normalized(apr_size_t *result_length,
- const char *string, apr_size_t length,
- svn_membuf_t *buffer)
+static ssize_t
+unicode_decomposition(int transform_flags,
+ const char *string, apr_size_t length,
+ svn_membuf_t *buffer)
{
const int nullterm = (length == SVN_UTF__UNKNOWN_LENGTH
? UTF8PROC_NULLTERM : 0);
@@ -71,23 +72,66 @@ decompose_normalized(apr_size_t *result_
const ssize_t ucs4len = buffer->size / sizeof(*ucs4buf);
const ssize_t result =
utf8proc_decompose((const void*) string, length, ucs4buf, ucs4len,
- UTF8PROC_DECOMPOSE | UTF8PROC_STABLE | nullterm);
+ UTF8PROC_DECOMPOSE | UTF8PROC_STABLE
+ | transform_flags | nullterm);
- if (result < 0)
- return svn_error_create(SVN_ERR_UTF8PROC_ERROR, NULL,
- gettext(utf8proc_errmsg(result)));
-
- if (result <= ucs4len)
- {
- *result_length = result;
- return SVN_NO_ERROR;
- }
+ if (result < 0 || result <= ucs4len)
+ return result;
/* Increase the decomposition buffer size and retry */
svn_membuf__ensure(buffer, result * sizeof(*ucs4buf));
}
}
+/* Fill the given BUFFER with an NFD UCS-4 representation of the UTF-8
+ * STRING. If LENGTH is SVN_UTF__UNKNOWN_LENGTH, assume STRING is
+ * NUL-terminated; otherwise look only at the first LENGTH bytes in
+ * STRING. Upon return, BUFFER->data points at an array of UCS-4
+ * characters and *RESULT_LENGTH contains the length of the array.
+ *
+ * A returned error may indicate that STRING contains invalid UTF-8 or
+ * invalid Unicode codepoints. Any error message comes from utf8proc.
+ */
+static svn_error_t *
+decompose_normalized(apr_size_t *result_length,
+ const char *string, apr_size_t length,
+ svn_membuf_t *buffer)
+{
+ ssize_t result = unicode_decomposition(0, string, length, buffer);
+ if (result < 0)
+ return svn_error_create(SVN_ERR_UTF8PROC_ERROR, NULL,
+ gettext(utf8proc_errmsg(result)));
+ *result_length = result;
+ return SVN_NO_ERROR;
+}
+
+/* Fill the given BUFFER with an NFC UTF-8 representation of the UTF-8
+ * STRING. If LENGTH is SVN_UTF__UNKNOWN_LENGTH, assume STRING is
+ * NUL-terminated; otherwise look only at the first LENGTH bytes in
+ * STRING. Upon return, BUFFER->data points at a NUL-terminated string
+ * of UTF-8 characters.
+ *
+ * A returned error may indicate that STRING contains invalid UTF-8 or
+ * invalid Unicode codepoints. Any error message comes from utf8proc.
+ */
+static svn_error_t *
+normalize_cstring(apr_size_t *result_length,
+ const char *string, apr_size_t length,
+ svn_membuf_t *buffer)
+{
+ ssize_t result = unicode_decomposition(0, string, length, buffer);
+ if (result >= 0)
+ {
+ svn_membuf__resize(buffer, result * sizeof(apr_int32_t) + 1);
+ result = utf8proc_reencode(buffer->data, result,
+ UTF8PROC_COMPOSE | UTF8PROC_STABLE);
+ }
+ if (result < 0)
+ return svn_error_create(SVN_ERR_UTF8PROC_ERROR, NULL,
+ gettext(utf8proc_errmsg(result)));
+ *result_length = result;
+ return SVN_NO_ERROR;
+}
/* Compare two arrays of UCS-4 codes, BUFA of length LENA and BUFB of
* length LENB. Return 0 if they're equal, a negative value if BUFA is
@@ -288,3 +332,181 @@ svn_utf__glob(svn_boolean_t *match,
*match = !apr_fnmatch(pattern_buf->data, string_buf->data, 0);
return SVN_NO_ERROR;
}
+
+svn_boolean_t
+svn_utf__is_normalized(const char *string, apr_pool_t *scratch_pool)
+{
+ svn_error_t *err;
+ svn_membuf_t buffer;
+ apr_size_t result_length;
+ const apr_size_t length = strlen(string);
+ svn_membuf__create(&buffer, length * sizeof(apr_int32_t), scratch_pool);
+ err = normalize_cstring(&result_length, string, length, &buffer);
+ if (err)
+ {
+ svn_error_clear(err);
+ return FALSE;
+ }
+ return (length == result_length && 0 == strcmp(string, buffer.data));
+}
+
+const char *
+svn_utf__fuzzy_escape(const char *src, apr_size_t length, apr_pool_t *pool)
+{
+ /* Hexadecimal digits for code conversion. */
+ static const char digits[] = "0123456789ABCDEF";
+
+ /* Flags used for Unicode decomposition. */
+ static const int decomp_flags = (
+ UTF8PROC_COMPAT | UTF8PROC_STABLE | UTF8PROC_LUMP
+ | UTF8PROC_NLF2LF | UTF8PROC_STRIPCC | UTF8PROC_STRIPMARK);
+
+ svn_stringbuf_t *result;
+ svn_membuf_t buffer;
+ ssize_t decomp_length;
+ ssize_t len;
+
+ /* Decompose to a non-reversible compatibility format. */
+ svn_membuf__create(&buffer, length * sizeof(apr_int32_t), pool);
+ decomp_length = unicode_decomposition(decomp_flags, src, length, &buffer);
+ if (decomp_length < 0)
+ {
+ svn_membuf_t part;
+ apr_size_t done, prev;
+
+ /* The only other error we can receive here indicates an integer
+ overflow due to the length of the input string. Not very
+ likely, but we certainly shouldn't continue in that case. */
+ SVN_ERR_ASSERT_NO_RETURN(decomp_length == UTF8PROC_ERROR_INVALIDUTF8);
+
+ /* Break the decomposition into parts that are valid UTF-8, and
+ bytes that are not. Represent the invalid bytes in the target
+ erray by their negative value. This works because utf8proc
+ will not generate Unicode code points with values larger than
+ U+10FFFF. */
+ svn_membuf__create(&part, sizeof(apr_int32_t), pool);
+ decomp_length = 0;
+ done = prev = 0;
+ while (done < length)
+ {
+ apr_int32_t uc;
+
+ while (done < length)
+ {
+ len = utf8proc_iterate((uint8_t*)src + done, length - done, &uc);
+ if (len < 0)
+ break;
+ done += len;
+ }
+
+ /* Decompose the valid part */
+ if (done > prev)
+ {
+ len = unicode_decomposition(
+ decomp_flags, src + prev, done - prev, &part);
+ SVN_ERR_ASSERT_NO_RETURN(len > 0);
+ svn_membuf__resize(
+ &buffer, (decomp_length + len) * sizeof(apr_int32_t));
+ memcpy((apr_int32_t*)buffer.data + decomp_length,
+ part.data, len * sizeof(apr_int32_t));
+ decomp_length += len;
+ prev = done;
+ }
+
+ /* What follows could be a valid UTF-8 sequence, but not
+ a valid Unicode character. */
+ if (done < length)
+ {
+ const char *last;
+
+ /* Determine the length of the UTF-8 sequence */
+ const char *const p = src + done;
+ len = utf8proc_utf8class[(uint8_t)*p];
+
+ /* Check if the multi-byte sequence is valid UTF-8. */
+ if (len > 1 && len <= length - done)
+ last = svn_utf__last_valid(p, len);
+ else
+ last = NULL;
+
+ /* Might not be a valid UTF-8 sequence at all */
+ if (!last || (last && last - p < len))
+ {
+ uc = -((apr_int32_t)(*p & 0xff));
+ len = 1;
+ }
+ else
+ {
+ switch (len)
+ {
+ /* Decode the UTF-8 sequence without validation. */
+ case 2:
+ uc = ((p[0] & 0x1f) << 6) + (p[1] & 0x3f);
+ break;
+ case 3:
+ uc = (((p[0] & 0x0f) << 12) + ((p[1] & 0x3f) << 6)
+ + (p[2] & 0x3f));
+ break;
+ case 4:
+ uc = (((p[0] & 0x07) << 18) + ((p[1] & 0x3f) << 12)
+ + ((p[2] & 0x3f) << 6) + (p[3] & 0x3f));
+ break;
+ default:
+ SVN_ERR_ASSERT_NO_RETURN(
+ !"Unexpected invalid UTF-8 byte");
+ }
+
+ }
+
+ svn_membuf__resize(
+ &buffer, (decomp_length + 1) * sizeof(apr_int32_t));
+ ((apr_int32_t*)buffer.data)[decomp_length++] = uc;
+ done += len;
+ prev = done;
+ }
+ }
+ }
+
+ /* Scan the result and deleting any combining diacriticals and
+ inserting placeholders where any non-ascii characters remain. */
+ result = svn_stringbuf_create_ensure(decomp_length, pool);
+ for (len = 0; len < decomp_length; ++len)
+ {
+ const apr_int32_t cp = ((apr_int32_t*)buffer.data)[len];
+ if (cp > 0 && cp < 127)
+ svn_stringbuf_appendbyte(result, (char)cp);
+ else if (cp == 0)
+ svn_stringbuf_appendcstr(result, "\\0");
+ else if (cp < 0)
+ {
+ const apr_int32_t rcp = ((-cp) & 0xff);
+ svn_stringbuf_appendcstr(result, "?\\");
+ svn_stringbuf_appendbyte(result, digits[(rcp & 0x00f0) >> 4]);
+ svn_stringbuf_appendbyte(result, digits[(rcp & 0x000f)]);
+ }
+ else
+ {
+ if (utf8proc_codepoint_valid(cp))
+ {
+ const utf8proc_property_t *prop = utf8proc_get_property(cp);
+ if (prop->combining_class != 0)
+ continue; /* Combining mark; ignore */
+ svn_stringbuf_appendcstr(result, "{U+");
+ }
+ else
+ svn_stringbuf_appendcstr(result, "{U?");
+ if (cp > 0xffff)
+ {
+ svn_stringbuf_appendbyte(result, digits[(cp & 0xf00000) >> 20]);
+ svn_stringbuf_appendbyte(result, digits[(cp & 0x0f0000) >> 16]);
+ }
+ svn_stringbuf_appendbyte(result, digits[(cp & 0xf000) >> 12]);
+ svn_stringbuf_appendbyte(result, digits[(cp & 0x0f00) >> 8]);
+ svn_stringbuf_appendbyte(result, digits[(cp & 0x00f0) >> 4]);
+ svn_stringbuf_appendbyte(result, digits[(cp & 0x000f)]);
+ svn_stringbuf_appendbyte(result, '}');
+ }
+ }
+
+ return result->data;
+}
Modified: subversion/branches/log-addressing/subversion/libsvn_wc/wc.h
URL: http://svn.apache.org/viewvc/subversion/branches/log-addressing/subversion/libsvn_wc/wc.h?rev=1512328&r1=1512327&r2=1512328&view=diff
==============================================================================
--- subversion/branches/log-addressing/subversion/libsvn_wc/wc.h (original)
+++ subversion/branches/log-addressing/subversion/libsvn_wc/wc.h Fri Aug 9 14:56:47 2013
@@ -157,6 +157,8 @@ extern "C" {
* The bump to 31 added the inherited_props column in the NODES table.
* Bumped in r1395109.
*
+ * == 1.8.x shipped with format 31
+ *
* Please document any further format changes here.
*/
Modified: subversion/branches/log-addressing/subversion/mod_authz_svn/mod_authz_svn.c
URL: http://svn.apache.org/viewvc/subversion/branches/log-addressing/subversion/mod_authz_svn/mod_authz_svn.c?rev=1512328&r1=1512327&r2=1512328&view=diff
==============================================================================
--- subversion/branches/log-addressing/subversion/mod_authz_svn/mod_authz_svn.c (original)
+++ subversion/branches/log-addressing/subversion/mod_authz_svn/mod_authz_svn.c Fri Aug 9 14:56:47 2013
@@ -806,14 +806,15 @@ access_checker(request_rec *r)
&authz_svn_module);
const char *repos_path = NULL;
const char *dest_repos_path = NULL;
- int status;
+ int status, authn_required;
/* We are not configured to run */
if (!conf->anonymous
|| (! (conf->access_file || conf->repo_relative_access_file)))
return DECLINED;
- if (ap_some_auth_required(r))
+ authn_required = ap_some_auth_required(r);
+ if (authn_required)
{
/* It makes no sense to check if a location is both accessible
* anonymous and by an authenticated user (in the same request!).
@@ -843,7 +844,7 @@ access_checker(request_rec *r)
if (!conf->authoritative)
return DECLINED;
- if (!ap_some_auth_required(r))
+ if (!authn_required)
log_access_verdict(APLOG_MARK, r, 0, repos_path, dest_repos_path);
return HTTP_FORBIDDEN;
Modified: subversion/branches/log-addressing/subversion/po/sv.po
URL: http://svn.apache.org/viewvc/subversion/branches/log-addressing/subversion/po/sv.po?rev=1512328&r1=1512327&r2=1512328&view=diff
==============================================================================
--- subversion/branches/log-addressing/subversion/po/sv.po [UTF-8] (original)
+++ subversion/branches/log-addressing/subversion/po/sv.po [UTF-8] Fri Aug 9 14:56:47 2013
@@ -3951,7 +3951,7 @@ msgstr "Endast SHA1-kontrollsummor kan a
#: ../libsvn_fs_fs/rep-cache.c:323
#, c-format
msgid "Representation key for checksum '%%s' exists in filesystem '%%s' with a different value (%%ld,%%%s,%%%s,%%%s) than what we were about to store (%%ld,%%%s,%%%s,%%%s)"
-msgstr "En representationsnyckel för kontrollsumman \"%%s\" finns i filsystemet \"%%s\" med ett värde (%%ld,%%%s,%%%s,%%%s) som skiljer sig från det som som skulle lagras (%%ld,%%%s,%%%s,%%%s)"
+msgstr "En representationsnyckel för kontrollsumman \"%%s\" finns i filsystemet \"%%s\" med ett värde (%%ld,%%%s,%%%s,%%%s) som skiljer sig från det som skulle lagras (%%ld,%%%s,%%%s,%%%s)"
#: ../libsvn_fs_fs/tree.c:2241 ../libsvn_subr/path.c:1229
#, c-format
Modified: subversion/branches/log-addressing/subversion/svnadmin/svnadmin.c
URL: http://svn.apache.org/viewvc/subversion/branches/log-addressing/subversion/svnadmin/svnadmin.c?rev=1512328&r1=1512327&r2=1512328&view=diff
==============================================================================
--- subversion/branches/log-addressing/subversion/svnadmin/svnadmin.c (original)
+++ subversion/branches/log-addressing/subversion/svnadmin/svnadmin.c Fri Aug 9 14:56:47 2013
@@ -803,7 +803,6 @@ repos_notify_handler(void *baton,
apr_pool_t *scratch_pool)
{
svn_stream_t *feedback_stream = baton;
- apr_size_t len;
switch (notify->action)
{
@@ -837,7 +836,7 @@ repos_notify_handler(void *baton,
case svn_repos_notify_verify_rev_structure:
if (notify->revision == SVN_INVALID_REVNUM)
- svn_error_clear(svn_stream_printf(feedback_stream, scratch_pool,
+ svn_error_clear(svn_stream_puts(feedback_stream,
_("* Verifying repository metadata ...\n")));
else
svn_error_clear(svn_stream_printf(feedback_stream, scratch_pool,
@@ -925,13 +924,11 @@ repos_notify_handler(void *baton,
return;
case svn_repos_notify_load_node_done:
- len = 7;
- svn_error_clear(svn_stream_write(feedback_stream, _(" done.\n"), &len));
+ svn_error_clear(svn_stream_puts(feedback_stream, _(" done.\n")));
return;
case svn_repos_notify_load_copied_node:
- len = 9;
- svn_error_clear(svn_stream_write(feedback_stream, "COPIED...", &len));
+ svn_error_clear(svn_stream_puts(feedback_stream, "COPIED..."));
return;
case svn_repos_notify_load_txn_start:
@@ -959,7 +956,7 @@ repos_notify_handler(void *baton,
return;
case svn_repos_notify_recover_start:
- svn_error_clear(svn_stream_printf(feedback_stream, scratch_pool,
+ svn_error_clear(svn_stream_puts(feedback_stream,
_("Repository lock acquired.\n"
"Please wait; recovering the"
" repository may take some time...\n")));
Propchange: subversion/branches/log-addressing/subversion/svnauth/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Fri Aug 9 14:56:47 2013
@@ -1 +1,2 @@
svnauth
+.libs
Modified: subversion/branches/log-addressing/subversion/svnmucc/svnmucc.c
URL: http://svn.apache.org/viewvc/subversion/branches/log-addressing/subversion/svnmucc/svnmucc.c?rev=1512328&r1=1512327&r2=1512328&view=diff
==============================================================================
--- subversion/branches/log-addressing/subversion/svnmucc/svnmucc.c (original)
+++ subversion/branches/log-addressing/subversion/svnmucc/svnmucc.c Fri Aug 9 14:56:47 2013
@@ -1433,7 +1433,14 @@ main(int argc, const char **argv)
if (! anchor)
anchor = url;
else
- anchor = svn_uri_get_longest_ancestor(anchor, url, pool);
+ {
+ anchor = svn_uri_get_longest_ancestor(anchor, url, pool);
+ if (!anchor || !anchor[0])
+ handle_error(svn_error_createf(SVN_ERR_INCORRECT_PARAMS, NULL,
+ "URLs in the action list do not "
+ "share a common ancestor"),
+ pool);
+ }
if ((++i == action_args->nelts) && (j + 1 < num_url_args))
insufficient(pool);
Modified: subversion/branches/log-addressing/subversion/svnserve/serve.c
URL: http://svn.apache.org/viewvc/subversion/branches/log-addressing/subversion/svnserve/serve.c?rev=1512328&r1=1512327&r2=1512328&view=diff
==============================================================================
--- subversion/branches/log-addressing/subversion/svnserve/serve.c (original)
+++ subversion/branches/log-addressing/subversion/svnserve/serve.c Fri Aug 9 14:56:47 2013
@@ -340,6 +340,12 @@ canonicalize_access_file(const char **ac
return SVN_NO_ERROR;
}
+/* Load the authz database for the listening server based on the
+ entries in the SERVER struct.
+
+ SERVER and CONN must not be NULL. The real errors will be logged with
+ SERVER and CONN but return generic errors to the client. */
+static
svn_error_t *load_authz_config(server_baton_t *server,
svn_ra_svn_conn_t *conn,
const char *repos_root,
Modified: subversion/branches/log-addressing/subversion/svnserve/server.h
URL: http://svn.apache.org/viewvc/subversion/branches/log-addressing/subversion/svnserve/server.h?rev=1512328&r1=1512327&r2=1512328&view=diff
==============================================================================
--- subversion/branches/log-addressing/subversion/svnserve/server.h (original)
+++ subversion/branches/log-addressing/subversion/svnserve/server.h Fri Aug 9 14:56:47 2013
@@ -146,16 +146,6 @@ svn_error_t *load_pwdb_config(server_bat
svn_ra_svn_conn_t *conn,
apr_pool_t *pool);
-/* Load the authz database for the listening server based on the
- entries in the SERVER struct.
-
- SERVER and CONN must not be NULL. The real errors will be logged with
- SERVER and CONN but return generic errors to the client. */
-svn_error_t *load_authz_config(server_baton_t *server,
- svn_ra_svn_conn_t *conn,
- const char *repos_root,
- apr_pool_t *pool);
-
/* Initialize the Cyrus SASL library. POOL is used for allocations. */
svn_error_t *cyrus_init(apr_pool_t *pool);
Modified: subversion/branches/log-addressing/subversion/tests/cmdline/davautocheck.sh
URL: http://svn.apache.org/viewvc/subversion/branches/log-addressing/subversion/tests/cmdline/davautocheck.sh?rev=1512328&r1=1512327&r2=1512328&view=diff
==============================================================================
--- subversion/branches/log-addressing/subversion/tests/cmdline/davautocheck.sh (original)
+++ subversion/branches/log-addressing/subversion/tests/cmdline/davautocheck.sh Fri Aug 9 14:56:47 2013
@@ -450,7 +450,7 @@ PidFile "$HTTPD_PID"
LogFormat "%h %l %u %t \"%r\" %>s %b" common
CustomLog "$HTTPD_ACCESS_LOG" common
ErrorLog "$HTTPD_ERROR_LOG"
-LogLevel Debug
+LogLevel debug
ServerRoot "$HTTPD_ROOT"
DocumentRoot "$HTTPD_ROOT"
ScoreBoardFile "$HTTPD_ROOT/run"
Modified: subversion/branches/log-addressing/subversion/tests/cmdline/merge_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/log-addressing/subversion/tests/cmdline/merge_tests.py?rev=1512328&r1=1512327&r2=1512328&view=diff
==============================================================================
--- subversion/branches/log-addressing/subversion/tests/cmdline/merge_tests.py (original)
+++ subversion/branches/log-addressing/subversion/tests/cmdline/merge_tests.py Fri Aug 9 14:56:47 2013
@@ -656,7 +656,7 @@ def simple_property_merges(sbox):
'E/alpha.prej'
: Item(error_message('foo', 'foo_val', 'mod_foo')),
'E/beta.prej'
- : Item(error_message('foo', 'foo?\\129val', 'mod?\\129foo')),
+ : Item(error_message('foo', 'foo?\\81val', 'mod?\\81foo')),
})
expected_disk.tweak('E', 'E/alpha', props={'bar' : 'bar_val'})
expected_disk.tweak('E/beta', props={'bar' : 'bar\201val'})
Modified: subversion/branches/log-addressing/subversion/tests/cmdline/svnadmin_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/log-addressing/subversion/tests/cmdline/svnadmin_tests.py?rev=1512328&r1=1512327&r2=1512328&view=diff
==============================================================================
--- subversion/branches/log-addressing/subversion/tests/cmdline/svnadmin_tests.py (original)
+++ subversion/branches/log-addressing/subversion/tests/cmdline/svnadmin_tests.py Fri Aug 9 14:56:47 2013
@@ -1485,8 +1485,8 @@ def verify_non_utf8_paths(sbox):
expected_stderr = [
"* Dumped revision 0.\n",
"WARNING 0x0002: E160005: "
- "While validating fspath '?\\230': "
- "Path '?\\230' is not in UTF-8"
+ "While validating fspath '?\\E6': "
+ "Path '?\\E6' is not in UTF-8"
"\n",
"* Dumped revision 1.\n",
]
@@ -1635,7 +1635,7 @@ def hotcopy_incremental_packed(sbox):
cwd = os.getcwd()
# Configure two files per shard to trigger packing
format_file = open(os.path.join(sbox.repo_dir, 'db', 'format'), 'wb')
- format_file.write("4\nlayout sharded 2\n")
+ format_file.write("6\nlayout sharded 2\n")
format_file.close()
# Pack revisions 0 and 1.
Propchange: subversion/branches/log-addressing/subversion/tests/libsvn_fs_fs/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Fri Aug 9 14:56:47 2013
@@ -3,11 +3,10 @@ Release
.libs
test-repo-*
fs-pack-test
+fs-fs-pack-test
test-get-set-revprop-packed-fs
*.o
*.lo
*~
.*~
*.exe
-
-fs-fs-pack-test
Propchange: subversion/branches/log-addressing/subversion/tests/libsvn_fs_x/
------------------------------------------------------------------------------
Reverse-merged /subversion/trunk/subversion/tests/libsvn_fs_x:r1509915-1509916
Reverse-merged /subversion/branches/fsx/subversion/tests/libsvn_fs_x:r1508077-1509914
Reverse-merged /subversion/branches/fsfs-format7/subversion/tests/libsvn_fs_x:r1498103,1498155,1500054,1507729-1507732,1507735-1507736
Merged /subversion/trunk/subversion/tests/libsvn_fs_x:r1511146-1512319
Merged /subversion/branches/fsfs-improvements/subversion/tests/libsvn_fs_x:r1511150-1512323
Modified: subversion/branches/log-addressing/subversion/tests/libsvn_fs_x/fs-x-pack-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/log-addressing/subversion/tests/libsvn_fs_x/fs-x-pack-test.c?rev=1512328&r1=1512327&r2=1512328&view=diff
==============================================================================
--- subversion/branches/log-addressing/subversion/tests/libsvn_fs_x/fs-x-pack-test.c (original)
+++ subversion/branches/log-addressing/subversion/tests/libsvn_fs_x/fs-x-pack-test.c Fri Aug 9 14:56:47 2013
@@ -858,8 +858,13 @@ test_reps(const svn_test_opts_t *opts,
svn_stringbuf_t *serialized;
svn_stream_t *stream;
svn_stringbuf_t *contents = svn_stringbuf_create_ensure(10000, pool);
-
int i;
+
+ /* Bail (with success) on known-untestable scenarios */
+ if ((strcmp(opts->fs_type, "fsx") != 0)
+ || (opts->server_minor_version && (opts->server_minor_version < 8)))
+ return SVN_NO_ERROR;
+
for (i = 0; i < 10000; ++i)
{
int v, s = 0;
Modified: subversion/branches/log-addressing/subversion/tests/libsvn_subr/utf-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/log-addressing/subversion/tests/libsvn_subr/utf-test.c?rev=1512328&r1=1512327&r2=1512328&view=diff
==============================================================================
--- subversion/branches/log-addressing/subversion/tests/libsvn_subr/utf-test.c (original)
+++ subversion/branches/log-addressing/subversion/tests/libsvn_subr/utf-test.c Fri Aug 9 14:56:47 2013
@@ -618,6 +618,125 @@ test_utf_pattern_match(apr_pool_t *pool)
}
+static svn_error_t *
+test_utf_fuzzy_escape(apr_pool_t *pool)
+{
+
+ /* Accented latin, mixed normalization */
+ static const char mixup[] =
+ "S\xcc\x87\xcc\xa3" /* S with dot above and below */
+ "\xc5\xaf" /* u with ring */
+ "b\xcc\xb1" /* b with macron below */
+ "\xe1\xb9\xbd" /* v with tilde */
+ "e\xcc\xa7\xcc\x86" /* e with breve and cedilla */
+ "\xc8\x91" /* r with double grave */
+ "s\xcc\x8c" /* s with caron */
+ "\xe1\xb8\xaf" /* i with diaeresis and acute */
+ "o\xcc\x80\xcc\x9b" /* o with grave and hook */
+ "\xe1\xb9\x8b"; /* n with circumflex below */
+
+ /* As above, but latin lowercase 'o' replaced with Greek 'omicron' */
+ static const char greekish[] =
+ "S\xcc\x87\xcc\xa3" /* S with dot above and below */
+ "\xc5\xaf" /* u with ring */
+ "b\xcc\xb1" /* b with macron below */
+ "\xe1\xb9\xbd" /* v with tilde */
+ "e\xcc\xa7\xcc\x86" /* e with breve and cedilla */
+ "\xc8\x91" /* r with double grave */
+ "s\xcc\x8c" /* s with caron */
+ "\xe1\xb8\xaf" /* i with diaeresis and acute */
+ "\xce\xbf\xcc\x80\xcc\x9b" /* omicron with grave and hook */
+ "\xe1\xb9\x8b"; /* n with circumflex below */
+
+ /* More interesting invalid characters. */
+ static const char invalid[] =
+ "Not Unicode: \xef\xb7\x91;" /* U+FDD1 */
+ "Out of range: \xf4\x90\x80\x81;" /* U+110001 */
+ "Not UTF-8: \xe6;"
+ "Null byte: \0;";
+
+ const char *fuzzy;
+
+ fuzzy = svn_utf__fuzzy_escape(mixup, strlen(mixup), pool);
+ SVN_TEST_ASSERT(0 == strcmp(fuzzy, "Subversion"));
+
+ fuzzy = svn_utf__fuzzy_escape(greekish, strlen(greekish), pool);
+ SVN_TEST_ASSERT(0 == strcmp(fuzzy, "Subversi{U+03BF}n"));
+
+ fuzzy = svn_utf__fuzzy_escape(invalid, sizeof(invalid) - 1, pool);
+ /*fprintf(stderr, "%s\n", fuzzy);*/
+ SVN_TEST_ASSERT(0 == strcmp(fuzzy,
+ "Not Unicode: {U?FDD1};"
+ "Out of range: ?\\F4?\\90?\\80?\\81;"
+ "Not UTF-8: ?\\E6;"
+ "Null byte: \\0;"));
+
+ return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+test_utf_is_normalized(apr_pool_t *pool)
+{
+ /* Normalized: NFC */
+ static const char nfc[] =
+ "\xe1\xb9\xa8" /* S with dot above and below */
+ "\xc5\xaf" /* u with ring */
+ "\xe1\xb8\x87" /* b with macron below */
+ "\xe1\xb9\xbd" /* v with tilde */
+ "\xe1\xb8\x9d" /* e with breve and cedilla */
+ "\xc8\x91" /* r with double grave */
+ "\xc5\xa1" /* s with caron */
+ "\xe1\xb8\xaf" /* i with diaeresis and acute */
+ "\xe1\xbb\x9d" /* o with grave and hook */
+ "\xe1\xb9\x8b"; /* n with circumflex below */
+
+ /* Normalized: NFD */
+ static const char nfd[] =
+ "S\xcc\xa3\xcc\x87" /* S with dot above and below */
+ "u\xcc\x8a" /* u with ring */
+ "b\xcc\xb1" /* b with macron below */
+ "v\xcc\x83" /* v with tilde */
+ "e\xcc\xa7\xcc\x86" /* e with breve and cedilla */
+ "r\xcc\x8f" /* r with double grave */
+ "s\xcc\x8c" /* s with caron */
+ "i\xcc\x88\xcc\x81" /* i with diaeresis and acute */
+ "o\xcc\x9b\xcc\x80" /* o with grave and hook */
+ "n\xcc\xad"; /* n with circumflex below */
+
+ /* Mixed, denormalized */
+ static const char mixup[] =
+ "S\xcc\x87\xcc\xa3" /* S with dot above and below */
+ "\xc5\xaf" /* u with ring */
+ "b\xcc\xb1" /* b with macron below */
+ "\xe1\xb9\xbd" /* v with tilde */
+ "e\xcc\xa7\xcc\x86" /* e with breve and cedilla */
+ "\xc8\x91" /* r with double grave */
+ "s\xcc\x8c" /* s with caron */
+ "\xe1\xb8\xaf" /* i with diaeresis and acute */
+ "o\xcc\x80\xcc\x9b" /* o with grave and hook */
+ "\xe1\xb9\x8b"; /* n with circumflex below */
+
+ /* Invalid UTF-8 */
+ static const char invalid[] =
+ "\xe1\xb9\xa8" /* S with dot above and below */
+ "\xc5\xaf" /* u with ring */
+ "\xe1\xb8\x87" /* b with macron below */
+ "\xe1\xb9\xbd" /* v with tilde */
+ "\xe1\xb8\x9d" /* e with breve and cedilla */
+ "\xc8\x91" /* r with double grave */
+ "\xc5\xa1" /* s with caron */
+ "\xe1\xb8\xaf" /* i with diaeresis and acute */
+ "\xe6" /* Invalid byte */
+ "\xe1\xb9\x8b"; /* n with circumflex below */
+
+ SVN_ERR_ASSERT(svn_utf__is_normalized(nfc, pool));
+ SVN_ERR_ASSERT(!svn_utf__is_normalized(nfd, pool));
+ SVN_ERR_ASSERT(!svn_utf__is_normalized(mixup, pool));
+ SVN_ERR_ASSERT(!svn_utf__is_normalized(invalid, pool));
+
+ return SVN_NO_ERROR;
+}
+
/* The test table. */
@@ -636,5 +755,9 @@ struct svn_test_descriptor_t test_funcs[
"test svn_utf__normcmp"),
SVN_TEST_PASS2(test_utf_pattern_match,
"test svn_utf__glob"),
+ SVN_TEST_PASS2(test_utf_fuzzy_escape,
+ "test svn_utf__fuzzy_escape"),
+ SVN_TEST_PASS2(test_utf_is_normalized,
+ "test svn_utf__is_normalized"),
SVN_TEST_NULL
};
Modified: subversion/branches/log-addressing/tools/client-side/svn-bench/svn-bench.c
URL: http://svn.apache.org/viewvc/subversion/branches/log-addressing/tools/client-side/svn-bench/svn-bench.c?rev=1512328&r1=1512327&r2=1512328&view=diff
==============================================================================
--- subversion/branches/log-addressing/tools/client-side/svn-bench/svn-bench.c (original)
+++ subversion/branches/log-addressing/tools/client-side/svn-bench/svn-bench.c Fri Aug 9 14:56:47 2013
@@ -278,7 +278,7 @@ check_lib_versions(void)
};
SVN_VERSION_DEFINE(my_version);
- return svn_ver_check_list(&my_version, checklist);
+ return svn_ver_check_list2(&my_version, checklist, svn_ver_equal);
}
Modified: subversion/branches/log-addressing/tools/dev/svnraisetreeconflict/svnraisetreeconflict.c
URL: http://svn.apache.org/viewvc/subversion/branches/log-addressing/tools/dev/svnraisetreeconflict/svnraisetreeconflict.c?rev=1512328&r1=1512327&r2=1512328&view=diff
==============================================================================
--- subversion/branches/log-addressing/tools/dev/svnraisetreeconflict/svnraisetreeconflict.c (original)
+++ subversion/branches/log-addressing/tools/dev/svnraisetreeconflict/svnraisetreeconflict.c Fri Aug 9 14:56:47 2013
@@ -311,7 +311,7 @@ check_lib_versions(void)
};
SVN_VERSION_DEFINE(my_version);
- return svn_ver_check_list(&my_version, checklist);
+ return svn_ver_check_list2(&my_version, checklist, svn_ver_equal);
}
int
Modified: subversion/branches/log-addressing/tools/dev/unix-build/Makefile.svn
URL: http://svn.apache.org/viewvc/subversion/branches/log-addressing/tools/dev/unix-build/Makefile.svn?rev=1512328&r1=1512327&r2=1512328&view=diff
==============================================================================
--- subversion/branches/log-addressing/tools/dev/unix-build/Makefile.svn (original)
+++ subversion/branches/log-addressing/tools/dev/unix-build/Makefile.svn Fri Aug 9 14:56:47 2013
@@ -72,7 +72,7 @@ GNU_ICONV_VER = 1.14
APR_UTIL_VER = 1.4.1
HTTPD_VER = 2.2.25
NEON_VER = 0.29.6
-SERF_VER = 1.2.1
+SERF_VER = 1.3.0
SERF_OLD_VER = 0.3.1
CYRUS_SASL_VER = 2.1.25
SQLITE_VER = 3071600
@@ -707,7 +707,7 @@ serf-reset:
rm -f $(SERF_OBJDIR)/$(f);)
serf-clean:
- -(cd $(SERF_SRCDIR) && ./serfmake clean)
+ -(cd $(SERF_SRCDIR) && scons -c)
# fetch distfile for serf
@@ -733,19 +733,16 @@ $(SERF_OBJDIR)/.retrieved:
# compile serf (serf won't compile outside its source tree)
$(SERF_OBJDIR)/.compiled: $(SERF_OBJDIR)/.retrieved
cd $(SERF_SRCDIR) && \
- env CFLAGS="-O0 -g $(PROFILE_CFLAGS)" \
- ./serfmake --with-apr=$(PREFIX)/apr \
- --prefix=$(PREFIX)/serf \
- build
+ scons DEBUG=1 CFLAGS="-O0,-g,$(PROFILE_CFLAGS)" \
+ APR=$(PREFIX)/apr \
+ APU=$(PREFIX)/apr \
+ PREFIX=$(PREFIX)/serf
touch $@
# install serf
$(SERF_OBJDIR)/.installed: $(SERF_OBJDIR)/.compiled
cd $(SERF_SRCDIR) && \
- ./serfmake --with-apr=$(PREFIX)/apr \
- --with-apr-util=$(PREFIX)/apr \
- --prefix=$(PREFIX)/serf \
- install
+ scons install
touch $@
#######################################################################
@@ -1174,6 +1171,7 @@ $(SVN_OBJDIR)/.retrieved:
ifeq ($(BRANCH_MAJOR),1.7)
BDB_FLAG=db.h:$(PREFIX)/bdb/include:$(PREFIX)/bdb/lib:db-$(BDB_MAJOR_VER)
SERF_FLAG=--with-serf="$(PREFIX)/serf"
+SERF_LDFLAG=-Wl,-rpath,$(PREFIX)/serf/lib
MOD_DAV_SVN=modules/svn-$(WC)/mod_dav_svn.so
MOD_AUTHZ_SVN=modules/svn-$(WC)/mod_authz_svn.so
LIBMAGIC_FLAG=--with-libmagic=$(PREFIX)/libmagic
@@ -1182,6 +1180,7 @@ JAVAHL_CHECK_TARGET=check-javahl
else ifeq ($(BRANCH_MAJOR),1.6)
BDB_FLAG=db.h:$(PREFIX)/bdb/include:$(PREFIX)/bdb/lib:db-$(BDB_MAJOR_VER)
SERF_FLAG=--with-serf="$(PREFIX)/serf"
+SERF_LDFLAG=-Wl,-rpath,$(PREFIX)/serf/lib
MOD_DAV_SVN=modules/svn-$(WC)/mod_dav_svn.so
MOD_AUTHZ_SVN=modules/svn-$(WC)/mod_authz_svn.so
W_NO_SYSTEM_HEADERS=-Wno-system-headers
@@ -1199,6 +1198,9 @@ JAVAHL_CHECK_TARGET=check-javahl
else # 1.8
BDB_FLAG=db.h:$(PREFIX)/bdb/include:$(PREFIX)/bdb/lib:db-$(BDB_MAJOR_VER)
SERF_FLAG=--with-serf="$(PREFIX)/serf"
+# serf >= 1.3.0 is built with scons and no longer sets up rpath linker flags,
+# so we have to do that ourselves :(
+SERF_LDFLAG=-Wl,-rpath,$(PREFIX)/serf/lib
MOD_DAV_SVN=modules/svn-$(WC)/mod_dav_svn.so
MOD_AUTHZ_SVN=modules/svn-$(WC)/mod_authz_svn.so
LIBMAGIC_FLAG=--with-libmagic=$(PREFIX)/libmagic
@@ -1225,7 +1227,7 @@ endif
$(SVN_OBJDIR)/.configured: $(SVN_OBJDIR)/.retrieved $(DISTDIR)/$(JUNIT_DIST)
cd $(SVN_SRCDIR) && ./autogen.sh
cd $(svn_builddir) && \
- env LDFLAGS="-L$(PREFIX)/neon/lib -L$(PREFIX)/apr/lib" \
+ env LDFLAGS="-L$(PREFIX)/neon/lib -L$(PREFIX)/apr/lib $(SERF_LDFLAG)" \
LD_LIBRARY_PATH="$(LD_LIBRARY_PATH):$$LD_LIBRARY_PATH" \
GREP="`which grep`" \
PATH=$(PREFIX)/ruby/bin:$(PREFIX)/python/bin:$$PATH \
Modified: subversion/branches/log-addressing/tools/dist/backport.pl
URL: http://svn.apache.org/viewvc/subversion/branches/log-addressing/tools/dist/backport.pl?rev=1512328&r1=1512327&r2=1512328&view=diff
==============================================================================
--- subversion/branches/log-addressing/tools/dist/backport.pl (original)
+++ subversion/branches/log-addressing/tools/dist/backport.pl Fri Aug 9 14:56:47 2013
@@ -26,6 +26,8 @@ use File::Basename qw/basename/;
use File::Copy qw/copy move/;
use File::Temp qw/tempfile/;
use POSIX qw/ctermid strftime/;
+use Text::Wrap qw/wrap/;
+use Tie::File ();
############### Start of reading values from environment ###############
@@ -57,9 +59,8 @@ my ($AVAILID) = $ENV{AVAILID} // do {
} // do {
local $/; # slurp mode
my $filename = Digest->new("MD5")->add($SVN_A_O_REALM)->hexdigest;
- open(USERNAME, '<', "$ENV{HOME}/.subversion/auth/svn.simple/$filename")
- and
- <USERNAME> =~ /K 8\nusername\nV \d+\n(.*)/ and $1 or undef
+ `cat $ENV{HOME}/.subversion/auth/svn.simple/$filename`
+ =~ /K 8\nusername\nV \d+\n(.*)/ and $1 or undef
}
// warn "Username for commits (of votes/merges) not found";
@@ -85,7 +86,7 @@ $SVNq = "$SVN -q ";
$SVNq =~ s/-q// if $DEBUG eq 'true';
-sub usage {
+sub backport_usage {
my $basename = basename $0;
print <<EOF;
backport.pl: a tool for reviewing and merging STATUS entries. Run this with
@@ -131,6 +132,27 @@ The 'svn' binary defined by the environm
EOF
}
+sub nominate_usage {
+ my $basename = basename $0;
+ print <<EOF;
+nominate.pl: a tool for adding entries to STATUS.
+
+Usage: $0 "r42,r43,45." "\$Some_justification"
+
+Will add:
+ * r42, r43, r45
+ (log message of r42)
+ Justification:
+ \$Some_justification
+ Votes:
+ +1: $AVAILID
+to STATUS. Backport branches are detected automatically.
+EOF
+# TODO: Optionally add a "Notes" section.
+# TODO: Look for backport branches named after issues.
+# TODO: Handle log messages such as "* file.c: Change."
+}
+
sub digest_string {
Digest->new("MD5")->add(@_)->hexdigest
}
@@ -512,6 +534,17 @@ sub vote {
}
}
+sub check_local_mods_to_STATUS {
+ if (`$SVN status -q $STATUS`) {
+ die "Local mods to STATUS file $STATUS" if $YES;
+ warn "Local mods to STATUS file $STATUS";
+ system "$SVN diff -- $STATUS";
+ prompt "Press the 'any' key to continue...\n", dontprint => 1;
+ return 1;
+ }
+ return 0;
+}
+
sub revert {
copy $STATUS, "$STATUS.$$.tmp";
system "$SVN revert -q $STATUS";
@@ -736,14 +769,14 @@ sub handle_entry {
}
-sub main {
+sub backport_main {
my %approved;
my %votes;
my $state = read_state;
- usage, exit 0 if @ARGV;
+ backport_usage, exit 0 if @ARGV;
- open STATUS, "<", $STATUS or (usage, exit 1);
+ open STATUS, "<", $STATUS or (backport_usage, exit 1);
# Because we use the ':normal' command in Vim...
die "A vim with the +ex_extra feature is required for \$MAY_COMMIT mode"
@@ -756,12 +789,7 @@ sub main {
system("$SVN info $STATUS >/dev/null") == 0
or die "$0: svn error; point \$SVN to an appropriate binary";
- if (`$SVN status -q $STATUS`) {
- die "Local mods to STATUS file $STATUS" if $YES;
- warn "Local mods to STATUS file $STATUS";
- system "$SVN diff -- $STATUS";
- prompt "Press the 'any' key to continue...\n", dontprint => 1;
- }
+ check_local_mods_to_STATUS;
# Skip most of the file
$/ = ""; # paragraph mode
@@ -806,4 +834,86 @@ sub main {
exit_stage_left $state, \%approved, \%votes;
}
-&main
+sub nominate_main {
+ my $had_local_mods;
+
+ local $Text::Wrap::columns = 79;
+
+ $had_local_mods = check_local_mods_to_STATUS;
+
+ # Argument parsing.
+ nominate_usage, exit 0 if @ARGV != 2;
+ my (@revnums) = (+shift) =~ /(\d+)/g;
+ my $justification = shift;
+
+ @revnums = sort { $a <=> $b } keys %{{ map { $_ => 1 } @revnums }};
+ die "No revision numbers specified" unless @revnums;
+
+ # Determine whether a backport branch exists
+ my ($URL) = `$SVN info` =~ /^URL: (.*)$/m;
+ die "Can't retrieve URL of cwd" unless $URL;
+
+ die if $URL !~ m%^[A-Za-z0-9:_.+/][A-Za-z0-9:_.+/-]*$%;
+ system "$SVN info -- $URL-r$revnums[0] 2>/dev/null";
+ my $branch = ($? == 0) ? basename("$URL-r$revnums[0]") : undef;
+
+ # Construct entry.
+ my $logmsg = `$SVN propget --revprop -r $revnums[0] --strict svn:log '^/'`;
+ die "Can't fetch log message of r$revnums[0]: $!" unless $logmsg;
+
+ my @lines;
+ push @lines, wrap " * ", ' 'x3, join ', ', map "r$_", @revnums;
+ push @lines, wrap ' 'x3, ' 'x3, ($logmsg =~ /^(.*?)\n\n/s);
+ push @lines, " Justification:";
+ push @lines, wrap ' 'x5, ' 'x5, $justification;
+ push @lines, " Branch: $branch" if defined $branch;
+ push @lines, " Votes:";
+ push @lines, " +1: $AVAILID";
+ push @lines, "";
+ my $raw = join "", map "$_\n", @lines;
+
+ # Open the file in line-mode (not paragraph-mode).
+ my @STATUS;
+ tie @STATUS, "Tie::File", $STATUS, recsep => "\n";
+ my ($index) = grep { $STATUS[$_] =~ /^Veto/ } (0..$#STATUS);
+ die "Couldn't find where to add an entry" unless $index;
+
+ # Add an empty line if needed.
+ if ($STATUS[$index-1] =~ /\S/) {
+ splice @STATUS, $index, 0, "";
+ $index++;
+ }
+
+ # Add the entry.
+ splice @STATUS, $index, 0, @lines;
+
+ # Save.
+ untie @STATUS;
+
+ # Done!
+ system "$SVN diff -- $STATUS";
+ if (prompt "Commit this nomination? ") {
+ system "$SVN commit -m 'Nominate r$revnums[0].' -- $STATUS";
+ exit $?;
+ }
+ elsif (!$had_local_mods or prompt "Revert STATUS (destroying local mods)? ") {
+ # TODO: we could be smarter and just un-splice the lines we'd added.
+ system "$SVN revert -- $STATUS";
+ exit $?;
+ }
+
+ exit 0;
+}
+
+# Dispatch to the appropriate main().
+given (basename($0)) {
+ when (/^b$|backport/) {
+ &backport_main;
+ }
+ when (/^n$|nominate/) {
+ &nominate_main(@ARGV);
+ }
+ default {
+ &backport_main;
+ }
+}
Modified: subversion/branches/log-addressing/tools/server-side/svn-rep-sharing-stats.c
URL: http://svn.apache.org/viewvc/subversion/branches/log-addressing/tools/server-side/svn-rep-sharing-stats.c?rev=1512328&r1=1512327&r2=1512328&view=diff
==============================================================================
--- subversion/branches/log-addressing/tools/server-side/svn-rep-sharing-stats.c (original)
+++ subversion/branches/log-addressing/tools/server-side/svn-rep-sharing-stats.c Fri Aug 9 14:56:47 2013
@@ -96,7 +96,8 @@ check_lib_versions(void)
};
SVN_VERSION_DEFINE(my_version);
- return svn_error_trace(svn_ver_check_list(&my_version, checklist));
+ return svn_error_trace(svn_ver_check_list2(&my_version, checklist,
+ svn_ver_equal));
}
Modified: subversion/branches/log-addressing/tools/server-side/svnauthz.c
URL: http://svn.apache.org/viewvc/subversion/branches/log-addressing/tools/server-side/svnauthz.c?rev=1512328&r1=1512327&r2=1512328&view=diff
==============================================================================
--- subversion/branches/log-addressing/tools/server-side/svnauthz.c (original)
+++ subversion/branches/log-addressing/tools/server-side/svnauthz.c Fri Aug 9 14:56:47 2013
@@ -59,7 +59,9 @@ static const apr_getopt_option_t options
{"repository", svnauthz__repos, 1, ("repository authz name")},
{"transaction", 't', 1, ("transaction id")},
{"is", svnauthz__is, 1,
- ("instead of outputing, tests if the access is ARG\n"
+ ("instead of outputting, test if the access is\n"
+ " "
+ "exactly ARG\n"
" "
"ARG can be one of the following values:\n"
" "
@@ -67,10 +69,12 @@ static const apr_getopt_option_t options
" "
" r read-only access\n"
" "
- " no no access\n")
+ " no no access")
},
- {"groups-file", svnauthz__groups_file, 1, ("path to the global groups file")},
- {"recursive", 'R', 0, ("recursive access to path")},
+ {"groups-file", svnauthz__groups_file, 1,
+ ("use the groups from file ARG")},
+ {"recursive", 'R', 0,
+ ("determine recursive access to PATH")},
{0, 0, 0, 0}
};
@@ -129,27 +133,32 @@ static const svn_opt_subcommand_desc2_t
{'t'} },
{"accessof", subcommand_accessof, {0} /* no aliases */,
("Print or test the permissions set by an authz file.\n"
- "usage: 1. svnauthz accessof [--username USER] [--groups-file GROUPS_FILE] TARGET\n"
- " 2. svnauthz accessof [--username USER] [--groups-file GROUPS_FILE] \\\n"
- " -t TXN REPOS_PATH FILE_PATH\n\n"
- " 1. Prints the access of USER based on TARGET.\n"
+ "usage: 1. svnauthz accessof TARGET\n"
+ " 2. svnauthz accessof -t TXN REPOS_PATH FILE_PATH\n"
+ "\n"
+ " 1. Prints the access of USER to PATH based on authorization file at TARGET.\n"
" TARGET can be a path to a file or an absolute file:// URL to an authz\n"
- " file in a repository, but cannot be a repository relative URL (^/).\n\n"
- " 2. Prints the access of USER based on authz file at FILE_PATH in the\n"
- " transaction TXN in the repository at REPOS_PATH.\n\n"
- " If the --username argument is omitted then access of an anonymous user\n"
- " will be printed. If --path argument is omitted prints if any access\n"
- " to the repo is allowed. If --groups-file is specified, the groups from\n"
- " GROUPS_FILE will be used.\n\n"
+ " file in a repository, but cannot be a repository relative URL (^/).\n"
+ "\n"
+ " 2. Prints the access of USER to PATH based on authz file at FILE_PATH in the\n"
+ " transaction TXN in the repository at REPOS_PATH.\n"
+ "\n"
+ " USER is the argument to the --username option; if that option is not\n"
+ " provided, then access of an anonymous user will be printed or tested.\n"
+ "\n"
+ " PATH is the argument to the --path option; if that option is not provided,\n"
+ " the maximal access to any path in the repository will be considered.\n"
+ "\n"
"Outputs one of the following:\n"
" rw write access (which also implies read)\n"
" r read access\n"
- " no no access\n\n"
+ " no no access\n"
+ "\n"
"Returns:\n"
- " 0 when syntax is OK and --is argument (if any) matches.\n"
+ " 0 when syntax is OK and '--is' argument (if any) matches.\n"
" 1 when syntax is invalid.\n"
" 2 operational error\n"
- " 3 when --is argument doesn't match\n"
+ " 3 when '--is' argument doesn't match\n"
),
{'t', svnauthz__username, svnauthz__path, svnauthz__repos, svnauthz__is,
svnauthz__groups_file, 'R'} },