geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jacek Laskowski <jlaskow...@apache.org>
Subject Re: Subversion keyword expansion not working
Date Sun, 12 Sep 2004 21:48:10 GMT
Dain Sundstrom wrote:

> There are two steps:
> 
> 1) change all places in our code where we have $Revsiosn$ to $Rev$
> 2) add the rev keyword to the list of keywords to expanded by  
> subversion (must be done on a file by file basis)

Over the weekend I prepared a script to make it done. They're just being 
committed. However, the connection I'm using is sooooo slow that I'm not 
sure when it's done if at all. Just had to kill it again as it seemed to 
have hung :(

Dain, could you please run the script (attached below) and commit the 
changes?

Also there were times when I had to revert the changes using svn revert 
and some files didn't allow me to do it because the following message 
from svn:

svn: Inconsistent line-endings in source stream

The files are:

sandbox/xbeans/src/schema/application-client_1_4.xsd
modules/common/src/java/org/apache/geronimo/common/propertyeditor/IteratorEditor.java
specs/j2ee-jacc/xdocs/navigation.xml

Does anyone know what's wrong with them?

Here's the script I used:

#!/bin/sh

DIR=.

find $DIR -path "*.svn" -prune -o -type f | while read file;
do
         # Check if it's .svn directory (don't know how to eliminate it 
directly with find)
         if [ -d $file ]; then
                 echo $file is directory - skip it
                 continue;
         fi

         isbinary=false;
         if [ my`svn propget svn:mime-type $file` = 
my"application/octet-stream" ]; then
                 isbinary=true
         fi
         if $isbinary ;
         then
                 echo $file is binary - Do not touch it
                 echo $file >> binaries.txt
                 #svn revert $file
         else
                 echo $file is NOT binary
                 sed -i.bak 's,\$Revision: [^$]* \$,\$Rev\$,' $file
                 svn propset svn:keywords "author date id rev" $file
                 echo $file >> text.txt
         fi
done

find $DIR -name "*.bak" | xargs rm

> 
> -dain

Jacek



Mime
View raw message