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

Re: Better way to get the full rule of the last commit?

From: Ryan Schmidt <subversion-2010d_at_ryandesign.com>
Date: Sun, 10 Oct 2010 21:43:02 -0500

On Oct 10, 2010, at 21:34, Tech Geek wrote:

> All my repositories live under /var/lib/svn/.
> Let's the output of the following command (on the SVN server):
> # svn changed /var/lib/svn/projectA/
> is
> A PartA/tags/DEV-1.00_RC5/
> Now in my post-commit hook I need the following value in a variable (say EMAIL_URL):
> EMAIL_URL=/var/lib/svn/projectA/PartA/tags/DEV-1.00_RC5
> Right now the way I am getting this value in my post-commit hook is as follow:
> DIRCHANGE=`$SVNLOOK changed "$REPOS" | $GREP "^A\W.*" | cut -d' ' -f4`

I assume you mean to also pass "-t $TXN" to svnlook in there somewhere.

> Is there any command which will return the full path of the directory inside that repository under which the changes were made by the last commit?

Isn't that what your code shown above does? Or are you asking if there's a simpler way? If so, I'm not aware of one. Well, I mean, you could combine the grep and cut commands into a single sed or awk command, but that's not a big difference.
Received on 2010-10-11 04:50:23 CEST

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