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

Re: $log$ keyword expansion with hook-scripts?

From: Ryan Schmidt <subversion-2007b_at_ryandesign.com>
Date: Mon, 14 Jan 2008 13:50:46 -0600

On Jan 14, 2008, at 09:17, patrick wyss wrote:

> John Peacock wrote:
>
>> patrick wyss wrote:
>>
>>> i wonder if anybody has implemented the $log$ keyword expansion as a
>>> hook-script.
>>> i think it should be fairly easy to implement it the way it
>>> worked in CVS
>>
>> It's not. There is no multiline keyword support in Subversion, so
>> unless you want the $log$ to be one big line, you are out of luck.
>
> but wouldn't it be possible to have some perl/python/whatsoever pre-
> commit
> script which does add current comment after the first $log$.
>
> or even better delete the whole log and fill in the output of "svn
> log"
>
> would this realy be tricky to implement?

I think you should not pursue this any further. The Subversion
developers have already explained that this feature does not exist,
that there will be no plans to add this feature, and that this
feature is a bad idea. See the FAQ:

http://subversion.tigris.org/faq.html#log-in-source

>>> btw: yes, i read
>>> http://subversion.tigris.org/faq.html#log-in-source
>>> but i'm one of the "I don't care about that. I want to use it
>>> anyway."-guys...
>>
>> Sorry. You may want to consider changing your process to include
>> more
>> useful comments in the source code or just have a post-commit script
>> which updates a code-management tool like Trac (not that I
>> particularly
>> like Trac)...
>
> the thing i like about having the log in the sources is that you
> quickly see
> the files history without having to switch between tools. maybe
> someone's
> working offfline (in an airplane...) etc.

If you want to support such offline development, investigate using
svk instead of svn on the client side. svk gets a complete copy of
the repository onto the client machine, so not only can you access
the log, you can also commit changes locally while you're offline,
then later, when you're online again, bring those changes into the
main repository. See:

http://svk.bestpractical.com/

> another idea i had is that maybe we'll include some XML for
> gnerating the
> project dokumentation into subversion. it would be perfect if you
> could
> automatically have the revision history in the printed dokument...

Your build script can use the "svn log" command to get the revision
history when needed. But, again, as per the concerns raised in the
FAQ above, what log will you use? The log of the trunk? The log of a
branch? The log of the trunk and all branches and all tags?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-01-14 20:52:02 CET

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.