Request: way to get -rBASE with keywords expanded without using the network

Vincent Starre <[email protected]> Wed, 12 Oct 2005 15:57:02 -0400
Newsgroups gmane.comp.version-control.subversion.devel,gmane.mail.eyebrowse.user
Message-ID <[email protected]>
"svn cat -rBASE" uses the network. Sometimes, I might want that. Not 
today! :)

So in order to mimick that, without using the network, I had to do this:

~/bin/svnReview:
svn diff "$1" --diff-cmd ~/bin/svnReviewDiff -x "$1" | sed '1,2{d;}'

~/bin/svnReviewDiff:
diff "$7" "$1" | patch -o/dev/stdout "$6" | sed '1d'

$ svnReview file.c


what that's doing:
svn cat uses the network, svn diff does not. So I use svn diff to get 
the actual file, passing my one-liner as a --diff-cmd
BUT, svn diff doesnt generate diffs by expanding the keywords in base, 
it does so by /removing/ keywords from the modified copy (highly sloppy 
way to behave, imo)
So we apply the difference between the modified file and the modified 
file with keywords removed, to the base file. Presto: the simplest 
imaginable operation made needlessly complex, and I didnt need to wait 3 
seconds for the network to do its thing in order to get it.

come on, there needs to be a better way than that :)