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

RE: "svnlook changed" different for WC->URL and URL->URL copy

From: <Servatius.Brandt_at_fujitsu-siemens.com>
Date: 2005-05-31 15:42:55 CEST

[ I added Gustavo Niemeyer to the CC list since this post affects also
the svnperms.py script. ]

Karl Fogel wrote:

>> When copying a working copy to an URL:
>>
>> svn copy trunk svn://host/repos/branches/B1,
>>
>> the command
>>
>> svnlook changed -t "$TXN" "$REPOS" >&2
>>
>> in the pre-commit hook shows the target directory and the
>files/subdirs
>> therein:
>>
>> A branches/B1/
>> A branches/B1/file
>> A branches/B1/dir
>> A branches/B1/dir/file
>
>Just to confirm: what's under trunk is a single-revision working copy,
>not a mixed-revision one, right? I.e., If you do this with a fresh,
>unmodified checkout of trunk, the behavior is the same?

Although I worked on a test repository just for myself and so all files
were up to date, this was indeed a mixed-revision working copy since
I didn't use svn up before making the copy. After an update, the
WC->URL and URL->URL copies work the same and I just get:

        A branches/B1/

The impact on how I want to use svnperms.py:

>> branches/[^/]+/.* = @maintainers(add,remove)
>> branches/[^/]+/.+ = @developers(add,remove,update)
>> [^/]+/ = @admins(add,remove)
>>
>> The permission check for @admins denies the right for a WC->URL copy,
>> but allows an URL->URL copy of a tree into the top level directory:
>>
>> svn copy trunk svn://host/repos/B1 # denied
>> svn copy svn://host/repos/trunk svn://host/repos/B1 #
allowed
>
>I think the semantics of the two operations ought to be the same, and
>that therefore this is a bug.

Mike Pilato's explanation of the behaviour makes sense to me. But that
means that after an "svn up" the WC->URL copy command also grants
permission to the @admins group. This means that svnperms.py can't be
used to restrict permissions to only adding a new directory without any
files therein (patterns ending in /).

Gustavo, what do your think of changing svnperms.py so that it expands
each path from the output of "svnlook changed" and replaces it by the
output of "svnlook tree <REPOS> <path>"? Then, a pattern ending in /
would allow just to add a directory, one ending in /.* to add
a directory and files/subdirs therein, and one ending in /.+ to add
something into an existing directory. Not only checking the path that
will be added to the repository by a cheap add-with-history
(implementation detail) but all the paths which it will expand to on
a checkout (user view) seems even more appropriate for a permission
check.

- Servatius

------------------------------------------------------------------------
Servatius Brandt Phone: +49 89 636-41504
Fujitsu Siemens Computers Fax: +49 89 636-48716
EP SW AD C++ Email: Servatius.Brandt@fujitsu-siemens.com

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue May 31 19:17:02 2005

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.