I was wondering if there's a way to disable keyword expansion during
'svn diff' on command line.
I've found this behaviour use case:
Seems that if i have svn:keywords set on a file, when I do an svn diff
that goes to a 3rd-party diff tool such as AraxisMerge, SVN creates a
"normalized' version of the file with the keywords (such as Id)
un-expanded and passes that temp file to AraxisMerge
As a result, if I make any changes to the text file in Araxis, it
modifies the tmp un-expanded file and not the original
This happens on 1.4.4 and 1.5.2 versions in MacOSX
Is there any way to disable this un-expansion on command line in svn diff?
I've confirmed with Araxis Support that they are getting "wrong"
parameters from svn diff into their 'araxissvndiff' utility. When a
particular file has "svn:keywords" property set, the file they get is
pointing to somewhere in /tmp directory. If I remove the svn:keywords
with propdel, then same 'svn diff' results in the "correct" local file
being passed into Araxis. Here's the sample output:
toli_at_tolimac:~/dev/marketcetera/code/public/source$ svn --version
svn, version 1.5.2 (r32768)
compiled Sep 19 2008, 14:28:09
svn diff photon/plugins/org.marketcetera.photon/src/main/java/org/marketcetera/photon/views/AbstractFIXMessagesView.java
arg 0 = /Applications/DevApps/AraxisMerge/Utilities/araxissvndiff
arg 1 = -u
arg 2 = -L
arg 3 = photon/plugins/org.marketcetera.photon/src/main/java/org/marketcetera/photon/views/AbstractFIXMessagesView.java
arg 4 = -L
arg 5 = photon/plugins/org.marketcetera.photon/src/main/java/org/marketcetera/photon/views/AbstractFIXMessagesView.java
arg 6 = photon/plugins/org.marketcetera.photon/src/main/java/org/marketcetera/photon/views/.svn/text-base/AbstractFIXMessagesView.java.svn-base
arg 7 = /var/folders/TL/TLHJYlwRHviA+6Qs-2mN3++++TI/-Tmp-/svndiff.3.tmp
If i do 'svn propdel svn:keywords" on the file, i get the right
path as arg7.
Any ideas on how to disable this "un-expansion"? Should i file an RFE for that?
The full email exchange with Araxis along with possible workaround to
disable "un-expansion" altogether is below:
If the file for which the "svn diff" is performed has keyword
expansion (for $Id$, $Revision$, etc.) or end of line character
translation enabled then Subversion will create what it calls a
'normalized form' of the working file before performing the diff. The
temporary file you're seeing is the normalized form of your working
file. The normalized form un-expands keywords and converts end-of-line
sequences back into their original repository form. This has the
overall effect of preventing differences due keyword expansion and end
of line translation from being reported.
The following page describes the svn:keywords and svn:eol-style properties:
There doesn't appear to be any way of disabling the creation of the
normalized form of the working file via command line options, which is
a shame since Araxis Merge is able to filter out differences due to
keyword expansion (using the Regular Expression filter options) and
end-of-line character differences.
It might be worth filing an enhancement request against Subversion to
enable this normalization to be skipped when a third-party (e.g.
Araxis Merge) diff program is being used. Another option would be to
turn off the keyword and eol expansion for your source files, but I
doubt that's acceptable. Another option would be to build your own
customized version of the subversion client tools so that they skip
the creation of the normalized form of the file. In the case of
subversion 1.4.4, you might be able to get away with editing the
relevant part of the file_diff function in diff.c from:
translated = path;
http://www.marketcetera.com: Open-Source Trading Platform
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-10-22 01:03:00 CEST