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

Re: Logging granularity

From: Paul L Lussier <pll_at_lanminds.com>
Date: 2003-05-16 17:25:49 CEST

In a message dated: 15 May 2003 17:47:50 EDT
"Stefan Monnier" said:

>Of course, what would be neat is if `svn' offered a way to hook
>such a wrapper into `svn' directly so that users can keep using
>`svn commit' and `svn log' rather than having to use `svn-commit'
>and `svn-log' (which GUI front ends will not know to do).

Hmmmm, what about an option to svn commit/log such as:

        svn commit --wrapper foo.sh

Or something like that. This could also be something which could be
set in the .subversion/config file as well. If set, svn commit/log
would automagically use that wrapper script.

Just an idea, which probably has many far-reaching consequences I'm
unaware of :)

>The only tricky part of the wrappers will be to adjust the filenames
>to account for the fact that they are relative to the current
>directory. This will probably require adding somewhere in the log
>entry the full path (from repository root) of the current directory.

Hmmm, well, maybe not too tricky, bascically, grap the output of

        svn stat | grep ^M | perl -pe 's/.*?\///'

and you now have a list of modified files with relative paths from
the cwd. Getting the repo root is simply:

        svn info| grep ^Url | cut -f2 -d' '

I'm guessing that svn has APIs somewhere to give you all this
information already, which would be much more efficient than using
these shell pipe-lines though :)

-- 
Seeya,
Paul
--
Key fingerprint = 1660 FECC 5D21 D286 F853  E808 BB07 9239 53F1 28EE
	It may look like I'm just sitting here doing nothing,
   but I'm really actively waiting for all my problems to go away.
	 If you're not having fun, you're not doing it right!
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri May 16 17:26:46 2003

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

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