If I start with a file containing $Id$, with svn:keywords of Id, then
change that to $Revision$ with svn:keywords of Revision, the new value
of svn:keywords is used to un-expand the keywords in the file before
attempted merging. Note that the old value is still used when
determining whether or not files have been modified, so this only
effects files which have changes elsewhere.
Result: a file which should be able to merge cleanly will always have
"conflicts" if someone else changed a keyworded line and the
svn:keywords property.
Source this bash script for an example (uses GNU sed's -i, I dont think
non-GNU seds have that)
The "Another Conflict" line is the important one, I just noticed the
first conflict when writing the script and thought it might be related.
--------- Begin Bash --------
REPOS='path://to/repos'
set -x
svn mkdir $REPOS/keywords -m "keyword conflict test (commit 1)"
svn co $REPOS/keywords
echo -e 'AAA\nBBB\n$Id$\nCCC\nDDD\nEEE\nFFF\nGGG' > keywords/keyed
svn add keywords/keyed
svn propset svn:keywords 'Id' keywords/keyed
svn ci keywords -m "keyword conflict test (commit 2)"
svn update keywords
echo -e 'AAA\nBBB\n$Revision$\n$Date$\nCCC\nDDD\nEEE\nFFF\nGGG' >
keywords/keyed
svn propset svn:keywords 'Revision Date' keywords/keyed
svn ci keywords -m "keyword conflict test (commit 3)"
svn update keywords
set +x; echo "---- NO CONFLICT: ----"; set -x
svn update -rPREV keywords
echo -e 'AAA\nBBB\n$Id$\nCCC\nDDD\nEEE\nFFF\nHHH' > keywords/keyed
svn update keywords
svn status keywords
set +x; echo "----- CONFLICT: -----"; set -x
svn update -rPREV keywords
svn status keywords
set +x; echo "- ANOTHER CONFLICT: -"; set -x
svn revert -R keywords
sed -i 's/GGG/HHH/' keywords/keyed
svn update keywords
svn status keywords
svn rm $REPOS/keywords -m "keyword conflict test (commit 4 *CLEANUP)"
rm -rf keywords
set +x
------ End Bash -------
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Sep 30 13:40:20 2005