Propchange: subversion/branches/move-tracking-2/subversion/libsvn_fs_x/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Sat Jun 13 10:21:18 2015 @@ -90,4 +90,4 @@ /subversion/branches/verify-keep-going/subversion/libsvn_fs_x:1439280-1492639,1546002-1546110 /subversion/branches/wc-collate-path/subversion/libsvn_fs_x:1402685-1480384 /subversion/trunk/subversion/libsvn_fs_fs:1415133-1596500,1596567,1597414,1597989,1598273,1599140,1600872,1601633,1603485-1603487,1603499,1603605,1604128,1604188,1604413-1604414,1604416-1604417,1604421,1604442,1604700,1604717,1604720,1604726,1604755,1604794,1604802,1604824,1604836,1604844,1604902-1604903,1604911,1604925,1604933,1604947,1605059-1605060,1605064-1605065,1605068,1605071-1605073,1605075,1605123,1605188-1605189,1605191,1605197,1605444,1605633,1606132,1606142,1606144,1606514,1606526,1606528,1606551,1606554,1606564,1606598-1606599,1606656,1606658,1606662,1606744,1606840,1607085,1607572,1612407,1612810,1613339,1613872,1614611,1615348,1615351-1615352,1615356,1616338-1616339,1616613,1617586,1617688,1618138,1618151,1618153,1618226,1618641,1618653,1618662,1619068,1619358,1619413,1619769,1619774,1620602,1620909,1620912,1620928,1620930,1621275,1621635,1622931,1622937,1622942,1622946,1622959-1622960,1622963,1622987,1623007,1623368,1623373,1623377,1623379,1623381,1623398,1623402,162 4011,1624265,1624512,1626246,1626871,1626873,1626886,1627497-1627498,1627502,1627947-1627949,1627966,1628083,1628093,1628158-1628159,1628161,1628392-1628393,1628415,1628427,1628676,1628738,1628762,1628764,1629854-1629855,1629857,1629865,1629873,1629875,1629879,1630067,1630070,1631049-1631051,1631075,1631115,1631171,1631180,1631185-1631186,1631196-1631197,1631239-1631240,1631548,1631550,1631563,1631567,1631588,1631598,1632646,1632776,1632849,1632851-1632853,1632856-1632857,1632868,1632908,1632926,1633232,1633617-1633618,1634872,1634875,1634879-1634880,1634920,1636478,1636483,1636629,1636644,1637184,1637186,1637330,1637358,1637363,1637393,1639319,1639322,1639335,1639348,1639352,1639355,1639358,1639414,1639419,1639426,1639430,1639436,1639440,1639549,1640061-1640062,1640197,1640915,1640966,1641013,1643139,1643233,1645567,1646021,1646712,1646716,1647537,1647540-1647541,1647820,1647905,1648230,1648238,1648241-1648243,1648253,1648272,1648532,1648537-1648539,1648542,1648591,1648612,1653608, 1658482 -/subversion/trunk/subversion/libsvn_fs_x:1414756-1509914,1606692-1682838 +/subversion/trunk/subversion/libsvn_fs_x:1414756-1509914,1606692-1685232
Modified: subversion/branches/move-tracking-2/subversion/libsvn_fs_x/cached_data.c URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_fs_x/cached_data.c?rev=1685233&r1=1685232&r2=1685233&view=diff ============================================================================== --- subversion/branches/move-tracking-2/subversion/libsvn_fs_x/cached_data.c (original) +++ subversion/branches/move-tracking-2/subversion/libsvn_fs_x/cached_data.c Sat Jun 13 10:21:18 2015 @@ -838,7 +838,7 @@ svn_fs_x__check_rep(svn_fs_x__representa && entry->type != SVN_FS_X__ITEM_TYPE_FILE_PROPS && entry->type != SVN_FS_X__ITEM_TYPE_DIR_PROPS && entry->type != SVN_FS_X__ITEM_TYPE_REPS_CONT)) - return svn_error_createf(SVN_ERR_REPOS_CORRUPTED, NULL, + return svn_error_createf(SVN_ERR_FS_CORRUPT, NULL, _("No representation found at offset %s " "for item %s in revision %ld"), apr_off_t_toa(scratch_pool, offset), @@ -2534,7 +2534,7 @@ read_dir_entries(apr_array_header_t *ent /* In incremental mode, update the hash; otherwise, write to the * final array. */ if (incremental) - apr_hash_set(hash, entry.key, entry.keylen, dirent); + apr_hash_set(hash, dirent->name, entry.keylen, dirent); else APR_ARRAY_PUSH(entries, svn_fs_x__dirent_t *) = dirent; } Modified: subversion/branches/move-tracking-2/subversion/libsvn_fs_x/revprops.c URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_fs_x/revprops.c?rev=1685233&r1=1685232&r2=1685233&view=diff ============================================================================== --- subversion/branches/move-tracking-2/subversion/libsvn_fs_x/revprops.c (original) +++ subversion/branches/move-tracking-2/subversion/libsvn_fs_x/revprops.c Sat Jun 13 10:21:18 2015 @@ -895,7 +895,8 @@ parse_packed_revprops(svn_fs_t *fs, * length header to remove) */ svn_stringbuf_t *compressed = revprops->packed_revprops; svn_stringbuf_t *uncompressed = svn_stringbuf_create_empty(result_pool); - SVN_ERR(svn__decompress(compressed, uncompressed, APR_SIZE_MAX)); + SVN_ERR(svn__decompress(compressed->data, compressed->len, + uncompressed, APR_SIZE_MAX)); /* read first revision number and number of revisions in the pack */ stream = svn_stream_from_stringbuf(uncompressed, scratch_pool); @@ -1354,7 +1355,7 @@ repack_revprops(svn_fs_t *fs, SVN_ERR(svn_stream_close(stream)); /* compress / store the data */ - SVN_ERR(svn__compress(uncompressed, + SVN_ERR(svn__compress(uncompressed->data, uncompressed->len, compressed, ffd->compress_packed_revprops ? SVN_DELTA_COMPRESSION_LEVEL_DEFAULT @@ -1803,7 +1804,8 @@ svn_fs_x__copy_revprops(const char *pack SVN_ERR(svn_stream_close(pack_stream)); /* compress the content (or just store it for COMPRESSION_LEVEL 0) */ - SVN_ERR(svn__compress(uncompressed, compressed, compression_level)); + SVN_ERR(svn__compress(uncompressed->data, uncompressed->len, + compressed, compression_level)); /* write the pack file content to disk */ stream = svn_stream_from_aprfile2(pack_file, FALSE, scratch_pool); Modified: subversion/branches/move-tracking-2/subversion/libsvn_fs_x/tree.c URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_fs_x/tree.c?rev=1685233&r1=1685232&r2=1685233&view=diff ============================================================================== --- subversion/branches/move-tracking-2/subversion/libsvn_fs_x/tree.c (original) +++ subversion/branches/move-tracking-2/subversion/libsvn_fs_x/tree.c Sat Jun 13 10:21:18 2015 @@ -1737,7 +1737,9 @@ compare_dir_structure(svn_boolean_t *cha /* This is a different entry. */ *changed = TRUE; - break; + svn_pool_destroy(iterpool); + + return SVN_NO_ERROR; } svn_pool_destroy(iterpool); Modified: subversion/branches/move-tracking-2/subversion/libsvn_repos/dump.c URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_repos/dump.c?rev=1685233&r1=1685232&r2=1685233&view=diff ============================================================================== --- subversion/branches/move-tracking-2/subversion/libsvn_repos/dump.c (original) +++ subversion/branches/move-tracking-2/subversion/libsvn_repos/dump.c Sat Jun 13 10:21:18 2015 @@ -2334,7 +2334,7 @@ verify_one_revision(svn_fs_t *fs, } /* Baton type used for forwarding notifications from FS API to REPOS API. */ -struct verify_fs2_notify_func_baton_t +struct verify_fs_notify_func_baton_t { /* notification function to call (must not be NULL) */ svn_repos_notify_func_t notify_func; @@ -2348,11 +2348,11 @@ struct verify_fs2_notify_func_baton_t /* Forward the notification to BATON. */ static void -verify_fs2_notify_func(svn_revnum_t revision, +verify_fs_notify_func(svn_revnum_t revision, void *baton, apr_pool_t *pool) { - struct verify_fs2_notify_func_baton_t *notify_baton = baton; + struct verify_fs_notify_func_baton_t *notify_baton = baton; notify_baton->notify->revision = revision; notify_baton->notify_func(notify_baton->notify_baton, @@ -2378,9 +2378,10 @@ svn_repos_verify_fs3(svn_repos_t *repos, apr_pool_t *iterpool = svn_pool_create(pool); svn_repos_notify_t *notify; svn_fs_progress_notify_func_t verify_notify = NULL; - struct verify_fs2_notify_func_baton_t *verify_notify_baton = NULL; + struct verify_fs_notify_func_baton_t *verify_notify_baton = NULL; svn_error_t *err; - svn_boolean_t found_corruption = FALSE; + svn_boolean_t failed_metadata = FALSE; + svn_revnum_t failed_revisions = 0; /* Determine the current youngest revision of the filesystem. */ SVN_ERR(svn_fs_youngest_rev(&youngest, fs, pool)); @@ -2409,7 +2410,7 @@ svn_repos_verify_fs3(svn_repos_t *repos, { notify = svn_repos_notify_create(svn_repos_notify_verify_rev_end, pool); - verify_notify = verify_fs2_notify_func; + verify_notify = verify_fs_notify_func; verify_notify_baton = apr_palloc(pool, sizeof(*verify_notify_baton)); verify_notify_baton->notify_func = notify_func; verify_notify_baton->notify_baton = notify_baton; @@ -2423,34 +2424,26 @@ svn_repos_verify_fs3(svn_repos_t *repos, verify_notify, verify_notify_baton, cancel_func, cancel_baton, pool); - if (err) + if (err && err->apr_err == SVN_ERR_CANCELLED) + { + return svn_error_trace(err); + } + else if (err) { - if (err->apr_err == SVN_ERR_CANCELLED) - return svn_error_trace(err); - - found_corruption = TRUE; notify_verification_error(SVN_INVALID_REVNUM, err, notify_func, notify_baton, iterpool); - /* If we already reported the error, reset it. */ - if (notify_func) + if (!keep_going) + { + /* Return the error, the caller doesn't want us to continue. */ + return svn_error_trace(err); + } + else { + /* Clear the error and keep going. */ + failed_metadata = TRUE; svn_error_clear(err); - err = NULL; } - - /* If we abort the verification now, combine yet unreported error - info with the generic one we return. */ - if (!keep_going) - /* ### Jump to "We're done" and so send the final notification, - for consistency? */ - return svn_error_createf(SVN_ERR_REPOS_CORRUPTED, err, - _("Repository '%s' failed to verify"), - svn_dirent_local_style(svn_repos_path(repos, - pool), - pool)); - - svn_error_clear(err); } if (!metadata_only) @@ -2464,24 +2457,30 @@ svn_repos_verify_fs3(svn_repos_t *repos, cancel_func, cancel_baton, iterpool); - if (err) + if (err && err->apr_err == SVN_ERR_CANCELLED) + { + return svn_error_trace(err); + } + else if (err) { - if (err->apr_err == SVN_ERR_CANCELLED) - return svn_error_trace(err); - - found_corruption = TRUE; notify_verification_error(rev, err, notify_func, notify_baton, iterpool); - svn_error_clear(err); - if (keep_going) - continue; + if (!keep_going) + { + /* Return the error, the caller doesn't want us to continue. */ + return svn_error_trace(err); + } else - break; + { + /* Clear the error and keep going. */ + ++failed_revisions; + svn_error_clear(err); + } } - - if (notify_func) + else if (notify_func) { + /* Tell the caller that we're done with this revision. */ notify->revision = rev; notify_func(notify_baton, notify, iterpool); } @@ -2496,12 +2495,40 @@ svn_repos_verify_fs3(svn_repos_t *repos, svn_pool_destroy(iterpool); - if (found_corruption) - return svn_error_createf(SVN_ERR_REPOS_CORRUPTED, NULL, - _("Repository '%s' failed to verify"), - svn_dirent_local_style(svn_repos_path(repos, - pool), - pool)); + /* Summarize the results. */ + if (failed_metadata || 0 != failed_revisions) + { + const char *const repos_path = + svn_dirent_local_style(svn_repos_path(repos, pool), pool); + + if (0 == failed_revisions) + { + return svn_error_createf( + SVN_ERR_REPOS_VERIFY_FAILED, NULL, + _("Metadata verification failed on repository '%s'"), + repos_path); + } + else + { + const char* format_string; + + if (failed_metadata) + format_string = apr_psprintf( + pool, _("Verification of metadata and" + " %%%s out of %%%s revisions" + " failed on repository '%%s'"), + SVN_REVNUM_T_FMT, SVN_REVNUM_T_FMT); + else + format_string = apr_psprintf( + pool, _("Verification of %%%s out of %%%s revisions" + " failed on repository '%%s'"), + SVN_REVNUM_T_FMT, SVN_REVNUM_T_FMT); + + return svn_error_createf( + SVN_ERR_REPOS_VERIFY_FAILED, NULL, format_string, + failed_revisions, end_rev - start_rev + 1, repos_path); + } + } return SVN_NO_ERROR; } Modified: subversion/branches/move-tracking-2/subversion/libsvn_subr/compress.c URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_subr/compress.c?rev=1685233&r1=1685232&r2=1685233&view=diff ============================================================================== --- subversion/branches/move-tracking-2/subversion/libsvn_subr/compress.c (original) +++ subversion/branches/move-tracking-2/subversion/libsvn_subr/compress.c Sat Jun 13 10:21:18 2015 @@ -220,7 +220,7 @@ zlib_decode(const unsigned char *in, apr } svn_error_t * -svn__compress(svn_stringbuf_t *in, +svn__compress(const void *data, apr_size_t len, svn_stringbuf_t *out, int compression_method) { @@ -230,13 +230,13 @@ svn__compress(svn_stringbuf_t *in, _("Unsupported compression method %d"), compression_method); - return zlib_encode(in->data, in->len, out, compression_method); + return zlib_encode(data, len, out, compression_method); } svn_error_t * -svn__decompress(svn_stringbuf_t *in, +svn__decompress(const void *data, apr_size_t len, svn_stringbuf_t *out, apr_size_t limit) { - return zlib_decode((const unsigned char*)in->data, in->len, out, limit); + return zlib_decode(data, len, out, limit); } Modified: subversion/branches/move-tracking-2/subversion/libsvn_subr/packed_data.c URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_subr/packed_data.c?rev=1685233&r1=1685232&r2=1685233&view=diff ============================================================================== --- subversion/branches/move-tracking-2/subversion/libsvn_subr/packed_data.c (original) +++ subversion/branches/move-tracking-2/subversion/libsvn_subr/packed_data.c Sat Jun 13 10:21:18 2015 @@ -561,7 +561,7 @@ write_stream_data(svn_stream_t *stream, svn_stringbuf_t *uncompressed, svn_stringbuf_t *compressed) { - SVN_ERR(svn__compress(uncompressed, + SVN_ERR(svn__compress(uncompressed->data, uncompressed->len, compressed, SVN_DELTA_COMPRESSION_LEVEL_DEFAULT)); @@ -972,7 +972,8 @@ read_stream_data(svn_stream_t *stream, SVN_ERR(svn_stream_read_full(stream, compressed->data, &compressed->len)); compressed->data[compressed_len] = '\0'; - SVN_ERR(svn__decompress(compressed, uncompressed, uncompressed_len)); + SVN_ERR(svn__decompress(compressed->data, compressed->len, + uncompressed, uncompressed_len)); return SVN_NO_ERROR; } Modified: subversion/branches/move-tracking-2/subversion/libsvn_subr/version.c URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_subr/version.c?rev=1685233&r1=1685232&r2=1685233&view=diff ============================================================================== --- subversion/branches/move-tracking-2/subversion/libsvn_subr/version.c (original) +++ subversion/branches/move-tracking-2/subversion/libsvn_subr/version.c Sat Jun 13 10:21:18 2015 @@ -40,11 +40,13 @@ svn_subr_version(void) svn_boolean_t svn_ver_compatible(const svn_version_t *my_version, const svn_version_t *lib_version) { - /* With normal development builds the matching rules are strict, to - avoid inadvertantly using the wrong libraries. For backward - compatibility testing use --disable-full-version-match to - configure 1.7 and then the libraries that get built can be used - to replace those in 1.6 or earlier builds. */ + /* With normal development builds the matching rules are stricter + that for release builds, to avoid inadvertantly using the wrong + libraries. For backward compatibility testing of development + builds one can use --disable-full-version-match to cause a + development build to use the release build rules. This allows + the libraries from the newer development build to be used by an + older development build. */ #ifndef SVN_DISABLE_FULL_VERSION_MATCH if (lib_version->tag[0] != '\0') @@ -83,6 +85,11 @@ svn_ver_check_list2(const svn_version_t svn_error_t *err = SVN_NO_ERROR; int i; +#ifdef SVN_DISABLE_FULL_VERSION_MATCH + /* Force more relaxed check for --disable-full-version-match. */ + comparator = svn_ver_compatible; +#endif + for (i = 0; checklist[i].label != NULL; ++i) { const svn_version_t *lib_version = checklist[i].version_query(); Modified: subversion/branches/move-tracking-2/subversion/mod_dav_svn/liveprops.c URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/mod_dav_svn/liveprops.c?rev=1685233&r1=1685232&r2=1685233&view=diff ============================================================================== --- subversion/branches/move-tracking-2/subversion/mod_dav_svn/liveprops.c (original) +++ subversion/branches/move-tracking-2/subversion/mod_dav_svn/liveprops.c Sat Jun 13 10:21:18 2015 @@ -239,7 +239,7 @@ get_last_modified_time(const char **date } if (timeval) - memcpy(timeval, &timeval_tmp, sizeof(*timeval)); + *timeval = timeval_tmp; if (! datestring) return 0; Modified: subversion/branches/move-tracking-2/subversion/mod_dav_svn/status.c URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/mod_dav_svn/status.c?rev=1685233&r1=1685232&r2=1685233&view=diff ============================================================================== --- subversion/branches/move-tracking-2/subversion/mod_dav_svn/status.c (original) +++ subversion/branches/move-tracking-2/subversion/mod_dav_svn/status.c Sat Jun 13 10:21:18 2015 @@ -30,7 +30,7 @@ #include "private/svn_fs_private.h" #ifndef DEFAULT_TIME_FORMAT -#define DEFAULT_TIME_FORMAT "%F %H:%M:%S %z" +#define DEFAULT_TIME_FORMAT "%Y-%m-%d %H:%M:%S %Z" #endif /* A bit like mod_status: add a location: Modified: subversion/branches/move-tracking-2/subversion/mod_dav_svn/util.c URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/mod_dav_svn/util.c?rev=1685233&r1=1685232&r2=1685233&view=diff ============================================================================== --- subversion/branches/move-tracking-2/subversion/mod_dav_svn/util.c (original) +++ subversion/branches/move-tracking-2/subversion/mod_dav_svn/util.c Sat Jun 13 10:21:18 2015 @@ -40,6 +40,7 @@ #include "dav_svn.h" #include "private/svn_fspath.h" +#include "private/svn_string_private.h" dav_error * dav_svn__new_error(apr_pool_t *pool, @@ -820,7 +821,7 @@ request_body_to_string(svn_string_t **re { ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "Request body is larger than the configured " - "limit of %lu", (unsigned long)limit_req_body); + "limit of %" APR_OFF_T_FMT, limit_req_body); result = HTTP_REQUEST_ENTITY_TOO_LARGE; goto cleanup; } @@ -835,9 +836,7 @@ request_body_to_string(svn_string_t **re apr_brigade_destroy(brigade); /* Make an svn_string_t from our svn_stringbuf_t. */ - *request_str = svn_string_create_empty(pool); - (*request_str)->data = buf->data; - (*request_str)->len = buf->len; + *request_str = svn_stringbuf__morph_into_string(buf); return OK; cleanup: Modified: subversion/branches/move-tracking-2/subversion/svn/cl-conflicts.c URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/svn/cl-conflicts.c?rev=1685233&r1=1685232&r2=1685233&view=diff ============================================================================== --- subversion/branches/move-tracking-2/subversion/svn/cl-conflicts.c (original) +++ subversion/branches/move-tracking-2/subversion/svn/cl-conflicts.c Sat Jun 13 10:21:18 2015 @@ -236,7 +236,7 @@ svn_cl__get_human_readable_prop_conflict /* We provide separately translatable strings for the values that we * know about, and a fall-back in case any other values occur. */ - switch (svn_client_conflict_get_reason(conflict)) + switch (svn_client_conflict_get_local_change(conflict)) { case svn_wc_conflict_reason_edited: reason_str = _("local edit"); @@ -251,13 +251,14 @@ svn_cl__get_human_readable_prop_conflict reason_str = _("local obstruction"); break; default: - reason_str = apr_psprintf(pool, _("local %s"), - svn_token__to_word( - map_conflict_reason_xml, - svn_client_conflict_get_reason(conflict))); + reason_str = apr_psprintf( + pool, _("local %s"), + svn_token__to_word( + map_conflict_reason_xml, + svn_client_conflict_get_local_change(conflict))); break; } - switch (svn_client_conflict_get_action(conflict)) + switch (svn_client_conflict_get_incoming_change(conflict)) { case svn_wc_conflict_action_edit: action_str = _("incoming edit"); @@ -269,10 +270,11 @@ svn_cl__get_human_readable_prop_conflict action_str = _("incoming delete"); break; default: - action_str = apr_psprintf(pool, _("incoming %s"), - svn_token__to_word( - map_conflict_action_xml, - svn_client_conflict_get_action(conflict))); + action_str = apr_psprintf( + pool, _("incoming %s"), + svn_token__to_word( + map_conflict_action_xml, + svn_client_conflict_get_incoming_change(conflict))); break; } SVN_ERR_ASSERT(reason_str && action_str); @@ -296,8 +298,8 @@ svn_cl__get_human_readable_tree_conflict svn_wc_operation_t conflict_operation; svn_node_kind_t conflict_node_kind; - conflict_action = svn_client_conflict_get_action(conflict); - conflict_reason = svn_client_conflict_get_reason(conflict); + conflict_action = svn_client_conflict_get_incoming_change(conflict); + conflict_reason = svn_client_conflict_get_local_change(conflict); conflict_operation = svn_client_conflict_get_operation(conflict); conflict_node_kind = svn_client_conflict_get_node_kind(conflict); @@ -434,11 +436,11 @@ append_tree_conflict_info_xml(svn_string svn_client_conflict_get_operation(conflict), pool)); tmp = svn_token__to_word(map_conflict_action_xml, - svn_client_conflict_get_action(conflict)); + svn_client_conflict_get_incoming_change(conflict)); svn_hash_sets(att_hash, "action", tmp); tmp = svn_token__to_word(map_conflict_reason_xml, - svn_client_conflict_get_reason(conflict)); + svn_client_conflict_get_local_change(conflict)); svn_hash_sets(att_hash, "reason", tmp); /* Open the tree-conflict tag. */ Modified: subversion/branches/move-tracking-2/subversion/svn/conflict-callbacks.c URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/svn/conflict-callbacks.c?rev=1685233&r1=1685232&r2=1685233&view=diff ============================================================================== --- subversion/branches/move-tracking-2/subversion/svn/conflict-callbacks.c (original) +++ subversion/branches/move-tracking-2/subversion/svn/conflict-callbacks.c Sat Jun 13 10:21:18 2015 @@ -1185,7 +1185,7 @@ handle_tree_conflict(svn_wc_conflict_res { svn_wc_conflict_reason_t reason; - reason = svn_client_conflict_get_reason(desc); + reason = svn_client_conflict_get_local_change(desc); if (reason == svn_wc_conflict_reason_moved_away) { tc_opts = tree_conflict_options_update_moved_away; @@ -1193,7 +1193,7 @@ handle_tree_conflict(svn_wc_conflict_res else if (reason == svn_wc_conflict_reason_deleted || reason == svn_wc_conflict_reason_replaced) { - if (svn_client_conflict_get_action(desc) == + if (svn_client_conflict_get_incoming_change(desc) == svn_wc_conflict_action_edit && svn_client_conflict_get_node_kind(desc) == svn_node_dir) tc_opts = tree_conflict_options_update_edit_deleted_dir; @@ -1365,8 +1365,9 @@ conflict_func_interactive(svn_wc_conflic Conflicting edits on a property. */ if (((svn_client_conflict_get_kind(desc) == svn_wc_conflict_kind_text) - && (svn_client_conflict_get_action(desc) == svn_wc_conflict_action_edit) - && (svn_client_conflict_get_reason(desc) == + && (svn_client_conflict_get_incoming_change(desc) == + svn_wc_conflict_action_edit) + && (svn_client_conflict_get_local_change(desc) == svn_wc_conflict_reason_edited))) SVN_ERR(handle_text_conflict(*result, desc, b, scratch_pool)); else if (svn_client_conflict_get_kind(desc) == svn_wc_conflict_kind_property) Modified: subversion/branches/move-tracking-2/subversion/svnadmin/svnadmin.c URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/svnadmin/svnadmin.c?rev=1685233&r1=1685232&r2=1685233&view=diff ============================================================================== --- subversion/branches/move-tracking-2/subversion/svnadmin/svnadmin.c (original) +++ subversion/branches/move-tracking-2/subversion/svnadmin/svnadmin.c Sat Jun 13 10:21:18 2015 @@ -868,6 +868,14 @@ struct repos_notify_handler_baton { /* Stream to write progress and other non-error output to. */ svn_stream_t *feedback_stream; + /* Suppress notifications that are neither errors nor warnings. */ + svn_boolean_t silent_running; + + /* Whether errors contained in notifications should be printed along + with the notification. If FALSE, any errors will only be + summarized. */ + svn_boolean_t silent_errors; + /* List of errors encountered during 'svnadmin verify --keep-going'. */ apr_array_header_t *error_summary; @@ -886,6 +894,14 @@ repos_notify_handler(void *baton, struct repos_notify_handler_baton *b = baton; svn_stream_t *feedback_stream = b->feedback_stream; + /* Don't print anything if the feedback stream isn't provided. + Only print errors and warnings in silent mode. */ + if (!feedback_stream + || (b->silent_running + && notify->action != svn_repos_notify_warning + && notify->action != svn_repos_notify_failure)) + return; + switch (notify->action) { case svn_repos_notify_warning: @@ -901,8 +917,10 @@ repos_notify_handler(void *baton, notify->revision)); if (notify->err) { - svn_handle_error2(notify->err, stderr, FALSE /* non-fatal */, - "svnadmin: "); + if (!b->silent_errors) + svn_handle_error2(notify->err, stderr, FALSE /* non-fatal */, + "svnadmin: "); + if (b->error_summary && notify->revision != SVN_INVALID_REVNUM) { struct verification_error *verr; @@ -1787,6 +1805,8 @@ subcommand_verify(apr_getopt_t *os, void svn_fs_t *fs; svn_revnum_t youngest, lower, upper; struct repos_notify_handler_baton notify_baton = { 0 }; + struct repos_notify_handler_baton *notify_baton_p = ¬ify_baton; + svn_repos_notify_func_t notify_func = repos_notify_handler; svn_error_t *verify_err; /* Expect no more arguments. */ @@ -1831,26 +1851,42 @@ subcommand_verify(apr_getopt_t *os, void upper = lower; } - if (! opt_state->quiet) - notify_baton.feedback_stream = recode_stream_create(stdout, pool); + /* Set up the notification handler. */ + if (!opt_state->quiet || opt_state->keep_going) + { + if (opt_state->quiet) + { + notify_baton.silent_running = TRUE; + notify_baton.feedback_stream = recode_stream_create(stderr, pool); + } + else + notify_baton.feedback_stream = recode_stream_create(stdout, pool); - if (opt_state->keep_going) - notify_baton.error_summary = - apr_array_make(pool, 0, sizeof(struct verification_error *)); + if (opt_state->keep_going) + notify_baton.error_summary = + apr_array_make(pool, 0, sizeof(struct verification_error *)); + else + notify_baton.silent_errors = TRUE; - notify_baton.result_pool = pool; + notify_baton.result_pool = pool; + } + else + { + notify_func = NULL; + notify_baton_p = NULL; + } verify_err = svn_repos_verify_fs3(repos, lower, upper, opt_state->keep_going, opt_state->check_normalization, opt_state->metadata_only, - !opt_state->quiet - ? repos_notify_handler : NULL, - ¬ify_baton, check_cancel, - NULL, pool); + notify_func, notify_baton_p, + check_cancel, NULL, pool); /* Show the --keep-going error summary. */ - if (opt_state->keep_going && notify_baton.error_summary->nelts > 0) + if (!opt_state->quiet + && opt_state->keep_going + && notify_baton.error_summary->nelts > 0) { int rev_maxlength; svn_revnum_t end_revnum; Modified: subversion/branches/move-tracking-2/subversion/svnbench/svnbench.c URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/svnbench/svnbench.c?rev=1685233&r1=1685232&r2=1685233&view=diff ============================================================================== --- subversion/branches/move-tracking-2/subversion/svnbench/svnbench.c (original) +++ subversion/branches/move-tracking-2/subversion/svnbench/svnbench.c Sat Jun 13 10:21:18 2015 @@ -534,10 +534,10 @@ sub_main(int *exit_code, int argc, const opt_arg, pool) != 0) { SVN_ERR(svn_utf_cstring_to_utf8(&utf8_opt_arg, opt_arg, pool)); - return svn_error_createf - (SVN_ERR_CL_ARG_PARSING_ERROR, NULL, - _("Syntax error in revision argument '%s'"), - utf8_opt_arg); + return svn_error_createf( + SVN_ERR_CL_ARG_PARSING_ERROR, NULL, + _("Syntax error in revision argument '%s'"), + utf8_opt_arg); } break; case 'v': @@ -755,9 +755,9 @@ sub_main(int *exit_code, int argc, const if (subcommand->name[0] == '-') SVN_ERR(svn_cl__help(NULL, NULL, pool)); else - svn_error_clear - (svn_cmdline_fprintf - (stderr, pool, _("Subcommand '%s' doesn't accept option '%s'\n" + svn_error_clear( + svn_cmdline_fprintf( + stderr, pool, _("Subcommand '%s' doesn't accept option '%s'\n" "Type 'svnbench help %s' for usage.\n"), subcommand->name, optstr, subcommand->name)); *exit_code = EXIT_FAILURE; Modified: subversion/branches/move-tracking-2/subversion/tests/cmdline/davautocheck.sh URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/tests/cmdline/davautocheck.sh?rev=1685233&r1=1685232&r2=1685233&view=diff ============================================================================== --- subversion/branches/move-tracking-2/subversion/tests/cmdline/davautocheck.sh (original) +++ subversion/branches/move-tracking-2/subversion/tests/cmdline/davautocheck.sh Sat Jun 13 10:21:18 2015 @@ -318,12 +318,18 @@ fi # Stop any previous instances, os we can re-use the port. if [ -x $STOPSCRIPT ]; then $STOPSCRIPT ; sleep 1; fi +ss > /dev/null 2>&1 || netstat > /dev/null 2>&1 || fail "unable to find ss or netstat required to find a free port" + HTTPD_PORT=3691 -while netstat -an | grep $HTTPD_PORT | grep 'LISTEN' >/dev/null; do +while \ + (ss -ltn sport = :$HTTPD_PORT 2>&1 | grep :$HTTPD_PORT > /dev/null ) \ + || \ + (netstat -an 2>&1 | grep $HTTPD_PORT | grep 'LISTEN' > /dev/null ) \ + do HTTPD_PORT=$(( HTTPD_PORT + 1 )) if [ $HTTPD_PORT -eq 65536 ]; then # Most likely the loop condition is true regardless of $HTTPD_PORT - fail "netstat claims you have no free ports for httpd to listen on." + fail "ss/netstat claim you have no free ports for httpd to listen on." fi done HTTPD_ROOT="$ABS_BUILDDIR/subversion/tests/cmdline/httpd-$(date '+%Y%m%d-%H%M%S')" Modified: subversion/branches/move-tracking-2/subversion/tests/cmdline/prop_tests.py URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/tests/cmdline/prop_tests.py?rev=1685233&r1=1685232&r2=1685233&view=diff ============================================================================== --- subversion/branches/move-tracking-2/subversion/tests/cmdline/prop_tests.py (original) +++ subversion/branches/move-tracking-2/subversion/tests/cmdline/prop_tests.py Sat Jun 13 10:21:18 2015 @@ -2666,13 +2666,37 @@ def xml_unsafe_author2(sbox): else: expected_author = 'foo\bbar' - expected_output = svntest.verify.UnorderedOutput([ - ' 1 %-8s Jan 01 2000 ./\n' % expected_author, - ' 1 %-8s Jan 01 2000 A/\n' % expected_author, - ' 1 %-8s 25 Jan 01 2000 iota\n' % expected_author - ]) + # Use svn ls in --xml mode to test locale independent output. + expected_output = [ + '<?xml version="1.0" encoding="UTF-8"?>\n', + '<lists>\n', + '<list\n', + ' path="%s">\n' % sbox.repo_url, + '<entry\n', + ' kind="dir">\n', + '<name>A</name>\n', + '<commit\n', + ' revision="1">\n', + '<author>%s</author>\n' % expected_author, + '<date>2000-01-01T12:00:00.000000Z</date>\n', + '</commit>\n', + '</entry>\n', + '<entry\n', + ' kind="file">\n', + '<name>iota</name>\n', + '<size>25</size>\n', + '<commit\n', + ' revision="1">\n', + '<author>%s</author>\n' % expected_author, + '<date>2000-01-01T12:00:00.000000Z</date>\n', + '</commit>\n', + '</entry>\n', + '</list>\n', + '</lists>\n' + ] + svntest.actions.run_and_verify_svn(expected_output, [], - 'ls', '-v', repo_url) + 'ls', '--xml', repo_url) expected_info = [{ 'Repository Root' : sbox.repo_url, Modified: subversion/branches/move-tracking-2/subversion/tests/cmdline/svnadmin_tests.py URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/tests/cmdline/svnadmin_tests.py?rev=1685233&r1=1685232&r2=1685233&view=diff ============================================================================== --- subversion/branches/move-tracking-2/subversion/tests/cmdline/svnadmin_tests.py (original) +++ subversion/branches/move-tracking-2/subversion/tests/cmdline/svnadmin_tests.py Sat Jun 13 10:21:18 2015 @@ -2078,12 +2078,12 @@ def verify_keep_going(sbox): ".*r2: E160004:.*", ".*r3: E160004:.*", ".*r3: E160004:.*"]) - exp_err = svntest.verify.RegexListOutput(["svnadmin: E160004:.*", - "svnadmin: E165011:.*"], False) if (svntest.main.fs_has_rep_sharing()): exp_out.insert(0, ".*Verifying.*metadata.*") + exp_err = svntest.verify.RegexListOutput(["svnadmin: E160004:.*", + "svnadmin: E165011:.*"], False) if svntest.verify.verify_outputs("Unexpected error while running 'svnadmin verify'.", output, errput, exp_out, exp_err): raise svntest.Failure @@ -2100,6 +2100,7 @@ def verify_keep_going(sbox): if (svntest.main.fs_has_rep_sharing()): exp_out.insert(0, ".*Verifying repository metadata.*") + exp_err = svntest.verify.RegexListOutput(["svnadmin: E160004:.*"], False) if svntest.verify.verify_outputs("Unexpected error while running 'svnadmin verify'.", output, errput, exp_out, exp_err): raise svntest.Failure @@ -2110,12 +2111,62 @@ def verify_keep_going(sbox): sbox.repo_dir) if svntest.verify.verify_outputs("Output of 'svnadmin verify' is unexpected.", - None, errput, None, "svnadmin: E165011:.*"): + None, errput, None, "svnadmin: E160004:.*"): raise svntest.Failure # Don't leave a corrupt repository svntest.main.safe_rmtree(sbox.repo_dir, True) + +@SkipUnless(svntest.main.is_fs_type_fsfs) +def verify_keep_going_quiet(sbox): + "svnadmin verify --keep-going --quiet test" + + sbox.build(create_wc = False) + repo_url = sbox.repo_url + B_url = sbox.repo_url + '/B' + C_url = sbox.repo_url + '/C' + + # Create A/B/E/bravo in r2. + svntest.actions.run_and_verify_svn(None, [], + 'mkdir', '-m', 'log_msg', + B_url) + + svntest.actions.run_and_verify_svn(None, [], + 'mkdir', '-m', 'log_msg', + C_url) + + r2 = fsfs_file(sbox.repo_dir, 'revs', '2') + fp = open(r2, 'r+b') + fp.write("""inserting junk to corrupt the rev""") + fp.close() + + exit_code, output, errput = svntest.main.run_svnadmin("verify", + "--keep-going", + "--quiet", + sbox.repo_dir) + + exp_err = svntest.verify.RegexListOutput([".*Error verifying revision 2.", + "svnadmin: E160004:.*", + "svnadmin: E160004:.*", + ".*Error verifying revision 3.", + "svnadmin: E160004:.*", + "svnadmin: E160004:.*", + "svnadmin: E165011:.*"], False) + + # Insert another expected error from checksum verification + if (svntest.main.is_fs_log_addressing()): + exp_err.insert(0, "svnadmin: E160004:.*") + + if svntest.verify.verify_outputs( + "Unexpected error while running 'svnadmin verify'.", + output, errput, None, exp_err): + raise svntest.Failure + + # Don't leave a corrupt repository + svntest.main.safe_rmtree(sbox.repo_dir, True) + + @SkipUnless(svntest.main.is_fs_type_fsfs) def verify_invalid_path_changes(sbox): "detect invalid changed path list entries" @@ -2235,8 +2286,7 @@ def verify_invalid_path_changes(sbox): exp_out = svntest.verify.RegexListOutput([".*Verified revision 0.", ".*Verified revision 1.", ".*Error verifying revision 2."]) - exp_err = svntest.verify.RegexListOutput(["svnadmin: E160020:.*", - "svnadmin: E165011:.*"], False) + exp_err = svntest.verify.RegexListOutput(["svnadmin: E160020:.*"], False) if (svntest.main.fs_has_rep_sharing()): exp_out.insert(0, ".*Verifying.*metadata.*") @@ -2252,7 +2302,7 @@ def verify_invalid_path_changes(sbox): sbox.repo_dir) if svntest.verify.verify_outputs("Output of 'svnadmin verify' is unexpected.", - None, errput, None, "svnadmin: E165011:.*"): + None, errput, None, "svnadmin: E160020:.*"): raise svntest.Failure # Don't leave a corrupt repository @@ -2621,8 +2671,7 @@ def verify_quickly(sbox): # resulting in different progress output if svntest.main.is_fs_log_addressing(): exp_out = svntest.verify.RegexListOutput([]) - exp_err = svntest.verify.RegexListOutput(["svnadmin: E160004:.*", - "svnadmin: E165011:.*"], False) + exp_err = svntest.verify.RegexListOutput(["svnadmin: E160004:.*"], False) else: exp_out = svntest.verify.RegexListOutput([]) exp_err = svntest.verify.RegexListOutput([]) @@ -2992,6 +3041,7 @@ test_list = [ None, mergeinfo_race, recover_old_empty, verify_keep_going, + verify_keep_going_quiet, verify_invalid_path_changes, verify_denormalized_names, fsfs_recover_old_non_empty, Modified: subversion/branches/move-tracking-2/subversion/tests/cmdline/svnrdump_tests.py URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/tests/cmdline/svnrdump_tests.py?rev=1685233&r1=1685232&r2=1685233&view=diff ============================================================================== --- subversion/branches/move-tracking-2/subversion/tests/cmdline/svnrdump_tests.py (original) +++ subversion/branches/move-tracking-2/subversion/tests/cmdline/svnrdump_tests.py Sat Jun 13 10:21:18 2015 @@ -571,6 +571,7 @@ def dont_drop_valid_mergeinfo_during_inc dump_fp.close() # Blow away the current repos and create an empty one in its place. + svntest.main.safe_rmtree(sbox.repo_dir, True) # Fix race with bdb in svnserve sbox.build(empty=True) # Create the revprop-change hook for this test @@ -606,6 +607,7 @@ def dont_drop_valid_mergeinfo_during_inc # PART 3: Load a full dump to an non-empty repository. # # Reset our sandbox. + svntest.main.safe_rmtree(sbox.repo_dir, True) # Fix race with bdb in svnserve sbox.build(empty=True) # Create the revprop-change hook for this test @@ -667,6 +669,7 @@ def dont_drop_valid_mergeinfo_during_inc # PART 4: Load a a series of incremental dumps to an non-empty repository. # # Reset our sandbox. + svntest.main.safe_rmtree(sbox.repo_dir, True) # Fix race with bdb in svnserve sbox.build(empty=True) # Create the revprop-change hook for this test Modified: subversion/branches/move-tracking-2/subversion/tests/cmdline/svnserveautocheck.sh URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/tests/cmdline/svnserveautocheck.sh?rev=1685233&r1=1685232&r2=1685233&view=diff ============================================================================== --- subversion/branches/move-tracking-2/subversion/tests/cmdline/svnserveautocheck.sh (original) +++ subversion/branches/move-tracking-2/subversion/tests/cmdline/svnserveautocheck.sh Sat Jun 13 10:21:18 2015 @@ -95,9 +95,16 @@ random_port() { if type time > /dev/null ; then TIME_CMD() { time "$@"; } ; else TIME_CMD() { "$@"; } ; fi MAKE=${MAKE:-make} +PATH="$PATH:/usr/sbin/:/usr/local/sbin/" + +ss > /dev/null 2>&1 || netstat > /dev/null 2>&1 || fail "unable to find ss or netstat required to find a free port" SVNSERVE_PORT=$(random_port) -while netstat -an | grep $SVNSERVE_PORT | grep 'LISTEN'; do +while \ + (ss -ltn sport = :$SVNSERVE_PORT 2>&1 | grep :$SVNSERVE_PORT > /dev/null ) \ + || \ + (netstat -an 2>&1 | grep $SVNSERVE_PORT | grep 'LISTEN' > /dev/null ) \ + do SVNSERVE_PORT=$(random_port) done Modified: subversion/branches/move-tracking-2/subversion/tests/libsvn_fs/fs-test.c URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/tests/libsvn_fs/fs-test.c?rev=1685233&r1=1685232&r2=1685233&view=diff ============================================================================== --- subversion/branches/move-tracking-2/subversion/tests/libsvn_fs/fs-test.c (original) +++ subversion/branches/move-tracking-2/subversion/tests/libsvn_fs/fs-test.c Sat Jun 13 10:21:18 2015 @@ -4349,7 +4349,7 @@ check_txn_related(const svn_test_opts_t svn_revnum_t youngest_rev = 0; /* Create a filesystem and repository. */ - SVN_ERR(svn_test__create_fs(&fs, "test-repo-check-related", + SVN_ERR(svn_test__create_fs(&fs, "test-repo-check-txn-related", opts, pool)); /*** Step I: Build up some state in our repository through a series Modified: subversion/branches/move-tracking-2/subversion/tests/libsvn_fs_fs/fs-fs-private-test.c URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/tests/libsvn_fs_fs/fs-fs-private-test.c?rev=1685233&r1=1685232&r2=1685233&view=diff ============================================================================== --- subversion/branches/move-tracking-2/subversion/tests/libsvn_fs_fs/fs-fs-private-test.c (original) +++ subversion/branches/move-tracking-2/subversion/tests/libsvn_fs_fs/fs-fs-private-test.c Sat Jun 13 10:21:18 2015 @@ -349,8 +349,6 @@ dump_index(const svn_test_opts_t *opts, /* ------------------------------------------------------------------------ */ -#define REPO_NAME "test-repo-load-index-test" - static svn_error_t * receive_index(const svn_fs_fs__p2l_entry_t *entry, void *baton, @@ -364,8 +362,8 @@ receive_index(const svn_fs_fs__p2l_entry } static svn_error_t * -load_index(const svn_test_opts_t *opts, - apr_pool_t *pool) +load_index_test(const svn_test_opts_t *opts, apr_pool_t *pool, + const char *repo_name, svn_boolean_t keep_going) { svn_repos_t *repos; svn_revnum_t rev; @@ -383,7 +381,7 @@ load_index(const svn_test_opts_t *opts, "pre-1.9 SVN doesn't have FSFS indexes"); /* Create a filesystem */ - SVN_ERR(create_greek_repo(&repos, &rev, opts, REPO_NAME, pool, pool)); + SVN_ERR(create_greek_repo(&repos, &rev, opts, repo_name, pool, pool)); /* Read the original index contents for REV in ENTRIES. */ SVN_ERR(svn_fs_fs__dump_index(svn_repos_fs(repos), rev, receive_index, @@ -400,19 +398,33 @@ load_index(const svn_test_opts_t *opts, SVN_ERR(svn_fs_fs__load_index(svn_repos_fs(repos), rev, alt_entries, pool)); SVN_TEST_ASSERT_ERROR(svn_repos_verify_fs3(repos, rev, rev, - FALSE, FALSE, FALSE, + keep_going, FALSE, FALSE, NULL, NULL, NULL, NULL, pool), - SVN_ERR_REPOS_CORRUPTED); + (keep_going + ? SVN_ERR_REPOS_VERIFY_FAILED + : SVN_ERR_FS_INDEX_CORRUPTION)); /* Restore the original index. */ SVN_ERR(svn_fs_fs__load_index(svn_repos_fs(repos), rev, entries, pool)); - SVN_ERR(svn_repos_verify_fs3(repos, rev, rev, FALSE, FALSE, FALSE, + SVN_ERR(svn_repos_verify_fs3(repos, rev, rev, keep_going, FALSE, FALSE, NULL, NULL, NULL, NULL, pool)); return SVN_NO_ERROR; } -#undef REPO_NAME +static svn_error_t * +load_index(const svn_test_opts_t *opts, + apr_pool_t *pool) +{ + return load_index_test(opts, pool, "test-repo-load-index-test", FALSE); +} + +static svn_error_t * +load_index_keep_going(const svn_test_opts_t *opts, + apr_pool_t *pool) +{ + return load_index_test(opts, pool, "test-repo-load-index-full-test", TRUE); +} /* The test table. */ @@ -428,6 +440,8 @@ static struct svn_test_descriptor_t test "dump the P2L index"), SVN_TEST_OPTS_PASS(load_index, "load the P2L index"), + SVN_TEST_OPTS_PASS(load_index_keep_going, + "load the P2L index (full verification)"), SVN_TEST_NULL };
