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

Re: svn commit: r37363 - in trunk/subversion: libsvn_ra tests/cmdline

From: David Glasser <glasser_at_davidglasser.net>
Date: Thu, 14 May 2009 11:10:32 -0700

You shouldn't be writing authz files inside merge_tests.py; use
merge_tests_authz.py instead. Unless something's changed while I
wasn't paying attention, authz-based tests aren't safe for parallel
execution, and merge_tests_authz explicitly disables parallelism.

--dave

On Sun, Apr 19, 2009 at 7:27 AM, Lieven Govaerts <lgo_at_mobsol.be> wrote:
> Author: lgo
> Date: Sun Apr 19 07:27:17 2009
> New Revision: 37363
>
> Log:
> Fix abort when merging non-existant subtrees against a 1.5 server.
>
> Found by: Stefan Küng <tortoisesvn_at_gmail.com>
>
> * subversion/libsvn_ra/compat.c
>  (log_path_del_receiver): when searching the revision in which a path
>   was deleted, we can encounter revisions that don't contain - readable -
>   paths. Just exit the function early in this case.
>
> * subversion/tests/cmdline/merge_test.py
>  (global): import write_authz_file.
>  (merge_fails_if_subtree_is_deleted_on_src): include an unreadable commit
>   in the merge revision set, to verify above fix.
>
> Modified:
>   trunk/subversion/libsvn_ra/compat.c
>   trunk/subversion/tests/cmdline/merge_tests.py
>
> Modified: trunk/subversion/libsvn_ra/compat.c
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_ra/compat.c?pathrev=37363&r1=37362&r2=37363
> ==============================================================================
> --- trunk/subversion/libsvn_ra/compat.c Sun Apr 19 01:53:34 2009        (r37362)
> +++ trunk/subversion/libsvn_ra/compat.c Sun Apr 19 07:27:17 2009        (r37363)
> @@ -796,6 +796,10 @@ log_path_del_receiver(void *baton,
>  {
>   apr_hash_index_t *hi;
>
> +  /* No paths were changed in this revision.  Nothing to do. */
> +  if (! log_entry->changed_paths2)
> +    return SVN_NO_ERROR;
> +
>   for (hi = apr_hash_first(pool, log_entry->changed_paths2);
>        hi != NULL;
>        hi = apr_hash_next(hi))
>
> Modified: trunk/subversion/tests/cmdline/merge_tests.py
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/tests/cmdline/merge_tests.py?pathrev=37363&r1=37362&r2=37363
> ==============================================================================
> --- trunk/subversion/tests/cmdline/merge_tests.py       Sun Apr 19 01:53:34 2009        (r37362)
> +++ trunk/subversion/tests/cmdline/merge_tests.py       Sun Apr 19 07:27:17 2009        (r37363)
> @@ -32,6 +32,7 @@ SkipUnless = svntest.testcase.SkipUnless
>
>  from svntest.main import SVN_PROP_MERGEINFO
>  from svntest.main import server_has_mergeinfo
> +from svntest.main import write_authz_file
>  from svntest.actions import fill_file_with_lines
>  from svntest.actions import make_conflict_marker_text
>  from svntest.actions import inject_conflict_into_expected_state
> @@ -7026,6 +7027,10 @@ def merge_fails_if_subtree_is_deleted_on
>   sbox.build()
>   wc_dir = sbox.wc_dir
>
> +  write_authz_file(sbox, {"/" : "* = rw",
> +                          "/unrelated" : ("* =\n" +
> +                           svntest.main.wc_author2 + " = rw")})
> +
>   # Some paths we'll care about
>   Acopy_path = os.path.join(wc_dir, 'A_copy')
>   gamma_path = os.path.join(wc_dir, 'A', 'D', 'gamma')
> @@ -7112,15 +7117,23 @@ def merge_fails_if_subtree_is_deleted_on
>                                      A_url + '/D/gamma' + '@4',
>                                      Acopy_gamma_path)
>
> +  # r6: create an empty (unreadable) commit.
> +  # Empty or unreadable revisions used to crash a svn 1.6+ client when
> +  # used with a 1.5 server:
> +  # http://svn.haxx.se/dev/archive-2009-04/0476.shtml
> +  svntest.main.run_svn(None, 'mkdir', sbox.repo_url + '/unrelated',
> +                       '--username', svntest.main.wc_author2,
> +                       '-m', 'creating a rev with no paths.')
> +
>   # This merge causes a tree conflict. Since the result of the previous
>   # merge of A/D/gamma into A_copy/D has not yet been committed, it is
>   # considered a local modification of A_Copy/D/gamma by the following
>   # merge. A delete merged ontop of a modified file is a tree conflict.
>   # See notes/tree-conflicts/detection.txt
> -  svntest.actions.run_and_verify_svn(None, expected_merge_output([[5], [3,5]],
> +  svntest.actions.run_and_verify_svn(None, expected_merge_output([[6], [3,6]],
>                                      ['D    ' + Acopy_gamma_path + '\n',
>                                      'C    ' + Acopy_D_path + '\n']),
> -                                     [], 'merge', '-r1:5', '--force',
> +                                     [], 'merge', '-r1:6', '--force',
>                                      A_url, Acopy_path)
>
>   # Test for issue #2976 Subtrees can lose non-inheritable ranges.
>
> ------------------------------------------------------
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=495&dsMessageId=1807893
>

-- 
glasser_at_davidglasser.net | langtonlabs.org | flickr.com/photos/glasser/
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2261126
Received on 2009-05-14 20:10:48 CEST

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