You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by pr...@apache.org on 2013/06/24 07:52:36 UTC
svn commit: r1495930 [3/3] - in /subversion/branches/verify-keep-going: ./
notes/tree-conflicts/ subversion/bindings/javahl/native/
subversion/bindings/javahl/src/org/apache/subversion/javahl/
subversion/bindings/javahl/src/org/apache/subversion/javahl...
Modified: subversion/branches/verify-keep-going/subversion/libsvn_wc/upgrade.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_wc/upgrade.c?rev=1495930&r1=1495929&r2=1495930&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_wc/upgrade.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_wc/upgrade.c Mon Jun 24 05:52:34 2013
@@ -2196,13 +2196,15 @@ svn_wc_upgrade(svn_wc_context_t *wc_ctx,
upgrade_working_copy_baton_t cb_baton;
svn_error_t *err;
int result_format;
+ svn_boolean_t bumped_format;
/* Try upgrading a wc-ng-style working copy. */
SVN_ERR(svn_wc__db_open(&db, NULL /* ### config */, TRUE, FALSE,
scratch_pool, scratch_pool));
- err = svn_wc__db_bump_format(&result_format, local_abspath, db,
+ err = svn_wc__db_bump_format(&result_format, &bumped_format,
+ db, local_abspath,
scratch_pool);
if (err)
{
@@ -2224,6 +2226,17 @@ svn_wc_upgrade(svn_wc_context_t *wc_ctx,
SVN_ERR_ASSERT(result_format == SVN_WC__VERSION);
+ if (bumped_format && notify_func)
+ {
+ svn_wc_notify_t *notify;
+
+ notify = svn_wc_create_notify(local_abspath,
+ svn_wc_notify_upgraded_path,
+ scratch_pool);
+
+ notify_func(notify_baton, notify, scratch_pool);
+ }
+
return SVN_NO_ERROR;
}
Modified: subversion/branches/verify-keep-going/subversion/libsvn_wc/util.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_wc/util.c?rev=1495930&r1=1495929&r2=1495930&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_wc/util.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_wc/util.c Mon Jun 24 05:52:34 2013
@@ -188,11 +188,11 @@ svn_wc_match_ignore_list(const char *str
return svn_cstring_match_glob_list(str, list);
}
-svn_wc_conflict_description2_t *
-svn_wc_conflict_description_create_text2(const char *local_abspath,
+svn_wc_conflict_description3_t *
+svn_wc_conflict_description_create_text3(const char *local_abspath,
apr_pool_t *result_pool)
{
- svn_wc_conflict_description2_t *conflict;
+ svn_wc_conflict_description3_t *conflict;
SVN_ERR_ASSERT_NO_RETURN(svn_dirent_is_absolute(local_abspath));
@@ -205,13 +205,13 @@ svn_wc_conflict_description_create_text2
return conflict;
}
-svn_wc_conflict_description2_t *
-svn_wc_conflict_description_create_prop2(const char *local_abspath,
+svn_wc_conflict_description3_t *
+svn_wc_conflict_description_create_prop3(const char *local_abspath,
svn_node_kind_t node_kind,
const char *property_name,
apr_pool_t *result_pool)
{
- svn_wc_conflict_description2_t *conflict;
+ svn_wc_conflict_description3_t *conflict;
SVN_ERR_ASSERT_NO_RETURN(svn_dirent_is_absolute(local_abspath));
@@ -223,8 +223,8 @@ svn_wc_conflict_description_create_prop2
return conflict;
}
-svn_wc_conflict_description2_t *
-svn_wc_conflict_description_create_tree2(
+svn_wc_conflict_description3_t *
+svn_wc_conflict_description_create_tree3(
const char *local_abspath,
svn_node_kind_t node_kind,
svn_wc_operation_t operation,
@@ -232,7 +232,7 @@ svn_wc_conflict_description_create_tree2
const svn_wc_conflict_version_t *src_right_version,
apr_pool_t *result_pool)
{
- svn_wc_conflict_description2_t *conflict;
+ svn_wc_conflict_description3_t *conflict;
SVN_ERR_ASSERT_NO_RETURN(svn_dirent_is_absolute(local_abspath));
@@ -249,11 +249,11 @@ svn_wc_conflict_description_create_tree2
}
-svn_wc_conflict_description2_t *
-svn_wc__conflict_description2_dup(const svn_wc_conflict_description2_t *conflict,
+svn_wc_conflict_description3_t *
+svn_wc__conflict_description3_dup(const svn_wc_conflict_description3_t *conflict,
apr_pool_t *pool)
{
- svn_wc_conflict_description2_t *new_conflict;
+ svn_wc_conflict_description3_t *new_conflict;
new_conflict = apr_pcalloc(pool, sizeof(*new_conflict));
Modified: subversion/branches/verify-keep-going/subversion/libsvn_wc/wc_db.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_wc/wc_db.c?rev=1495930&r1=1495929&r2=1495930&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_wc/wc_db.c Mon Jun 24 05:52:34 2013
@@ -14990,14 +14990,18 @@ svn_wc__db_verify(svn_wc__db_t *db,
svn_error_t *
svn_wc__db_bump_format(int *result_format,
- const char *wcroot_abspath,
+ svn_boolean_t *bumped_format,
svn_wc__db_t *db,
+ const char *wcroot_abspath,
apr_pool_t *scratch_pool)
{
svn_sqlite__db_t *sdb;
svn_error_t *err;
int format;
+ if (bumped_format)
+ *bumped_format = FALSE;
+
/* Do not scan upwards for a working copy root here to prevent accidental
* upgrades of any working copies the WCROOT might be nested in.
* Just try to open a DB at the specified path instead. */
@@ -15032,7 +15036,10 @@ svn_wc__db_bump_format(int *result_forma
SVN_ERR(svn_sqlite__read_schema_version(&format, sdb, scratch_pool));
err = svn_wc__upgrade_sdb(result_format, wcroot_abspath,
- sdb, format, scratch_pool);
+ sdb, format, scratch_pool);
+
+ if (err == SVN_NO_ERROR && bumped_format)
+ *bumped_format = (*result_format > format);
/* Make sure we return a different error than expected for upgrades from
entries */
Modified: subversion/branches/verify-keep-going/subversion/libsvn_wc/wc_db.h
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_wc/wc_db.h?rev=1495930&r1=1495929&r2=1495930&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_wc/wc_db.h (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_wc/wc_db.h Mon Jun 24 05:52:34 2013
@@ -2913,11 +2913,15 @@ svn_wc__db_upgrade_get_repos_id(apr_int6
* Upgrading subdirectories of a working copy is not supported.
* If WCROOT_ABSPATH is not a working copy root SVN_ERR_WC_INVALID_OP_ON_CWD
* is returned.
+ *
+ * If BUMPED_FORMAT is not NULL, set *BUMPED_FORMAT to TRUE if the format
+ * was bumped or to FALSE if the wc was already at the resulting format.
*/
svn_error_t *
svn_wc__db_bump_format(int *result_format,
- const char *wcroot_abspath,
+ svn_boolean_t *bumped_format,
svn_wc__db_t *db,
+ const char *wcroot_abspath,
apr_pool_t *scratch_pool);
/* @} */
Modified: subversion/branches/verify-keep-going/subversion/libsvn_wc/wc_db_update_move.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_wc/wc_db_update_move.c?rev=1495930&r1=1495929&r2=1495930&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_wc/wc_db_update_move.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_wc/wc_db_update_move.c Mon Jun 24 05:52:34 2013
@@ -1008,9 +1008,9 @@ static svn_error_t *
tc_editor_alter_file(void *baton,
const char *dst_relpath,
svn_revnum_t expected_move_dst_revision,
- apr_hash_t *new_props,
const svn_checksum_t *new_checksum,
svn_stream_t *new_contents,
+ apr_hash_t *new_props,
apr_pool_t *scratch_pool)
{
struct tc_editor_baton *b = baton;
@@ -1071,8 +1071,8 @@ static svn_error_t *
tc_editor_alter_symlink(void *baton,
const char *relpath,
svn_revnum_t revision,
- apr_hash_t *props,
const char *target,
+ apr_hash_t *props,
apr_pool_t *scratch_pool)
{
return svn_error_create(SVN_ERR_UNSUPPORTED_FEATURE, NULL, NULL);
@@ -1593,7 +1593,7 @@ update_moved_away_node(svn_editor_t *tc_
if (props || src_checksum)
SVN_ERR(svn_editor_alter_file(tc_editor, dst_relpath,
move_root_dst_revision,
- props, src_checksum, contents));
+ src_checksum, contents, props));
}
else if (src_kind == svn_node_dir)
{
Modified: subversion/branches/verify-keep-going/subversion/svn/cl.h
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/svn/cl.h?rev=1495930&r1=1495929&r2=1495930&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/svn/cl.h (original)
+++ subversion/branches/verify-keep-going/subversion/svn/cl.h Mon Jun 24 05:52:34 2013
@@ -239,6 +239,7 @@ typedef struct svn_cl__opt_state_t
svn_boolean_t include_externals; /* Recurses (in)to file & dir externals */
svn_boolean_t show_inherited_props; /* get inherited properties */
apr_array_header_t* search_patterns; /* pattern arguments for --search */
+ svn_boolean_t mergeinfo_log; /* show log message in mergeinfo command */
} svn_cl__opt_state_t;
@@ -820,23 +821,6 @@ svn_cl__local_style_skip_ancestor(const
const char *path,
apr_pool_t *pool);
-/* Check that PATH_OR_URL1@REVISION1 is related to PATH_OR_URL2@REVISION2.
- * Raise an error if not.
- *
- * ### Ideally we would also check that they are on different lines of
- * history. That is easy in common cases, but to give a correct answer in
- * general we need to know the operative revision(s) as well. For example,
- * when one location is the branch point from which the other branch was
- * copied.
- */
-svn_error_t *
-svn_cl__check_related_source_and_target(const char *path_or_url1,
- const svn_opt_revision_t *revision1,
- const char *path_or_url2,
- const svn_opt_revision_t *revision2,
- svn_client_ctx_t *ctx,
- apr_pool_t *pool);
-
/* If the user is setting a mime-type to mark one of the TARGETS as binary,
* as determined by property name PROPNAME and value PROPVAL, then check
* whether Subversion's own binary-file detection recognizes the target as
Modified: subversion/branches/verify-keep-going/subversion/svn/conflict-callbacks.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/svn/conflict-callbacks.c?rev=1495930&r1=1495929&r2=1495930&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/svn/conflict-callbacks.c (original)
+++ subversion/branches/verify-keep-going/subversion/svn/conflict-callbacks.c Mon Jun 24 05:52:34 2013
@@ -544,30 +544,10 @@ static const resolver_option_t tree_conf
static const resolver_option_t tree_conflict_options_update_moved_away[] =
{
- { "mc", N_("apply update (recommended)"),
- N_("apply update to the move destination"
+ { "mc", N_("apply update to move destination (recommended)"),
+ N_("apply incoming update to move destination"
" [mine-conflict]"),
svn_wc_conflict_choose_mine_conflict },
- { "r", N_("discard update (breaks move)"), N_("discard update, mark "
- "resolved, the move will "
- "will become a copy"),
- svn_wc_conflict_choose_merged },
- { "p", N_("postpone"), N_("resolve the conflict later [postpone]"),
- svn_wc_conflict_choose_postpone },
- { "q", N_("quit resolution"), N_("postpone all remaining conflicts"),
- svn_wc_conflict_choose_postpone },
- { "h", N_("help"), N_("show this help (also '?')"), -1 },
- { NULL }
-};
-static const resolver_option_t tree_conflict_options_update_edit_moved_away[] =
-{
- { "mc", N_("apply edit (recommended)"),
- N_("apply incoming edit to move destination"
- " [mine-conflict]"),
- svn_wc_conflict_choose_mine_conflict },
- { "r", N_("discard edit (breaks move)"), N_("discard edit, mark resolved, "
- "the move will become a copy"),
- svn_wc_conflict_choose_merged },
{ "p", N_("postpone"), N_("resolve the conflict later [postpone]"),
svn_wc_conflict_choose_postpone },
{ "q", N_("quit resolution"), N_("postpone all remaining conflicts"),
@@ -576,14 +556,12 @@ static const resolver_option_t tree_conf
{ NULL }
};
-static const resolver_option_t tree_conflict_options_update_deleted[] =
+static const resolver_option_t tree_conflict_options_update_edit_deleted_dir[] =
{
- { "mc", N_("keep affected local moves"), N_("keep any local moves affected "
- "by this deletion [mine-conflict]"),
+ { "mc", N_("prepare for updating moved-away children, if any (recommended)"),
+ N_("allow updating moved-away children "
+ "with 'svn resolve' [mine-conflict]"),
svn_wc_conflict_choose_mine_conflict },
- { "r", N_("mark resolved (breaks moves)"), N_("mark resolved, any affected "
- "moves will become copies"),
- svn_wc_conflict_choose_merged },
{ "p", N_("postpone"), N_("resolve the conflict later [postpone]"),
svn_wc_conflict_choose_postpone },
{ "q", N_("quit resolution"), N_("postpone all remaining conflicts"),
@@ -592,23 +570,6 @@ static const resolver_option_t tree_conf
{ NULL }
};
-static const resolver_option_t tree_conflict_options_update_replaced[] =
-{
- { "mc", N_("keep affected local moves"), N_("keep any moves affected by this "
- "replacement [mine-conflict]"),
- svn_wc_conflict_choose_mine_conflict },
- { "r", N_("mark resolved (breaks moves)"), N_("mark resolved (any affected "
- "moves will become copies)"),
- svn_wc_conflict_choose_merged },
- { "p", N_("postpone"), N_("resolve the conflict later [postpone]"),
- svn_wc_conflict_choose_postpone },
- { "q", N_("quit resolution"), N_("postpone all remaining conflicts"),
- svn_wc_conflict_choose_postpone },
- { "h", N_("help"), N_("show this help (also '?')"), -1 },
- { NULL }
-};
-
-
/* Return a pointer to the option description in OPTIONS matching the
* one- or two-character OPTION_CODE. Return NULL if not found. */
static const resolver_option_t *
@@ -1094,25 +1055,23 @@ handle_tree_conflict(svn_wc_conflict_res
svn_pool_clear(iterpool);
+ tc_opts = tree_conflict_options;
+
if (desc->operation == svn_wc_operation_update ||
desc->operation == svn_wc_operation_switch)
{
if (desc->reason == svn_wc_conflict_reason_moved_away)
{
- if (desc->action == svn_wc_conflict_action_edit)
- tc_opts = tree_conflict_options_update_edit_moved_away;
- else
- tc_opts = tree_conflict_options_update_moved_away;
- }
- else if (desc->reason == svn_wc_conflict_reason_deleted)
- tc_opts = tree_conflict_options_update_deleted;
- else if (desc->reason == svn_wc_conflict_reason_replaced)
- tc_opts = tree_conflict_options_update_replaced;
- else
- tc_opts = tree_conflict_options;
+ tc_opts = tree_conflict_options_update_moved_away;
+ }
+ else if (desc->reason == svn_wc_conflict_reason_deleted ||
+ desc->reason == svn_wc_conflict_reason_replaced)
+ {
+ if (desc->action == svn_wc_conflict_action_edit &&
+ desc->node_kind == svn_node_dir)
+ tc_opts = tree_conflict_options_update_edit_deleted_dir;
+ }
}
- else
- tc_opts = tree_conflict_options;
SVN_ERR(prompt_user(&opt, tc_opts, NULL, b->pb, iterpool));
if (! opt)
Modified: subversion/branches/verify-keep-going/subversion/svn/file-merge.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/svn/file-merge.c?rev=1495930&r1=1495929&r2=1495930&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/svn/file-merge.c (original)
+++ subversion/branches/verify-keep-going/subversion/svn/file-merge.c Mon Jun 24 05:52:34 2013
@@ -683,13 +683,19 @@ merge_chunks(apr_array_header_t **merged
}
if (strcmp(answer, "12") == 0)
{
- *merged_chunk = chunk1;
+ *merged_chunk = apr_array_make(result_pool,
+ chunk1->nelts + chunk2->nelts,
+ sizeof(svn_stringbuf_t *));
+ apr_array_cat(*merged_chunk, chunk1);
apr_array_cat(*merged_chunk, chunk2);
break;
}
if (strcmp(answer, "21") == 0)
{
- *merged_chunk = chunk2;
+ *merged_chunk = apr_array_make(result_pool,
+ chunk1->nelts + chunk2->nelts,
+ sizeof(svn_stringbuf_t *));
+ apr_array_cat(*merged_chunk, chunk2);
apr_array_cat(*merged_chunk, chunk1);
break;
}
Modified: subversion/branches/verify-keep-going/subversion/svn/merge-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/svn/merge-cmd.c?rev=1495930&r1=1495929&r2=1495930&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/svn/merge-cmd.c (original)
+++ subversion/branches/verify-keep-going/subversion/svn/merge-cmd.c Mon Jun 24 05:52:34 2013
@@ -101,15 +101,6 @@ run_merge(svn_boolean_t two_sources_spec
&& (first_range_end.kind == svn_opt_revision_unspecified))
{
ranges_to_merge = NULL;
-
- /* This must be a 'sync' merge so check branch relationship. */
- if (opt_state->verbose)
- SVN_ERR(svn_cmdline_printf(
- scratch_pool, _("--- Checking branch relationship\n")));
- SVN_ERR_W(svn_cl__check_related_source_and_target(
- sourcepath1, &peg_revision1,
- targetpath, &unspecified_revision, ctx, scratch_pool),
- _("Source and target must be different but related branches"));
}
if (opt_state->verbose)
Modified: subversion/branches/verify-keep-going/subversion/svn/mergeinfo-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/svn/mergeinfo-cmd.c?rev=1495930&r1=1495929&r2=1495930&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/svn/mergeinfo-cmd.c (original)
+++ subversion/branches/verify-keep-going/subversion/svn/mergeinfo-cmd.c Mon Jun 24 05:52:34 2013
@@ -27,7 +27,9 @@
/*** Includes. ***/
+#include "svn_compat.h"
#include "svn_pools.h"
+#include "svn_props.h"
#include "svn_client.h"
#include "svn_cmdline.h"
#include "svn_path.h"
@@ -55,6 +57,61 @@ print_log_rev(void *baton,
return SVN_NO_ERROR;
}
+/* The separator between log messages. */
+#define SEP_STRING \
+ "------------------------------------------------------------------------\n"
+
+/* Implements the svn_log_entry_receiver_t interface. */
+static svn_error_t *
+print_log_details(void *baton,
+ svn_log_entry_t *log_entry,
+ apr_pool_t *pool)
+{
+ const char *author;
+ const char *date;
+ const char *message;
+
+ svn_compat_log_revprops_out(&author, &date, &message, log_entry->revprops);
+
+ if (author == NULL)
+ author = _("(no author)");
+
+ if (date && date[0])
+ /* Convert date to a format for humans. */
+ SVN_ERR(svn_cl__time_cstring_to_human_cstring(&date, date, pool));
+ else
+ date = _("(no date)");
+
+ if (log_entry->non_inheritable)
+ SVN_ERR(svn_cmdline_printf(pool,
+ SEP_STRING "r%ld* | %s | %s",
+ log_entry->revision, author, date));
+ else
+ SVN_ERR(svn_cmdline_printf(pool,
+ SEP_STRING "r%ld | %s | %s",
+ log_entry->revision, author, date));
+
+ if (message != NULL)
+ {
+ /* Number of lines in the msg. */
+ int lines = svn_cstring_count_newlines(message) + 1;
+
+ SVN_ERR(svn_cmdline_printf(pool,
+ Q_(" | %d line", " | %d lines", lines),
+ lines));
+ }
+
+ SVN_ERR(svn_cmdline_printf(pool, "\n"));
+
+ if (message != NULL)
+ {
+ /* A blank line always precedes the log message. */
+ SVN_ERR(svn_cmdline_printf(pool, "\n%s\n", message));
+ }
+
+ return SVN_NO_ERROR;
+}
+
/* Draw a diagram (by printing text to the console) summarizing the state
* of merging between two branches, given the merge description
* indicated by YCA, BASE, RIGHT, TARGET, REINTEGRATE_LIKE. */
@@ -238,6 +295,50 @@ mergeinfo_summary(
return SVN_NO_ERROR;
}
+static svn_error_t *
+mergeinfo_log(svn_boolean_t finding_merged,
+ const char *target,
+ const svn_opt_revision_t *tgt_peg_revision,
+ const char *source,
+ const svn_opt_revision_t *src_peg_revision,
+ const svn_opt_revision_t *src_start_revision,
+ const svn_opt_revision_t *src_end_revision,
+ svn_depth_t depth,
+ svn_boolean_t include_log_details,
+ svn_client_ctx_t *ctx,
+ apr_pool_t *pool)
+{
+ apr_array_header_t *revprops;
+ svn_log_entry_receiver_t log_reciever;
+
+ if (include_log_details)
+ {
+ revprops = apr_array_make(pool, 3, sizeof(const char *));
+ APR_ARRAY_PUSH(revprops, const char *) = SVN_PROP_REVISION_AUTHOR;
+ APR_ARRAY_PUSH(revprops, const char *) = SVN_PROP_REVISION_DATE;
+ APR_ARRAY_PUSH(revprops, const char *) = SVN_PROP_REVISION_LOG;
+
+ log_reciever = print_log_details;
+ }
+ else
+ {
+ /* We need only revisions number, not revision properties. */
+ revprops = apr_array_make(pool, 0, sizeof(const char *));
+ log_reciever = print_log_rev;
+ }
+
+ SVN_ERR(svn_client_mergeinfo_log2(finding_merged, target,
+ tgt_peg_revision,
+ source, src_peg_revision,
+ src_start_revision,
+ src_end_revision,
+ log_reciever, NULL,
+ TRUE, depth, revprops, ctx,
+ pool));
+
+ return SVN_NO_ERROR;
+}
+
/* This implements the `svn_opt_subcommand_t' interface. */
svn_error_t *
svn_cl__mergeinfo(apr_getopt_t *os,
@@ -297,11 +398,6 @@ svn_cl__mergeinfo(apr_getopt_t *os,
tgt_peg_revision.kind = svn_opt_revision_base;
}
- SVN_ERR_W(svn_cl__check_related_source_and_target(source, &src_peg_revision,
- target, &tgt_peg_revision,
- ctx, pool),
- _("Source and target must be different but related branches"));
-
src_start_revision = &(opt_state->start_revision);
if (opt_state->end_revision.kind == svn_opt_revision_unspecified)
src_end_revision = src_start_revision;
@@ -311,23 +407,21 @@ svn_cl__mergeinfo(apr_getopt_t *os,
/* Do the real work, depending on the requested data flavor. */
if (opt_state->show_revs == svn_cl__show_revs_merged)
{
- SVN_ERR(svn_client_mergeinfo_log2(TRUE, target, &tgt_peg_revision,
- source, &src_peg_revision,
- src_start_revision,
- src_end_revision,
- print_log_rev, NULL,
- TRUE, depth, NULL, ctx,
- pool));
+ SVN_ERR(mergeinfo_log(TRUE, target, &tgt_peg_revision,
+ source, &src_peg_revision,
+ src_start_revision,
+ src_end_revision,
+ depth, opt_state->mergeinfo_log,
+ ctx, pool));
}
else if (opt_state->show_revs == svn_cl__show_revs_eligible)
{
- SVN_ERR(svn_client_mergeinfo_log2(FALSE, target, &tgt_peg_revision,
- source, &src_peg_revision,
- src_start_revision,
- src_end_revision,
- print_log_rev, NULL,
- TRUE, depth, NULL, ctx,
- pool));
+ SVN_ERR(mergeinfo_log(FALSE, target, &tgt_peg_revision,
+ source, &src_peg_revision,
+ src_start_revision,
+ src_end_revision,
+ depth, opt_state->mergeinfo_log,
+ ctx, pool));
}
else
{
@@ -340,6 +434,11 @@ svn_cl__mergeinfo(apr_getopt_t *os,
return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
_("Depth specification options valid only "
"with --show-revs option"));
+ if (opt_state->mergeinfo_log)
+ return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
+ _("--log option valid only with "
+ "--show-revs option"));
+
SVN_ERR(mergeinfo_summary(source, &src_peg_revision,
target, &tgt_peg_revision,
Modified: subversion/branches/verify-keep-going/subversion/svn/svn.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/svn/svn.c?rev=1495930&r1=1495929&r2=1495930&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/svn/svn.c (original)
+++ subversion/branches/verify-keep-going/subversion/svn/svn.c Mon Jun 24 05:52:34 2013
@@ -133,7 +133,8 @@ typedef enum svn_cl__longopt_t {
opt_include_externals,
opt_show_inherited_props,
opt_search,
- opt_search_and
+ opt_search_and,
+ opt_mergeinfo_log
} svn_cl__longopt_t;
@@ -379,6 +380,8 @@ const apr_getopt_option_t svn_cl__option
N_("use ARG as search pattern (glob syntax)")},
{"search-and", opt_search_and, 1,
N_("combine ARG with the previous search pattern")},
+ {"log", opt_mergeinfo_log, 0,
+ N_("show revision log message, author and date")},
/* Long-opt Aliases
*
@@ -1108,7 +1111,7 @@ const svn_opt_subcommand_desc2_t svn_cl_
" and the default for TARGET is HEAD for a URL or BASE for a WC path.\n"
"\n"
" The depth can be 'empty' or 'infinity'; the default is 'empty'.\n"),
- {'r', 'R', opt_depth, opt_show_revs} },
+ {'r', 'R', opt_depth, opt_show_revs, opt_mergeinfo_log} },
{ "mkdir", svn_cl__mkdir, {0}, N_
("Create a new directory under version control.\n"
@@ -2212,6 +2215,9 @@ sub_main(int argc, const char *argv[], a
_("'%s' is not a valid --show-revs value"),
utf8_opt_arg));
break;
+ case opt_mergeinfo_log:
+ opt_state.mergeinfo_log = TRUE;
+ break;
case opt_reintegrate:
opt_state.reintegrate = TRUE;
break;
Modified: subversion/branches/verify-keep-going/subversion/svn/util.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/svn/util.c?rev=1495930&r1=1495929&r2=1495930&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/svn/util.c (original)
+++ subversion/branches/verify-keep-going/subversion/svn/util.c Mon Jun 24 05:52:34 2013
@@ -1021,33 +1021,6 @@ path_for_display(const char *path_or_url
}
svn_error_t *
-svn_cl__check_related_source_and_target(const char *path_or_url1,
- const svn_opt_revision_t *revision1,
- const char *path_or_url2,
- const svn_opt_revision_t *revision2,
- svn_client_ctx_t *ctx,
- apr_pool_t *pool)
-{
- const char *ancestor_url;
- svn_revnum_t ancestor_rev;
-
- SVN_ERR(svn_client__youngest_common_ancestor(
- &ancestor_url, &ancestor_rev,
- path_or_url1, revision1, path_or_url2, revision2,
- ctx, pool, pool));
-
- if (ancestor_url == NULL)
- {
- return svn_error_createf(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
- _("Source and target have no common ancestor: "
- "'%s' and '%s'"),
- path_for_display(path_or_url1, revision1, pool),
- path_for_display(path_or_url2, revision2, pool));
- }
- return SVN_NO_ERROR;
-}
-
-svn_error_t *
svn_cl__propset_print_binary_mime_type_warning(apr_array_header_t *targets,
const char *propname,
const svn_string_t *propval,
Modified: subversion/branches/verify-keep-going/subversion/svnadmin/svnadmin.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/svnadmin/svnadmin.c?rev=1495930&r1=1495929&r2=1495930&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/svnadmin/svnadmin.c (original)
+++ subversion/branches/verify-keep-going/subversion/svnadmin/svnadmin.c Mon Jun 24 05:52:34 2013
@@ -48,8 +48,6 @@
#include "private/svn_subr_private.h"
#include "private/svn_cmdline_private.h"
-#include "../libsvn_fs_fs/fs.h" /* for SVN_FS_FS__MIN_PACKED_FORMAT */
-
#include "svn_private_config.h"
@@ -717,6 +715,18 @@ subcommand_create(apr_getopt_t *os, void
svn_hash_sets(fs_config, SVN_FS_CONFIG_PRE_1_8_COMPATIBLE, "1");
}
+ if (opt_state->compatible_version
+ && ! svn_version__at_least(opt_state->compatible_version, 1, 1, 0)
+ /* ### TODO: this NULL check hard-codes knowledge of the library's
+ default fs-type value */
+ && (opt_state->fs_type == NULL
+ || !strcmp(opt_state->fs_type, SVN_FS_TYPE_FSFS)))
+ {
+ return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
+ _("Repositories compatible with 1.0.x must use "
+ "--fs-type=bdb"));
+ }
+
SVN_ERR(svn_repos_create(&repos, opt_state->repository_path,
NULL, NULL, NULL, fs_config, pool));
svn_fs_set_warning_func(svn_repos_fs(repos), warning_func, NULL);
@@ -1781,8 +1791,8 @@ subcommand_info(apr_getopt_t *os, void *
SVN_ERR(svn_cmdline_printf(pool, _("FSFS Shard Size: %d\n"),
fsfs_info->shard_size));
- /* Print packing statistics, if supported by the FS format. */
- if (fs_format >= SVN_FS_FS__MIN_PACKED_FORMAT && fsfs_info->shard_size)
+ /* Print packing statistics, if enabled on the FS. */
+ if (fsfs_info->shard_size)
{
const int shard_size = fsfs_info->shard_size;
const int shards_packed = fsfs_info->min_unpacked_rev / shard_size;
Modified: subversion/branches/verify-keep-going/subversion/tests/cmdline/README
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/tests/cmdline/README?rev=1495930&r1=1495929&r2=1495930&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/tests/cmdline/README (original)
+++ subversion/branches/verify-keep-going/subversion/tests/cmdline/README Mon Jun 24 05:52:34 2013
@@ -245,9 +245,25 @@ Directory Contents
/verify.py: Verifies output from Subversion.
- /entry.py: Parse an `entries' file (### not used yet)
-
-
+ /testcase.py: Control of test case execution - contains
+ decorators for expected failures and conditionally
+ executed tests.
+
+ /sandbox.py: Tools for manipulating a test's working area
+ ("a sandbox"), those are handy for most simple
+ actions a test might want to perform on a wc.
+
+ /objects.py: Objects that keep track of state during a test.
+ (not directly used by the test scripts.)
+
+ /mergetrees.py: Routines that create merge scenarios.
+
+ /factory.py: Automatically generate a (near-)complete new
+ cmdline test from a series of shell commands.
+
+ /error.py: Error codes as constants, for convenience.
+ (auto-generated by tools/dev/gen-py-error.py)
+
What the Python Tests are Doing
===============================
Modified: subversion/branches/verify-keep-going/subversion/tests/cmdline/blame_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/tests/cmdline/blame_tests.py?rev=1495930&r1=1495929&r2=1495930&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/tests/cmdline/blame_tests.py (original)
+++ subversion/branches/verify-keep-going/subversion/tests/cmdline/blame_tests.py Mon Jun 24 05:52:34 2013
@@ -956,6 +956,35 @@ def blame_eol_handling(sbox):
'blame', f2)
+@SkipUnless(svntest.main.server_has_reverse_get_file_revs)
+@XFail()
+def blame_youngest_to_oldest(sbox):
+ "blame_youngest_to_oldest"
+
+ sbox.build()
+
+ # First, make a new revision of iota.
+ iota = sbox.ospath('iota')
+ orig_line = open(iota).read()
+ line = "New contents for iota\n"
+ svntest.main.file_append(iota, line)
+ sbox.simple_commit()
+
+ # Move the file, to check that the operation will peg correctly.
+ iota_moved = sbox.ospath('iota_moved')
+ sbox.simple_move('iota', 'iota_moved')
+ sbox.simple_commit()
+
+ # Delete a line.
+ open(iota_moved, 'w').write(line)
+ sbox.simple_commit()
+
+ expected_output = [
+ ' %d jrandom %s\n' % (3, orig_line[:-1]),
+ ]
+ svntest.actions.run_and_verify_svn(None, expected_output, [],
+ 'blame', '-r4:0', iota_moved)
+
########################################################################
# Run the tests
@@ -979,6 +1008,7 @@ test_list = [ None,
merge_sensitive_blame_and_empty_mergeinfo,
blame_multiple_targets,
blame_eol_handling,
+ blame_youngest_to_oldest,
]
if __name__ == '__main__':
Modified: subversion/branches/verify-keep-going/subversion/tests/cmdline/mergeinfo_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/tests/cmdline/mergeinfo_tests.py?rev=1495930&r1=1495929&r2=1495930&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/tests/cmdline/mergeinfo_tests.py (original)
+++ subversion/branches/verify-keep-going/subversion/tests/cmdline/mergeinfo_tests.py Mon Jun 24 05:52:34 2013
@@ -779,6 +779,31 @@ def noninheritable_mergeinfo_not_always_
[], sbox.repo_url + '/A', sbox.repo_url + '/branch',
'--show-revs', 'eligible', '-R')
+@SkipUnless(server_has_mergeinfo)
+def mergeinfo_log(sbox):
+ "'mergeinfo --log' on a path with mergeinfo"
+
+ sbox.build()
+ wc_dir = sbox.wc_dir
+
+ # make a branch 'A2'
+ sbox.simple_repo_copy('A', 'A2') # r2
+ # make a change in branch 'A'
+ sbox.simple_mkdir('A/newdir')
+ sbox.simple_commit() # r3
+ sbox.simple_update()
+
+ # Dummy up some mergeinfo.
+ svntest.actions.run_and_verify_svn(None, None, [],
+ 'ps', SVN_PROP_MERGEINFO, '/A:3',
+ sbox.ospath('A2'))
+ svntest.actions.run_and_verify_svn(None,
+ None, [],
+ 'mergeinfo', '--show-revs=merged',
+ '--log', sbox.repo_url + '/A',
+ sbox.ospath('A2'))
+
+
########################################################################
# Run the tests
@@ -796,6 +821,7 @@ test_list = [ None,
wc_target_inherits_mergeinfo_from_repos,
natural_history_is_not_eligible_nor_merged,
noninheritable_mergeinfo_not_always_eligible,
+ mergeinfo_log,
]
if __name__ == '__main__':
Modified: subversion/branches/verify-keep-going/subversion/tests/cmdline/svnadmin_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/tests/cmdline/svnadmin_tests.py?rev=1495930&r1=1495929&r2=1495930&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/tests/cmdline/svnadmin_tests.py (original)
+++ subversion/branches/verify-keep-going/subversion/tests/cmdline/svnadmin_tests.py Mon Jun 24 05:52:34 2013
@@ -1826,6 +1826,7 @@ def recover_old(sbox):
svntest.main.run_svnadmin("recover", sbox.repo_dir)
+@SkipUnless(svntest.main.is_fs_type_fsfs)
def verify_keep_going(sbox):
"svnadmin verify --keep-going test"
Modified: subversion/branches/verify-keep-going/subversion/tests/cmdline/svntest/main.py
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/tests/cmdline/svntest/main.py?rev=1495930&r1=1495929&r2=1495930&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/tests/cmdline/svntest/main.py (original)
+++ subversion/branches/verify-keep-going/subversion/tests/cmdline/svntest/main.py Mon Jun 24 05:52:34 2013
@@ -581,6 +581,9 @@ password-stores =
[miscellany]
interactive-conflicts = false
+
+[working-copy]
+exclusive-locking = true
"""
# define default server file contents if none provided
@@ -1356,6 +1359,9 @@ def server_enforces_date_syntax():
def server_has_atomic_revprop():
return options.server_minor_version >= 7
+def server_has_reverse_get_file_revs():
+ return options.server_minor_version >= 8
+
def is_plaintext_password_storage_disabled():
try:
predicate = re.compile("^WARNING: Plaintext password storage is enabled!")
Modified: subversion/branches/verify-keep-going/subversion/tests/libsvn_fs_fs/fs-pack-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/tests/libsvn_fs_fs/fs-pack-test.c?rev=1495930&r1=1495929&r2=1495930&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/tests/libsvn_fs_fs/fs-pack-test.c (original)
+++ subversion/branches/verify-keep-going/subversion/tests/libsvn_fs_fs/fs-pack-test.c Mon Jun 24 05:52:34 2013
@@ -124,6 +124,8 @@ pack_notify(void *baton,
return SVN_NO_ERROR;
}
+#define R1_LOG_MSG "Let's serf"
+
/* Create a packed filesystem in DIR. Set the shard size to
SHARD_SIZE and create NUM_REVS number of revisions (in addition to
r0). Use POOL for allocations. After this function successfully
@@ -165,6 +167,9 @@ create_packed_filesystem(const char *dir
SVN_ERR(svn_fs_begin_txn(&txn, fs, 0, subpool));
SVN_ERR(svn_fs_txn_root(&txn_root, txn, subpool));
SVN_ERR(svn_test__create_greek_tree(txn_root, subpool));
+ SVN_ERR(svn_fs_change_txn_prop(txn, SVN_PROP_REVISION_LOG,
+ svn_string_create(R1_LOG_MSG, pool),
+ pool));
SVN_ERR(svn_fs_commit_txn(&conflict, &after_rev, txn, subpool));
SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(after_rev));
@@ -823,6 +828,35 @@ test_info(const svn_test_opts_t *opts,
#undef MAX_REV
/* ------------------------------------------------------------------------ */
+#define REPO_NAME "test-repo-fsfs-pack-shard-size-one"
+#define SHARD_SIZE 1
+#define MAX_REV 4
+static svn_error_t *
+pack_shard_size_one(const svn_test_opts_t *opts,
+ apr_pool_t *pool)
+{
+ svn_string_t *propval;
+ svn_fs_t *fs;
+
+ /* Bail (with success) on known-untestable scenarios */
+ if ((strcmp(opts->fs_type, "fsfs") != 0)
+ || (opts->server_minor_version && (opts->server_minor_version < 6)))
+ return SVN_NO_ERROR;
+
+ SVN_ERR(create_packed_filesystem(REPO_NAME, opts, MAX_REV, SHARD_SIZE,
+ pool));
+ SVN_ERR(svn_fs_open(&fs, REPO_NAME, NULL, pool));
+ /* whitebox: revprop packing special-cases r0, which causes
+ (start_rev==1, end_rev==0) in pack_revprops_shard(). So test that. */
+ SVN_ERR(svn_fs_revision_prop(&propval, fs, 1, SVN_PROP_REVISION_LOG, pool));
+ SVN_TEST_STRING_ASSERT(propval->data, R1_LOG_MSG);
+
+ return SVN_NO_ERROR;
+}
+#undef REPO_NAME
+#undef SHARD_SIZE
+#undef MAX_REV
+/* ------------------------------------------------------------------------ */
/* The test table. */
@@ -849,5 +883,7 @@ struct svn_test_descriptor_t test_funcs[
"test file hint at shard boundary"),
SVN_TEST_OPTS_PASS(test_info,
"test svn_fs_info"),
+ SVN_TEST_OPTS_PASS(pack_shard_size_one,
+ "test packing with shard size = 1"),
SVN_TEST_NULL
};
Modified: subversion/branches/verify-keep-going/subversion/tests/libsvn_subr/io-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/tests/libsvn_subr/io-test.c?rev=1495930&r1=1495929&r2=1495930&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/tests/libsvn_subr/io-test.c (original)
+++ subversion/branches/verify-keep-going/subversion/tests/libsvn_subr/io-test.c Mon Jun 24 05:52:34 2013
@@ -481,6 +481,31 @@ test_three_file_content_comparison(apr_p
return err;
}
+static svn_error_t *
+read_length_line_shouldnt_loop(apr_pool_t *pool)
+{
+ const char *tmp_dir;
+ const char *tmp_file;
+ char buffer[4];
+ apr_size_t buffer_limit = sizeof(buffer);
+ apr_file_t *f;
+
+ SVN_ERR(svn_dirent_get_absolute(&tmp_dir, "read_length_tmp", pool));
+ SVN_ERR(svn_io_remove_dir2(tmp_dir, TRUE, NULL, NULL, pool));
+ SVN_ERR(svn_io_make_dir_recursively(tmp_dir, pool));
+ svn_test_add_dir_cleanup(tmp_dir);
+
+ SVN_ERR(svn_io_write_unique(&tmp_file, tmp_dir, "1234\r\n", 6,
+ svn_io_file_del_on_pool_cleanup, pool));
+
+ SVN_ERR(svn_io_file_open(&f, tmp_file, APR_READ, APR_OS_DEFAULT, pool));
+
+ SVN_TEST_ASSERT_ERROR(svn_io_read_length_line(f, buffer, &buffer_limit,
+ pool), SVN_ERR_MALFORMED_FILE);
+ SVN_TEST_ASSERT(buffer_limit == 4);
+
+ return SVN_NO_ERROR;
+}
/* The test table. */
@@ -496,5 +521,7 @@ struct svn_test_descriptor_t test_funcs[
"three file size comparison"),
SVN_TEST_PASS2(test_three_file_content_comparison,
"three file content comparison"),
+ SVN_TEST_PASS2(read_length_line_shouldnt_loop,
+ "svn_io_read_length_line() shouldn't loop"),
SVN_TEST_NULL
};
Modified: subversion/branches/verify-keep-going/subversion/tests/svn_test_fs.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/tests/svn_test_fs.c?rev=1495930&r1=1495929&r2=1495930&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/tests/svn_test_fs.c (original)
+++ subversion/branches/verify-keep-going/subversion/tests/svn_test_fs.c Mon Jun 24 05:52:34 2013
@@ -33,6 +33,7 @@
#include "svn_fs.h"
#include "svn_path.h"
#include "svn_delta.h"
+#include "svn_hash.h"
#include "svn_test_fs.h"
@@ -81,8 +82,8 @@ make_fs_config(const char *fs_type,
fs_type);
if (server_minor_version)
{
- if (server_minor_version == 6)
- /* no SVN_FS_CONFIG_PRE_1_7_COMPATIBLE */;
+ if (server_minor_version == 6 || server_minor_version == 7)
+ svn_hash_sets(fs_config, SVN_FS_CONFIG_PRE_1_8_COMPATIBLE, "1");
else if (server_minor_version == 5)
apr_hash_set(fs_config, SVN_FS_CONFIG_PRE_1_6_COMPATIBLE,
APR_HASH_KEY_STRING, "1");
Modified: subversion/branches/verify-keep-going/tools/client-side/svn-bench/help-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/tools/client-side/svn-bench/help-cmd.c?rev=1495930&r1=1495929&r2=1495930&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/tools/client-side/svn-bench/help-cmd.c (original)
+++ subversion/branches/verify-keep-going/tools/client-side/svn-bench/help-cmd.c Mon Jun 24 05:52:34 2013
@@ -80,7 +80,7 @@ svn_cl__help(apr_getopt_t *os,
SVN_ERR(svn_ra_print_modules(version_footer, pool));
return svn_opt_print_help4(os,
- "svn", /* ### erm, derive somehow? */
+ "svn-bench", /* ### erm, derive somehow? */
opt_state ? opt_state->version : FALSE,
opt_state ? opt_state->quiet : FALSE,
opt_state ? opt_state->verbose : FALSE,
Modified: subversion/branches/verify-keep-going/tools/dist/backport.pl
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/tools/dist/backport.pl?rev=1495930&r1=1495929&r2=1495930&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/tools/dist/backport.pl (original)
+++ subversion/branches/verify-keep-going/tools/dist/backport.pl Mon Jun 24 05:52:34 2013
@@ -50,13 +50,12 @@ sub usage {
my $basename = $0;
$basename =~ s#.*/##;
print <<EOF;
-Run this from the root of your release branch (e.g., 1.6.x) working copy.
+Run this from the root of your release branch (e.g., 1.6.x) working copy. Use
+a working copy 'svn revert -R .' can be run on at any time, as this script
+will run revert prior to every merge.
-For each entry in STATUS, you will be prompted whether to merge it.
-
-WARNING:
-If you accept the prompt, $basename will revert all local changes and will
-commit the merge immediately.
+For each entry in STATUS, you will be prompted whether to merge it. The
+merge will not be committed.
The 'svn' binary defined by the environment variable \$SVN, or otherwise the
'svn' found in \$PATH, will be used to manage the working copy.
@@ -69,9 +68,9 @@ sub prompt {
my %args = @_;
die "$0: called prompt() in non-interactive mode!" if $YES;
- # TODO: this part was written by trial-and-error
ReadMode 'cbreak';
my $answer = (ReadKey 0);
+ ReadMode 'restore';
print $answer, "\n";
return $args{verbose}
? $answer
Propchange: subversion/branches/verify-keep-going/tools/dist/make-deps-tarball.sh
------------------------------------------------------------------------------
Merged /subversion/branches/javahl-ra/tools/dist/make-deps-tarball.sh:r1329209-1494640
Merged /subversion/trunk/tools/dist/make-deps-tarball.sh:r1488970-1495340
Modified: subversion/branches/verify-keep-going/tools/server-side/fsfs-stats.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/tools/server-side/fsfs-stats.c?rev=1495930&r1=1495929&r2=1495930&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/tools/server-side/fsfs-stats.c (original)
+++ subversion/branches/verify-keep-going/tools/server-side/fsfs-stats.c Mon Jun 24 05:52:34 2013
@@ -2169,13 +2169,13 @@ int main(int argc, const char *argv[])
svn_err = read_revisions(&fs, repo_path, start_revision, memsize, pool);
printf("\n");
- print_stats(fs, pool);
-
if (svn_err)
{
svn_handle_error2(svn_err, stdout, FALSE, ERROR_TAG);
return 2;
}
+ print_stats(fs, pool);
+
return 0;
}
Modified: subversion/branches/verify-keep-going/tools/server-side/svnpubsub/svnpubsub/server.py
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/tools/server-side/svnpubsub/svnpubsub/server.py?rev=1495930&r1=1495929&r2=1495930&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/tools/server-side/svnpubsub/svnpubsub/server.py (original)
+++ subversion/branches/verify-keep-going/tools/server-side/svnpubsub/svnpubsub/server.py Mon Jun 24 05:52:34 2013
@@ -25,7 +25,7 @@
# Instead of using a complicated XMPP/AMPQ/JMS/super messaging service,
# we have simple HTTP GETs and PUTs to get data in and out.
#
-# Currently supports both XML and JSON serialization.
+# Currently supports JSON serialization.
#
# Example Sub clients:
# curl -sN http://127.0.0.1:2069/commits
Modified: subversion/branches/verify-keep-going/tools/server-side/svnpubsub/svnwcsub.py
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/tools/server-side/svnpubsub/svnwcsub.py?rev=1495930&r1=1495929&r2=1495930&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/tools/server-side/svnpubsub/svnwcsub.py (original)
+++ subversion/branches/verify-keep-going/tools/server-side/svnpubsub/svnwcsub.py Mon Jun 24 05:52:34 2013
@@ -73,12 +73,18 @@ import svnpubsub.util
assert hasattr(subprocess, 'check_call')
def check_call(*args, **kwds):
- """Wrapper around subprocess.check_call() that logs stderr upon failure."""
+ """Wrapper around subprocess.check_call() that logs stderr upon failure,
+ with an optional list of exit codes to consider non-failure."""
assert 'stderr' not in kwds
+ if '__okayexits' in kwds:
+ __okayexits = kwds['__okayexits']
+ del kwds['__okayexits']
+ else:
+ __okayexits = set([0]) # EXIT_SUCCESS
kwds.update(stderr=subprocess.PIPE)
pipe = subprocess.Popen(*args, **kwds)
output, errput = pipe.communicate()
- if pipe.returncode:
+ if pipe.returncode not in __okayexits:
cmd = args[0] if len(args) else kwds.get('args', '(no command)')
# TODO: log stdout too?
logging.error('Command failed: returncode=%d command=%r stderr=%r',
@@ -292,6 +298,21 @@ class BackgroundWorker(threading.Thread)
logging.info("updating: %s", wc.path)
+ ## Run the hook
+ HEAD = svn_info(self.svnbin, self.env, wc.url)['Revision']
+ if self.hook:
+ hook_mode = ['pre-update', 'pre-boot'][boot]
+ logging.info('running hook: %s at %s',
+ wc.path, hook_mode)
+ args = [self.hook, hook_mode, wc.path, HEAD, wc.url]
+ rc = check_call(args, env=self.env, __okayexits=[0, 1])
+ if rc == 1:
+ # TODO: log stderr
+ logging.warn('hook denied update of %s at %s',
+ wc.path, hook_mode)
+ return
+ del rc
+
### we need to move some of these args into the config. these are
### still specific to the ASF setup.
args = [self.svnbin, 'switch',
@@ -302,12 +323,13 @@ class BackgroundWorker(threading.Thread)
'--config-option',
'config:miscellany:use-commit-times=on',
'--',
- wc.url,
+ wc.url + '@' + HEAD,
wc.path]
check_call(args, env=self.env)
### check the loglevel before running 'svn info'?
info = svn_info(self.svnbin, self.env, wc.path)
+ assert info['Revision'] == HEAD
logging.info("updated: %s now at r%s", wc.path, info['Revision'])
## Run the hook