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

Re: Automatic prefix and suffix for commit messages

From: Ryan Phillips <ryan-svn_at_trolocsis.com>
Date: 2007-03-16 22:27:06 CET

Krzysiek Pawlik <nelchael@gentoo.org> said:
>
> Hi,
>
> I need a way to add some text for every commit message, typing it in by hand is
> quite error-prone. I'm working on same repository from various hosts with the
> same user name, and I need a way to tell on what machine the commit was made.
> I've made a patch for libsvn_client that adds two environment variables:
>
> - SVN_LOG_PREFIX - appends the text before commit message
> - SVN_LOG_SUFFIX - appends the text after commit message
>
snip
>
> That way it's possible to do something like this in ~/.bashrc:
>
> export SVN_LOG_SUFFIX="From $(hostname)"
>
> Attached patch adds this feature.
>
> The change has to be done in libsvn_client because log_msg can go in by two
> ways: -m on command line (handled in svn) or using $EDITOR (handled in
> libsvn_client).
>

In addition to everyone else's comments, this is easily scripted in vim or emacs:

au BufRead,BufNewFile svn-commit* :call SVNHookFunction()<cr>

So its not portable to `-m ""` but works.

-Ryan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Mar 16 22:25:03 2007

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