geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Blevins <david.blev...@visi.com>
Subject Re: Subversion keyword expansion not working
Date Sat, 11 Sep 2004 23:29:52 GMT
On Sun, Sep 12, 2004 at 01:03:37AM +0200, Jacek Laskowski wrote:
> 
> Here's the script to run. It replaces $Revision: ...$ to $Rev$.
> 
> #!/bin/sh
> 
> find etc -path "*/.svn" -prune -o -type f -print | while read file;
> do
>         sed 's,\$Revision: [^$]* \$,\$Rev\$,' $file > $file.changed
>         mv $file.changed $file
>         rm $file.changed
> done
> 
> Having done this, I'll be 'svn propset svn:keywords "author date id rev" 
>  $file' and commit the files ('svn ci --message "Changing $Revision$ to 
> $Rev$" $files).
> 
> Is the order ok? May I change the keyword, commit the change and propset 
> afterwards or is the commit not necessary?
> 
> Any comments?
> 

Why not throw this into the find

  -exec sed -i.bak 's,\$Revision: [^$]* \$,\$Rev\$,' {} \;

...and skip the loop and extra files?

-David

Mime
View raw message