On Sat, 25 Sep 2004, Peter Strempel wrote:
> Hello,
>
> is there a way to suppress keyword substituion during checkout or
> export, like the CVS -kk switch?
>
> I have a lot of files with the $Id$ keyword in the header. Those files
> have the "svn:keywords Id" property set. So when I checkout, the $Id$
> keyword is replaced. Fine, that's how it's supposed to work.
>
> However, occasionally I need to do an export without the keyword
> replacement (I need this to synch the whole code with a remote CVS
> server). With CVS I'd just do "cvs export -r HEAD myproject -kk", and
> the $Id$ stays $Id$.
>
> I currently see two approaches for this using SVN:
> * Don't use keywords at all (bad, I like, use and need them)
> * Create a branch, remove all "svn:keywords" properties from the branch
> and then export the branch (better, but sort of unelegant).
>
> Is there a better way to do this which I havn't found yet (I'm quite new
> to Subversion) ?
I don't think there's currently a way to do that with a command-line
option (though such an option would probably be useful). The following
recipe appears to work (at least in my little test repository) - it's
neither elegant nor especially fast, but it does save on creating a
branch:
# Check out a working copy
svn co $REPOS wc
# Remove the 'keywords' property from all files in the WC
svn propdel -R svn:keywords wc
# Delete all non-subversion files
find wc -path "*/.svn" -prune -o -type f -print0 | xargs -0 rm
# Bring back the files (without keywords)
svn update wc
Hope this helps,
Patrick
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Sat Sep 25 17:27:26 2004