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

Re: "svn commit" does not work with SVNParentPath in location and 1.7-client (HTTPv2)

From: Philip Martin <philip.martin_at_wandisco.com>
Date: Thu, 17 Nov 2011 11:01:39 +0000

[Adding dev]

Philip Martin <philip.martin_at_wandisco.com> writes:

> Sergey Skvortsov <skv_at_protey.ru> writes:
>
>> Also, in 1.7 reading repos is working fine:
>>
>> "OPTIONS /svn/foo/bar HTTP/1.1" 200
>> "REPORT /svn/foo/bar/!svn/me HTTP/1.1" 200
>>
>> but only POST fails:
>> "POST /svn/foo/bar/!svn/me HTTP/1.1" 500
>>
>> So the problem is not in Apache or configuration but in mod_dav_svn itself.
>
> Yes, POST requests are handled differently. You should be able to work
> around the problem by disabling the v2 protocol using:
>
> SVNAdvertiseV2Protocol off

The config is nested Locations with SVNParentPath:

<Location /svn>
  ...
  SVNParentPath /home/svn
</Location>

<Location /svn/foo>
  ...
  SVNParentPath /home/svn/foo
</Location>

This works apart from v2 commits to the nested Location. The reason it
fails is that the POST gets directed to the containing Location, and
that happens because of the root_dir setting in mod_dav_svn's dir_conf_t
setup in mod_dav_svn.c:merge_dir_config:

  /* Prefer our parent's value over our new one - hence the swap. */
  newconf->root_dir = INHERIT_VALUE(parent, child, root_dir);

All the other fields use INHERIT_VALUE(child, parent, ...).

This code was added in the first commit to the dav-mirror branch and has
not been changed since.

If I change it to prefer the child value for root_dir then POSTs go to
the right Location and commits work. Changing it doesn't break my
simple mirror setup.

I don't understand why the code prefers the parent root_dir. I can't
think of any reason why mirroring would make a difference. Can anyone
explain?

-- 
Philip
Received on 2011-11-17 12:02:37 CET

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

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