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

Re: Hack/Work Around for Log Message Templates?

From: Daniel Patterson <danpat_at_danpat.net>
Date: 2005-04-14 10:15:11 CEST

Brian Huddleston wrote:
> So, I am wondering what would be a good work around until 1973 trickles up to the TODO list?
>
> Maybe setting the editor variable to a script? I'm not sure how it works in the svn case.

   Maybe write a small "svncommit" wrapper that does something like:

   ------------------------------------------
   #!/bin/sh

   cat <<EOT > template.tmp
   Active Issues:
   Resolved Issues:
   Description:
   EOT
   # TODO: check VISUAL, EDITOR and have a fallback....
   $EDITOR template.tmp
   # TODO: Check return code from editor, quit if it fails
   svn commit -F template.tmp "$@"
   # TODO: maybe only delete this if the commit is ok?
   rm template.temp
   ------------------------------------------

   Heck, you could write a wrapper for the whole of the "svn" command,
   and intercept calls to "commit". Unfortunately, that won't pick up
   the list of files and stick them on the bottom, unlike the default
   incantation of $EDITOR. You might be able to do some trickery
   with "$@" and "svn st" to work out, and then fiddle with
   template.tmp to remove them before you call "svn commit"...

   I hope you've got a nice way of rolling this out to everyone
   though :-)

daniel

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Apr 14 10:18:31 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.