[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r1130688 - in /subversion/trunk/subversion: libsvn_fs_base/tree.c libsvn_fs_fs/tree.c

From: Hyrum K Wright <hyrum_at_hyrumwright.org>
Date: Thu, 2 Jun 2011 14:45:37 -0500

On Thu, Jun 2, 2011 at 12:49 PM, <pburba_at_apache.org> wrote:
> Author: pburba
> Date: Thu Jun  2 17:49:36 2011
> New Revision: 1130688
>
> URL: http://svn.apache.org/viewvc?rev=1130688&view=rev
> Log:
> A partial fix for issue #3896 'mergeinfo syntax errors should be treated
> gracefully': Tolerate invalid mergeinfo in the repository.
>
> This allows 'svn mergeinfo' to function in the presence of of invalid
> mergeinfo in the repository.  It also allows 'svn merge' to function if
> invalid mergeinfo is inherited by a merge target and the repository must
> be contacted to find this inherited mergeinfo.
>
> * subversion/libsvn_fs_base/tree.c
>
>  (txn_body_get_mergeinfo_data_and_entries,
>   txn_body_get_mergeinfo_for_path): If invalid mergeinfo is present on a
>   node or inherited from a parent node, then ignore it rather than
>   raising a parse error.
>
> * subversion/libsvn_fs_fs/tree.c
>  (crawl_directory_dag_for_mergeinfo,
>   get_mergeinfo_for_path): Same as above.
>
> Modified:
>    subversion/trunk/subversion/libsvn_fs_base/tree.c
>    subversion/trunk/subversion/libsvn_fs_fs/tree.c
>
> Modified: subversion/trunk/subversion/libsvn_fs_base/tree.c
> URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_base/tree.c?rev=1130688&r1=1130687&r2=1130688&view=diff
> ==============================================================================
> --- subversion/trunk/subversion/libsvn_fs_base/tree.c (original)
> +++ subversion/trunk/subversion/libsvn_fs_base/tree.c Thu Jun  2 17:49:36 2011
> @@ -5144,6 +5144,7 @@ txn_body_get_mergeinfo_data_and_entries(
>           apr_hash_t *plist;
>           svn_mergeinfo_t child_mergeinfo;
>           svn_string_t *pval;
> +          svn_error_t *err;
>
>           SVN_ERR(svn_fs_base__dag_get_proplist(&plist, child_node,
>                                                 trail, iterpool));
> @@ -5157,13 +5158,26 @@ txn_body_get_mergeinfo_data_and_entries(
>                                          "mergeinfo but doesn't"),
>                                        id_str->data);
>             }
> -          SVN_ERR(svn_mergeinfo_parse(&child_mergeinfo, pval->data,
> -                                      result_pool));
> -          apr_hash_set(args->result_catalog,
> -                       svn_fspath__join(args->node_path, dirent->name,
> -                                       result_pool),
> -                       APR_HASH_KEY_STRING,
> -                       child_mergeinfo);
> +          /* Issue #3896: If syntactically invalid mergeinfo is present on
> +             CHILD_NODE then treat it as if no mergeinfo is present rather
> +             than raising a parse error. */
> +          err = svn_mergeinfo_parse(&child_mergeinfo, pval->data,
> +                                    result_pool);
> +          if (err)
> +            {
> +              if (err->apr_err == SVN_ERR_MERGEINFO_PARSE_ERROR)
> +                svn_error_clear(err);
> +              else
> +                svn_error_return(err);

This should be 'return svn_error_return(err);' As it is, this error
is just falling on the floor, and causing the current buildbot
failures.

> ...

-Hyrum
Received on 2011-06-02 21:46:14 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.