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

Re: svn and shell scripts: managing properties

From: Jan Warnking <jan.warnking_at_ujf-grenoble.fr>
Date: 2006-03-11 16:35:36 CET

Thanks, Marc, for the hint on tail +... . On the issue with svn propedit
being unusable in scripts I gave up and am using a combination of
propdel and propset now. Quite ugly but it works. I'd still like to hear
if this is someting that has come up before and if there are plans to
fix it.

I wrote:

> - a bigger annoyance is the algorithm used for checking whether a
> property has been modified with a propedit command. If I do:
> svn propedit myproperty --editor-cmd "sed -i -e 's/foo/bar/g'" mypath
> then svn will respond: "No changes to property 'myproperty' on
> 'mypath'". This occurs because SVN checks the timestamp (modification
> time) and file size of the temporary file containing the property
> value, in order to determine whether a change occurred. Sed is fast
> enough so that the modification time appears unchanged, and the
> replacement done does not change file length. Of course I can change
> this command to:
> svn propedit myproperty --editor-cmd "sleep 2; sed -i -e
> 's/foo/bar/g'" mypath
> That works, but is slow. The whole point of scripting is that I have
> potentially many files to process.

Marc Haisenko said:

>On Friday 10 March 2006 11:25, Jan Warnking wrote:
>>- a minor annoyance of the proplist command is that it cannot be asked
>>to omit the first line, which reads "Properties on 'mypath':" and which
>>does not actually contain property names. I expected either the --quiet
>>or the --non-interactive switch to do that for me. The former does not
>>exist for propedit, the latter doesn't change the output. This makes
>>scripts unnecessarily cumbersome. I'm not really good at shellscripts
>>yet, so any code snipped stripping that line from the output would be
>As work around you can use "tail +2": it gives you everything after (and
>including) line 2, so you can do:
># command | tail +2
># tail +2 <file
> Marc

To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Sat Mar 11 16:38:08 2006

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.