[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

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

From: Vincent Starre <vstarre_at_comcast.net>
Date: 2005-10-12 21:57:02 CEST

"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 :)

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Oct 12 22:00:06 2005

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.