cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <sylv...@apache.org>
Subject Re: SVN behaviour with "Id" keyword
Date Tue, 01 Feb 2005 06:54:43 GMT
David Crossley wrote:

>Tim Larson wrote:
>  
>
>>Sylvain Wallez wrote:
>>    
>>
>>>The nice thing once all this has been fixed, is that SVN doesn't 
>>>consider as being modified a file where expanded keyword have been 
>>>replaced by their unexpanded counterpart. You can then use whatever 
>>>diffmerge tool you want to sync 2.2 and 2.1, since only files having 
>>>real differences (and not only a different $Id$) will show up in the tool.
>>>
>>>Are other people interested in this small Id-unexpander script?
>>>      
>>>
>>I am interested in that script.
>>    
>>
>
>Thanks Sylvain, perhaps add it to the ASF "committers" repository
>in the "tools/".
>  
>

Mmmh... not sure it deserves going there considering how quick-hacked it 
is :

---------------------------------------------------
#!/bin/sh

# Unexpands all "$Id ....$" keywords from files having a certain prefix 
(i.e. replaces them by $Id$)
# The good thing with Subversion is that it doesn't consider as being 
modified a file where the
# keyword has changed

find . \( -name '*.java' -or -name '*.xml' -or -name '*.xmap' -or -name 
'*.js' -or -name '*.xsl' \) -print | while read file
do
  echo $file
  /usr/bin/sed -e 's/\$Id:.*\$/$Id$/' $file > ${file}.rmkw-tmp
  mv ${file}.rmkw-tmp $file
done
---------------------------------------------------

Sylvain

-- 
Sylvain Wallez                                  Anyware Technologies
http://www.apache.org/~sylvain           http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }


Mime
View raw message