On Fri, 11 Oct 2002, Zack Weinberg wrote:
Hi all,
I'm only reading intermittantly at the moment, but this caught my eye:
> On Fri, Oct 11, 2002 at 07:42:49PM +0300, Nuutti Kotivuori wrote:
> > ** Special files in a live working copy - yes
> >
> > Often one encounters the need to have special files inside the working
> > copy itself. These can be generated by a script inside the working
> > copy ofcourse - but it generates a problem in the general handling of
> > the files, when they do not carry over properly between updates and
> > other operations. It would be a lot easier to have the client actually
> > handle the files properly.
> > >
> Let me throw out some concrete suggestions for this.
[snip]
> svn:construct -- If this property is set on a file, that file is
> considered special. The text of the property is
> a command which should be executed upon
> checkout, which is expected to create the file.
> See below for details.
>
> svn:deconstruct -- If this property is set on a special file, it
> gives a command to be run to determine the new
> text-base of the file. Since special files may
> not have meaningful modification times or
> checksums, it is necessary to run this command
> any time the client wants to know if the special
> file has been modified.
>
[snip]
> svn:construct = "ln -s %T %n"
> svn:deconstruct = "readlink %n"
>
I thought about something like this when thinking about MacOS X bundles.
As others have noted, there are two problems with the above proposal: i)
security, and ii) cross-platform portability. I had the following
thought, but didn't have enough time to think it through properly. I'm
going to throw it out and see what happens :)
The svn:construct and svn:deconstruct properties should not be
commands, but rather references to client side scripts.
e.g.
~/.subversion/scritps
gather (script that calls tar)
scatter (script that calls tar)
then
svn:construct = "gather file1 file2 file3"
The first item is a script name. The other arguments stored in the
property can be anything.
The script is called as follows:
gather filename URL [other args in the property]
By disallowing arbitrary commands you enhance security. You also allow
the scripts to be implemented in different ways by different clients. It
doesn't even have to be scripts on all platforms.
If a property calls a script that doesn't exist then there is an error. I
would expect that repositories that require their own scripts would have
them checked in... you'd just check out a working copy of their scripts
into your scripts dir.
Anyway, 'twas just a thought.
Dr \x/ill :-}
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Oct 15 13:35:28 2002