Author: danielsh
Date: Thu Mar 28 23:49:30 2013
New Revision: 1462355
URL: http://svn.apache.org/r1462355
Log:
On the verify-at-commit branch, sync from trunk.
This merges r1462037 through r1462354, of which r1462218 and r1462353 are
relevant to this branch's work.
Modified:
subversion/branches/verify-at-commit/ (props changed)
subversion/branches/verify-at-commit/CHANGES
subversion/branches/verify-at-commit/subversion/bindings/javahl/src/org/apache/subversion/javahl/ReposNotifyInformation.java
subversion/branches/verify-at-commit/subversion/include/svn_client.h
subversion/branches/verify-at-commit/subversion/include/svn_repos.h
subversion/branches/verify-at-commit/subversion/libsvn_client/log.c
subversion/branches/verify-at-commit/subversion/libsvn_diff/diff_file.c
subversion/branches/verify-at-commit/subversion/libsvn_ra/ra_loader.c
subversion/branches/verify-at-commit/subversion/libsvn_repos/dump.c
subversion/branches/verify-at-commit/subversion/svnadmin/svnadmin.c
subversion/branches/verify-at-commit/subversion/svnlook/svnlook.c
subversion/branches/verify-at-commit/subversion/tests/libsvn_diff/diff-diff3-test.c
subversion/branches/verify-at-commit/tools/dist/backport.pl
Propchange: subversion/branches/verify-at-commit/
------------------------------------------------------------------------------
Merged /subversion/trunk:r1462037-1462354
Modified: subversion/branches/verify-at-commit/CHANGES
URL:
http://svn.apache.org/viewvc/subversion/branches/verify-at-commit/CHANGES?rev=1462355&r1=1462354&r2=1462355&view=diff
==============================================================================
--- subversion/branches/verify-at-commit/CHANGES (original)
+++ subversion/branches/verify-at-commit/CHANGES Thu Mar 28 23:49:30 2013
@@ -8,6 +8,12 @@ http://svn.apache.org/repos/asf/subversi
- Major new features:
* inheritable properties (r1395109)
+ * GPG agent support. (r1151069)
+ * fsfs: Packing of revision property shards (issue #3944)
+ * explicit handling of local moves/renames (issue #3631, #4232)
+ * new more detailed conflict storage
+ * use svn_ra_serf as our new http library.
+ * automatic merge avoids explicit reintegration merges.
- Minor new features and improvements:
* new 'svnadmin load --revision' load filtering support (issue #3734)
@@ -62,6 +68,38 @@ http://svn.apache.org/repos/asf/subversi
* star-imports in swig-py only import 'svn_*' symbols (r1303375)
+Version 1.7.9
+(04 Apr 2013, from /branches/1.7.x)
+http://svn.apache.org/repos/asf/subversion/tags/1.7.9
+ User-visible changes
+ - Client-side bugfixes:
+ * improved error messages about svn:date and svn:author props. (r1440620)
+ * fix local_relpath assertion (issue #4257)
+ * fix memory leak in `svn log` over svn:// (r1458341)
+ * fix incorrect authz failure when using neon http library (issue #4332)
+ * fix segfault when using kwallet (r1421103)
+
+ - Server-side bugfixes:
+ * svnserve will log the replayed rev not the low-water rev. (r1461278)
+ * mod_dav_svn will omit some property values for activity urls (r1453780)
+ * fix an assertion in mod_dav_svn when acting as a proxy on / (issue #4272)
+ * improve memory usage when committing properties in mod_dav_svn (r1443929)
+ * fix svnrdump to load dump files with non-LF line endings (issue #4263)
+ * fix assertion when rep-cache is inaccessible (r1422100)
+ * improved logic in mod_dav_svn's implementation of lock. (r1455352)
+ * avoid executing unnecessary code in log with limit (r1459599)
+
+ Developer-visible changes:
+ - General:
+ * fix an assertion in dav_svn_get_repos_path() on Windows (r1425368)
+ * fix get-deps.sh to correctly download zlib (r13520131)
+ * doxygen docs will now ignore prefixes when producing the index (r1429201)
+ * fix get-deps.sh on freebsd (r1423646)
+
+ - Bindings:
+ * javahl status api now respects the ignoreExternals boolean (r1435361)
+
+
Version 1.7.8
(17 Dec 2012, from /branches/1.7.x)
http://svn.apache.org/repos/asf/subversion/tags/1.7.8
@@ -571,6 +609,23 @@ the 1.6 release: http://subversion.apac
* fix type mapping of svn_txdelta_window_t in python bindings (issue #3688)
+Version 1.6.21
+(04 Apr 2013, from /branches/1.6.x)
+http://svn.apache.org/repos/asf/subversion/tags/1.6.21
+
+ User-visible changes
+ - Server-side bugfixes:
+ * mod_dav_svn will omit some property values for activity urls (r1453780)
+ * improve memory usage when committing properties in mod_dav_svn (r1443929)
+ * fix mod_dav_svn runs pre-revprop-change twice (issue #3085)
+ * fixed: post-revprop-change errors cancel commit (issue #2990)
+ * improved logic in mod_dav_svn's implementation of lock. (r1455352)
+
+ Developer-visible changes:
+ - General:
+ * fix a compatibility issue with g++ 4.7 (r1345740)
+
+
Version 1.6.20
(04 Jan 2013, from /branches/1.6.x)
http://svn.apache.org/repos/asf/subversion/tags/1.6.20
Modified:
subversion/branches/verify-at-commit/subversion/bindings/javahl/src/org/apache/subversion/javahl/ReposNotifyInformation.java
URL:
http://svn.apache.org/viewvc/subversion/branches/verify-at-commit/subversion/bindings/javahl/src/org/apache/subversion/javahl/ReposNotifyInformation.java?rev=1462355&r1=1462354&r2=1462355&view=diff
==============================================================================
---
subversion/branches/verify-at-commit/subversion/bindings/javahl/src/org/apache/subversion/javahl/ReposNotifyInformation.java
(original)
+++
subversion/branches/verify-at-commit/subversion/bindings/javahl/src/org/apache/subversion/javahl/ReposNotifyInformation.java
Thu Mar 28 23:49:30 2013
@@ -200,7 +200,7 @@ public class ReposNotifyInformation exte
* The structure of a revision is being verified.
* @since 1.8
*/
- verify_struc_rev;
+ verify_rev_structure;
}
public enum NodeAction
Modified: subversion/branches/verify-at-commit/subversion/include/svn_client.h
URL:
http://svn.apache.org/viewvc/subversion/branches/verify-at-commit/subversion/include/svn_client.h?rev=1462355&r1=1462354&r2=1462355&view=diff
==============================================================================
--- subversion/branches/verify-at-commit/subversion/include/svn_client.h
(original)
+++ subversion/branches/verify-at-commit/subversion/include/svn_client.h Thu
Mar 28 23:49:30 2013
@@ -3458,7 +3458,7 @@ typedef struct svn_client_automatic_merg
* @a allow_switched_subtrees enable merging into a WC that is in any or all
* of the states described by their names, but only if this function decides
* that the merge will be in the same direction as the last automatic merge.
- * If, on the other hand, the merge turns out to be in the opposite
+ * If, on the other hand, the last automatic merge was in the opposite
* direction (that is, if svn_client_automatic_merge_is_reintegrate_like()
* would return true), then such states of the WC are not allowed regardless
* of these flags. This function merely records these flags in the
@@ -3484,8 +3484,9 @@ svn_client_find_automatic_merge(svn_clie
/** Find out what kind of automatic merge would be needed, when the target
* is only known as a repository location rather than a WC.
*
- * Like svn_client_find_automatic_merge() except that @a source_path_or_url
- * at @a source_revision should refer to a repository location and not a WC.
+ * Like svn_client_find_automatic_merge() except that the target is
+ * specified by @a target_path_or_url at @a target_revision, which must
+ * refer to a repository location, instead of by a WC path argument.
*
* @note The result, @a *merge_p, is not intended for passing to
* svn_client_do_automatic_merge().
@@ -3512,11 +3513,16 @@ svn_client_find_automatic_merge_no_wc(
/** Perform an automatic merge.
*
* Perform a merge, according to the information stored in @a merge, into
- * the WC at @a target_wcpath. The @a merge structure would typically come
- * from calling svn_client_find_automatic_merge().
+ * the WC at @a target_wcpath. The @a merge structure must be obtained
+ * from svn_client_find_automatic_merge().
*
* The other parameters are as in svn_client_merge5().
*
+ * Return an error if the WC contains local modifications, mixed revisions
+ * and/or switched subtrees, unless such states are allowed by the
+ * corresponding parameters passed to svn_client_find_automatic_merge()
+ * and the required merge is not reintegrate-like.
+ *
* @since New in 1.8.
*/
svn_error_t *
@@ -4985,8 +4991,9 @@ svn_client_revprop_set(const char *propn
* #svn_prop_inherited_item_t->path_or_url members are absolute working copy
* paths.
*
- * Allocate @a *props, its keys, and its values in @a pool, use
- * @a scratch_pool for temporary allocations.
+ * Allocate @a *props (including keys and values) and @a *inherited_props
+ * (including its elements) in @a result_pool, use @a scratch_pool for
+ * temporary allocations.
*
* @a target is a WC absolute path or a URL.
*
Modified: subversion/branches/verify-at-commit/subversion/include/svn_repos.h
URL:
http://svn.apache.org/viewvc/subversion/branches/verify-at-commit/subversion/include/svn_repos.h?rev=1462355&r1=1462354&r2=1462355&view=diff
==============================================================================
--- subversion/branches/verify-at-commit/subversion/include/svn_repos.h
(original)
+++ subversion/branches/verify-at-commit/subversion/include/svn_repos.h Thu Mar
28 23:49:30 2013
@@ -248,7 +248,7 @@ typedef enum svn_repos_notify_action_t
svn_repos_notify_load_skipped_rev,
/** The structure of a revision is being verified. @since New in 1.8. */
- svn_repos_notify_verify_structure_rev
+ svn_repos_notify_verify_rev_structure
} svn_repos_notify_action_t;
Modified: subversion/branches/verify-at-commit/subversion/libsvn_client/log.c
URL:
http://svn.apache.org/viewvc/subversion/branches/verify-at-commit/subversion/libsvn_client/log.c?rev=1462355&r1=1462354&r2=1462355&view=diff
==============================================================================
--- subversion/branches/verify-at-commit/subversion/libsvn_client/log.c
(original)
+++ subversion/branches/verify-at-commit/subversion/libsvn_client/log.c Thu Mar
28 23:49:30 2013
@@ -288,6 +288,7 @@ svn_client_log5(const apr_array_header_t
apr_pool_t *iterpool;
int i;
svn_opt_revision_t peg_rev;
+ svn_boolean_t url_targets = FALSE;
if (revision_ranges->nelts == 0)
{
@@ -412,6 +413,9 @@ svn_client_log5(const apr_array_header_t
interested in. */
APR_ARRAY_PUSH(condensed_targets, const char *) = "";
}
+
+ /* Remember that our targets are URLs. */
+ url_targets = TRUE;
}
else
{
@@ -479,8 +483,14 @@ svn_client_log5(const apr_array_header_t
* we use our initial target path to figure out where to root the RA
* session, otherwise we use our URL. */
if (SVN_CLIENT__REVKIND_NEEDS_WC(peg_rev.kind))
- SVN_ERR(svn_dirent_condense_targets(&ra_target, NULL, targets,
- TRUE, pool, pool));
+ {
+ if (url_targets)
+ SVN_ERR(svn_uri_condense_targets(&ra_target, NULL, targets,
+ TRUE, pool, pool));
+ else
+ SVN_ERR(svn_dirent_condense_targets(&ra_target, NULL, targets,
+ TRUE, pool, pool));
+ }
else
ra_target = url_or_path;
Modified:
subversion/branches/verify-at-commit/subversion/libsvn_diff/diff_file.c
URL:
http://svn.apache.org/viewvc/subversion/branches/verify-at-commit/subversion/libsvn_diff/diff_file.c?rev=1462355&r1=1462354&r2=1462355&view=diff
==============================================================================
--- subversion/branches/verify-at-commit/subversion/libsvn_diff/diff_file.c
(original)
+++ subversion/branches/verify-at-commit/subversion/libsvn_diff/diff_file.c Thu
Mar 28 23:49:30 2013
@@ -544,18 +544,17 @@ find_identical_suffix(apr_off_t *suffix_
file_for_suffix[i].chunk =
(int) offset_to_chunk(file_for_suffix[i].size); /* last chunk */
length[i] = offset_in_chunk(file_for_suffix[i].size);
- if (file_for_suffix[i].chunk == file[i].chunk)
+ if (length[i] == 0)
{
- /* Prefix ended in last chunk, so we can reuse the prefix buffer */
- file_for_suffix[i].buffer = file[i].buffer;
+ /* last chunk is an empty chunk -> start at next-to-last chunk */
+ file_for_suffix[i].chunk = file_for_suffix[i].chunk - 1;
+ length[i] = CHUNK_SIZE;
}
- else if (!length[i] && file_for_suffix[i].chunk == file[i].chunk + 1)
+
+ if (file_for_suffix[i].chunk == file[i].chunk)
{
- /* Prefix ended at end of last chunk, so we can reuse the
- prefix buffer */
- file_for_suffix[i].chunk = file[i].chunk;
+ /* Prefix ended in last chunk, so we can reuse the prefix buffer */
file_for_suffix[i].buffer = file[i].buffer;
- length[i] = CHUNK_SIZE;
}
else
{
Modified: subversion/branches/verify-at-commit/subversion/libsvn_ra/ra_loader.c
URL:
http://svn.apache.org/viewvc/subversion/branches/verify-at-commit/subversion/libsvn_ra/ra_loader.c?rev=1462355&r1=1462354&r2=1462355&view=diff
==============================================================================
--- subversion/branches/verify-at-commit/subversion/libsvn_ra/ra_loader.c
(original)
+++ subversion/branches/verify-at-commit/subversion/libsvn_ra/ra_loader.c Thu
Mar 28 23:49:30 2013
@@ -733,7 +733,7 @@ svn_error_t *svn_ra_get_file(svn_ra_sess
apr_hash_t **props,
apr_pool_t *pool)
{
- SVN_ERR_ASSERT(*path != '/');
+ SVN_ERR_ASSERT(svn_relpath_is_canonical(path));
return session->vtable->get_file(session, path, revision, stream,
fetched_rev, props, pool);
}
@@ -747,7 +747,7 @@ svn_error_t *svn_ra_get_dir2(svn_ra_sess
apr_uint32_t dirent_fields,
apr_pool_t *pool)
{
- SVN_ERR_ASSERT(*path != '/');
+ SVN_ERR_ASSERT(svn_relpath_is_canonical(path));
return session->vtable->get_dir(session, dirents, fetched_rev, props,
path, revision, dirent_fields, pool);
}
@@ -767,7 +767,7 @@ svn_error_t *svn_ra_get_mergeinfo(svn_ra
for (i = 0; i < paths->nelts; i++)
{
const char *path = APR_ARRAY_IDX(paths, i, const char *);
- SVN_ERR_ASSERT(*path != '/');
+ SVN_ERR_ASSERT(svn_relpath_is_canonical(path));
}
/* Check server Merge Tracking capability. */
@@ -892,7 +892,7 @@ svn_error_t *svn_ra_get_log2(svn_ra_sess
for (i = 0; i < paths->nelts; i++)
{
const char *path = APR_ARRAY_IDX(paths, i, const char *);
- SVN_ERR_ASSERT(*path != '/');
+ SVN_ERR_ASSERT(svn_relpath_is_canonical(path));
}
}
@@ -911,7 +911,7 @@ svn_error_t *svn_ra_check_path(svn_ra_se
svn_node_kind_t *kind,
apr_pool_t *pool)
{
- SVN_ERR_ASSERT(*path != '/');
+ SVN_ERR_ASSERT(svn_relpath_is_canonical(path));
return session->vtable->check_path(session, path, revision, kind, pool);
}
@@ -921,7 +921,7 @@ svn_error_t *svn_ra_stat(svn_ra_session_
svn_dirent_t **dirent,
apr_pool_t *pool)
{
- SVN_ERR_ASSERT(*path != '/');
+ SVN_ERR_ASSERT(svn_relpath_is_canonical(path));
return session->vtable->stat(session, path, revision, dirent, pool);
}
@@ -966,7 +966,7 @@ svn_error_t *svn_ra_get_locations(svn_ra
{
svn_error_t *err;
- SVN_ERR_ASSERT(*path != '/');
+ SVN_ERR_ASSERT(svn_relpath_is_canonical(path));
err = session->vtable->get_locations(session, locations, path,
peg_revision, location_revisions, pool);
if (err && (err->apr_err == SVN_ERR_RA_NOT_IMPLEMENTED))
@@ -993,7 +993,7 @@ svn_ra_get_location_segments(svn_ra_sess
{
svn_error_t *err;
- SVN_ERR_ASSERT(*path != '/');
+ SVN_ERR_ASSERT(svn_relpath_is_canonical(path));
err = session->vtable->get_location_segments(session, path, peg_revision,
start_rev, end_rev,
receiver, receiver_baton, pool);
@@ -1021,7 +1021,7 @@ svn_error_t *svn_ra_get_file_revs2(svn_r
{
svn_error_t *err;
- SVN_ERR_ASSERT(*path != '/');
+ SVN_ERR_ASSERT(svn_relpath_is_canonical(path));
if (include_merged_revisions)
SVN_ERR(svn_ra__assert_mergeinfo_capable_server(session, NULL, pool));
@@ -1054,7 +1054,7 @@ svn_error_t *svn_ra_lock(svn_ra_session_
{
const char *path = svn__apr_hash_index_key(hi);
- SVN_ERR_ASSERT(*path != '/');
+ SVN_ERR_ASSERT(svn_relpath_is_canonical(path));
}
if (comment && ! svn_xml_is_xml_safe(comment, strlen(comment)))
@@ -1079,7 +1079,7 @@ svn_error_t *svn_ra_unlock(svn_ra_sessio
{
const char *path = svn__apr_hash_index_key(hi);
- SVN_ERR_ASSERT(*path != '/');
+ SVN_ERR_ASSERT(svn_relpath_is_canonical(path));
}
return session->vtable->unlock(session, path_tokens, break_lock,
@@ -1091,7 +1091,7 @@ svn_error_t *svn_ra_get_lock(svn_ra_sess
const char *path,
apr_pool_t *pool)
{
- SVN_ERR_ASSERT(*path != '/');
+ SVN_ERR_ASSERT(svn_relpath_is_canonical(path));
return session->vtable->get_lock(session, lock, path, pool);
}
@@ -1101,7 +1101,7 @@ svn_error_t *svn_ra_get_locks2(svn_ra_se
svn_depth_t depth,
apr_pool_t *pool)
{
- SVN_ERR_ASSERT(*path != '/');
+ SVN_ERR_ASSERT(svn_relpath_is_canonical(path));
SVN_ERR_ASSERT((depth == svn_depth_empty) ||
(depth == svn_depth_files) ||
(depth == svn_depth_immediates) ||
@@ -1273,7 +1273,7 @@ svn_ra_get_deleted_rev(svn_ra_session_t
svn_error_t *err;
/* Path must be relative. */
- SVN_ERR_ASSERT(*path != '/');
+ SVN_ERR_ASSERT(svn_relpath_is_canonical(path));
if (!SVN_IS_VALID_REVNUM(peg_revision))
return svn_error_createf(SVN_ERR_CLIENT_BAD_REVISION, NULL,
@@ -1312,7 +1312,7 @@ svn_ra_get_inherited_props(svn_ra_sessio
svn_boolean_t iprop_capable;
/* Path must be relative. */
- SVN_ERR_ASSERT(*path != '/');
+ SVN_ERR_ASSERT(svn_relpath_is_canonical(path));
SVN_ERR(svn_ra_has_capability(session, &iprop_capable,
SVN_RA_CAPABILITY_INHERITED_PROPS,
Modified: subversion/branches/verify-at-commit/subversion/libsvn_repos/dump.c
URL:
http://svn.apache.org/viewvc/subversion/branches/verify-at-commit/subversion/libsvn_repos/dump.c?rev=1462355&r1=1462354&r2=1462355&view=diff
==============================================================================
--- subversion/branches/verify-at-commit/subversion/libsvn_repos/dump.c
(original)
+++ subversion/branches/verify-at-commit/subversion/libsvn_repos/dump.c Thu Mar
28 23:49:30 2013
@@ -1434,7 +1434,7 @@ svn_repos_verify_fs2(svn_repos_t *repos,
verify_notify_baton->notify_func = notify_func;
verify_notify_baton->notify_baton = notify_baton;
verify_notify_baton->notify
- = svn_repos_notify_create(svn_repos_notify_verify_structure_rev, pool);
+ = svn_repos_notify_create(svn_repos_notify_verify_rev_structure, pool);
}
/* Verify global metadata and backend-specific data first. */
Modified: subversion/branches/verify-at-commit/subversion/svnadmin/svnadmin.c
URL:
http://svn.apache.org/viewvc/subversion/branches/verify-at-commit/subversion/svnadmin/svnadmin.c?rev=1462355&r1=1462354&r2=1462355&view=diff
==============================================================================
--- subversion/branches/verify-at-commit/subversion/svnadmin/svnadmin.c
(original)
+++ subversion/branches/verify-at-commit/subversion/svnadmin/svnadmin.c Thu Mar
28 23:49:30 2013
@@ -214,6 +214,9 @@ static const apr_getopt_option_t options
{"revision", 'r', 1,
N_("specify revision number ARG (or X:Y range)")},
+ {"transaction", 't', 1,
+ N_("specify transaction name ARG")},
+
{"incremental", svnadmin__incremental, 0,
N_("dump or hotcopy incrementally")},
@@ -477,7 +480,7 @@ static const svn_opt_subcommand_desc2_t
{"verify", subcommand_verify, {0}, N_
("usage: svnadmin verify REPOS_PATH\n\n"
"Verifies the data stored in the repository.\n"),
- {'r', 'q', 'M'} },
+ {'t', 'r', 'q', 'M'} },
{ NULL, NULL, {0}, NULL, {0} }
};
@@ -493,6 +496,7 @@ struct svnadmin_opt_state
svn_boolean_t pre_1_6_compatible; /* --pre-1.6-compatible */
svn_version_t *compatible_version; /* --compatible-version */
svn_opt_revision_t start_revision, end_revision; /* -r X[:Y] */
+ const char *txn_id; /* -t TXN */
svn_boolean_t help; /* --help or -? */
svn_boolean_t version; /* --version */
svn_boolean_t incremental; /* --incremental */
@@ -752,7 +756,7 @@ repos_notify_handler(void *baton,
notify->revision));
return;
- case svn_repos_notify_verify_structure_rev:
+ case svn_repos_notify_verify_rev_structure:
if (notify->revision == SVN_INVALID_REVNUM)
svn_error_clear(svn_stream_printf(feedback_stream, scratch_pool,
_("* Verifying repository metadata ...\n")));
@@ -1534,10 +1538,34 @@ subcommand_verify(apr_getopt_t *os, void
/* Expect no more arguments. */
SVN_ERR(parse_args(NULL, os, 0, 0, pool));
+ if (opt_state->txn_id
+ && (opt_state->start_revision.kind != svn_opt_revision_unspecified
+ || opt_state->end_revision.kind != svn_opt_revision_unspecified))
+ {
+ return svn_error_createf(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
+ _("--revision (-r) and --transaction (-t) "
+ "are mutually exclusive"));
+ }
+
SVN_ERR(open_repos(&repos, opt_state->repository_path, pool));
fs = svn_repos_fs(repos);
SVN_ERR(svn_fs_youngest_rev(&youngest, fs, pool));
+ /* Usage 2. */
+ if (opt_state->txn_id)
+ {
+ svn_fs_txn_t *txn;
+ svn_fs_root_t *root;
+
+ SVN_ERR(svn_fs_open_txn(&txn, fs, opt_state->txn_id, pool));
+ SVN_ERR(svn_fs_txn_root(&root, txn, pool));
+ SVN_ERR(svn_fs_verify_root(root, pool));
+ return SVN_NO_ERROR;
+ }
+ else
+ /* Usage 1. */
+ ;
+
/* Find the revision numbers at which to start and end. */
SVN_ERR(get_revnum(&lower, &opt_state->start_revision,
youngest, repos, pool));
@@ -1980,6 +2008,10 @@ sub_main(int argc, const char *argv[], a
}
}
break;
+ case 't':
+ opt_state.txn_id = opt_arg;
+ break;
+
case 'q':
opt_state.quiet = TRUE;
break;
Modified: subversion/branches/verify-at-commit/subversion/svnlook/svnlook.c
URL:
http://svn.apache.org/viewvc/subversion/branches/verify-at-commit/subversion/svnlook/svnlook.c?rev=1462355&r1=1462354&r2=1462355&view=diff
==============================================================================
--- subversion/branches/verify-at-commit/subversion/svnlook/svnlook.c (original)
+++ subversion/branches/verify-at-commit/subversion/svnlook/svnlook.c Thu Mar
28 23:49:30 2013
@@ -2664,6 +2664,16 @@ main(int argc, const char *argv[])
_("Unknown subcommand: '%s'\n"),
first_arg_utf8));
SVN_INT_ERR(subcommand_help(NULL, NULL, pool));
+
+ /* Be kind to people who try 'svn undo'. */
+ if (strcmp(first_arg_utf8, "verify") == 0)
+ {
+ svn_error_clear(
+ svn_cmdline_fprintf(stderr, pool,
+ _("Try 'svnadmin verify'
instead.\n")));
+ }
+
+
svn_pool_destroy(pool);
return EXIT_FAILURE;
}
Modified:
subversion/branches/verify-at-commit/subversion/tests/libsvn_diff/diff-diff3-test.c
URL:
http://svn.apache.org/viewvc/subversion/branches/verify-at-commit/subversion/tests/libsvn_diff/diff-diff3-test.c?rev=1462355&r1=1462354&r2=1462355&view=diff
==============================================================================
---
subversion/branches/verify-at-commit/subversion/tests/libsvn_diff/diff-diff3-test.c
(original)
+++
subversion/branches/verify-at-commit/subversion/tests/libsvn_diff/diff-diff3-test.c
Thu Mar 28 23:49:30 2013
@@ -241,6 +241,12 @@ two_way_diff(const char *filename1,
svn_stringbuf_t *actual;
char *diff_name = apr_psprintf(pool, "diff-%s-%s", filename1, filename2);
+ /* Some of the tests have lots of lines, although not much data as
+ the lines are short, and the in-memory diffs allocate a lot of
+ memory. Since we are doing multiple diff in a single test we use
+ a subpool to reuse that memory. */
+ apr_pool_t *subpool = svn_pool_create(pool);
+
/* We have an EXPECTED string we can match, because we don't support
any other combinations (yet) than the ones above. */
svn_string_t *original = svn_string_create(contents1, pool);
@@ -248,7 +254,8 @@ two_way_diff(const char *filename1,
options = options ? options : svn_diff_file_options_create(pool);
- SVN_ERR(svn_diff_mem_string_diff(&diff, original, modified, options, pool));
+ SVN_ERR(svn_diff_mem_string_diff(&diff, original, modified, options,
+ subpool));
actual = svn_stringbuf_create_empty(pool);
ostream = svn_stream_from_stringbuf(actual, pool);
@@ -256,7 +263,8 @@ two_way_diff(const char *filename1,
SVN_ERR(svn_diff_mem_string_output_unified(ostream, diff,
filename1, filename2,
SVN_APR_LOCALE_CHARSET,
- original, modified, pool));
+ original, modified, subpool));
+ svn_pool_clear(subpool);
SVN_ERR(svn_stream_close(ostream));
if (strcmp(actual->data, expected) != 0)
return svn_error_createf(SVN_ERR_TEST_FAILED, NULL,
@@ -311,11 +319,13 @@ two_way_diff(const char *filename1,
SVN_ERR(three_way_merge(filename1, filename2, filename1,
contents1, contents2, contents1, contents2, NULL,
svn_diff_conflict_display_modified_latest,
- pool));
+ subpool));
+ svn_pool_clear(subpool);
SVN_ERR(three_way_merge(filename2, filename1, filename2,
contents2, contents1, contents2, contents1, NULL,
svn_diff_conflict_display_modified_latest,
- pool));
+ subpool));
+ svn_pool_destroy(subpool);
SVN_ERR(svn_io_remove_file2(diff_name, TRUE, pool));
@@ -2565,22 +2575,22 @@ static svn_error_t *
test_token_compare(apr_pool_t *pool)
{
apr_size_t chunk_size = 1 << 17;
- const char *pattern = "\n\n\n\n\n\n\n\n";
+ const char *pattern = "ABCDEFG\n";
svn_stringbuf_t *original, *modified;
svn_diff_file_options_t *diff_opts = svn_diff_file_options_create(pool);
diff_opts->ignore_space = svn_diff_file_ignore_space_all;
+ original = svn_stringbuf_create_ensure(chunk_size * 2 + 8, pool);
/* CHUNK_SIZE bytes */
- original = svn_stringbuf_create_ensure(chunk_size, pool);
while (original->len < chunk_size - 8)
{
svn_stringbuf_appendcstr(original, pattern);
}
svn_stringbuf_appendcstr(original, " @@@\n");
+ modified = svn_stringbuf_create_ensure(chunk_size * 2 + 9, pool);
/* CHUNK_SIZE+1 bytes, one ' ' more than original */
- modified = svn_stringbuf_create_ensure(chunk_size + 1, pool);
while (modified->len < chunk_size - 8)
{
svn_stringbuf_appendcstr(modified, pattern);
@@ -2602,13 +2612,43 @@ test_token_compare(apr_pool_t *pool)
"--- token-compare-original2" NL
"+++ token-compare-modified2" NL
"@@ -%u,4 +%u,4 @@" NL
- " \n"
- " \n"
+ " ABCDEFG\n"
+ " ABCDEFG\n"
" @@@\n"
"-aaaaaaa\n"
"+bbbbbbb\n",
- 1 +(unsigned int)chunk_size - 8 + 1 - 3,
- 1 +(unsigned int)chunk_size - 8 + 1 - 3),
+ (unsigned int)chunk_size/8 - 2,
+ (unsigned int)chunk_size/8 - 2),
+ diff_opts, pool));
+
+ /* CHUNK_SIZE*2 bytes */
+ while (original->len <= chunk_size * 2 - 8)
+ {
+ svn_stringbuf_appendcstr(original, pattern);
+ }
+
+ /* CHUNK_SIZE*2+1 bytes, one ' ' more than original */
+ while (modified->len <= chunk_size * 2 - 7)
+ {
+ svn_stringbuf_appendcstr(modified, pattern);
+ }
+
+ SVN_ERR(two_way_diff("token-compare-original2", "token-compare-modified2",
+ original->data, modified->data,
+ apr_psprintf(pool,
+ "--- token-compare-original2" NL
+ "+++ token-compare-modified2" NL
+ "@@ -%u,7 +%u,7 @@" NL
+ " ABCDEFG\n"
+ " ABCDEFG\n"
+ " @@@\n"
+ "-aaaaaaa\n"
+ "+bbbbbbb\n"
+ " ABCDEFG\n"
+ " ABCDEFG\n"
+ " ABCDEFG\n",
+ (unsigned int)chunk_size/8 - 2,
+ (unsigned int)chunk_size/8 - 2),
diff_opts, pool));
return SVN_NO_ERROR;
Modified: subversion/branches/verify-at-commit/tools/dist/backport.pl
URL:
http://svn.apache.org/viewvc/subversion/branches/verify-at-commit/tools/dist/backport.pl?rev=1462355&r1=1462354&r2=1462355&view=diff
==============================================================================
--- subversion/branches/verify-at-commit/tools/dist/backport.pl (original)
+++ subversion/branches/verify-at-commit/tools/dist/backport.pl Thu Mar 28
23:49:30 2013
@@ -223,7 +223,8 @@ sub handle_entry {
sub main {
usage, exit 0 if @ARGV;
- usage, exit 1 unless -r $STATUS;
+
+ open STATUS, "<", $STATUS or (usage, exit 1);
# Because we use the ':normal' command in Vim...
die "A vim with the +ex_extra feature is required"
@@ -232,18 +233,17 @@ sub main {
# ### TODO: need to run 'revert' here
# ### TODO: both here and in merge(), unlink files that previous merges added
die "Local mods to STATUS file $STATUS" if `$SVN status -q $STATUS`;
- @ARGV = $STATUS;
# Skip most of the file
- while (<>) {
+ while (<STATUS>) {
last if /^Approved changes/;
}
- while (<>) {
+ while (<STATUS>) {
last unless /^=+$/;
}
$/ = ""; # paragraph mode
- while (<>) {
+ while (<STATUS>) {
my @lines = split /\n/;
given ($lines[0]) {