You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Sylvain Wallez <sy...@apache.org> on 2005/02/01 07:54:43 UTC
Re: SVN behaviour with "Id" keyword
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 }