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

Re: Unable to change a commit message

From: Johan Corveleyn <jcorvel_at_gmail.com>
Date: Thu, 14 Jan 2010 15:43:13 +0100

Hi Kari,

[putting users@ back in cc, so other people can chime in if they can help]

On Tue, Jan 12, 2010 at 7:51 PM, <kmcnair_at_lingraphica.com> wrote:
> I didn't change the hook. I'm not totally sure how to change it. I initially
> commented out the line about exiting but after you suggested that was why it
> was failing, I switched that back. It's still hanging with the hooks back in
> their original state. As you can probably tell, I'm rather new at this and
> welcome any advise on correctly editing this to suit my needs.
>
> #!/bin/sh
>
[ ... snip default comments ... ]
>
>
> REPOS="$1"
> REV="$2"
> USER="$3"
> PROPNAME="$4"
> ACTION="$5"
>
> if [ "$ACTION" = "M" -a "$PROPNAME" = "svn:log" ]; then exit 0; fi
>
> echo "Changing revision properties other than svn:log is prohibited" >&2
> exit 1
>
>
> Kari McNair

That hook looks fine to me.

Maybe you can still check for some issues:
- make sure the hook doesn't have line-termination issues (mixed
unix/windows/mac line termination, maybe not showing up in some
editors, but preventing it from being executed correctly).
- make sure the hook is executable by the user that needs to execute
it. Which user this is depends on your server setup (with Apache, the
hook must be executable by the user that runs Apache; with svnserve
and svn+ssh it depends on how you set it up).

BTW, you should probably give some more info about your svn server:
- What version is it?
- What operating system is it running on?
- How do you connect (http(s) or svnserver or svn+ssh)?

Regards,
Johan

> -------- Original Message --------
> Subject: Re: Unable to change a commit message
> From: Johan Corveleyn <jcorvel_at_gmail.com>
> Date: Tue, January 12, 2010 7:53 am
> To: Kari McNair <kmcnair_at_lingraphica.com>
>
> On Mon, Jan 11, 2010 at 10:19 PM, Kari McNair <kmcnair_at_lingraphica.com>
> wrote:
>> I'm trying to remove an invalid character from the end of a commit
>> message.
>> All the correct hooks are invoked but when I use...
>> $ svn propset -r 671 --revprop svn:log "message" URL
>> ...the command prompt window just hangs. I tried changing the message
>> through TortoiseSVN but when I go to save the new message, it freezes.
>> I've
>> even just tried editing it from a Mac through Terminal and that just hangs
>> as well. Anyone have any other ideas?
>
> Only thing I can think of is that your pre-revprop-change hook causes
> the hang. Can you share the contents of that hook?
>
> Otherwise, as a first step, try to add some debug logging code to the
> pre-revprop-change hook (echo some stuff to a file at the beginning of
> your hook, and at the end). So you can see at least if the hook is
> entered and exited correctly ...
>
> Alternatively, if you don't care deeply about this issue, you can also
> change log messages on the server itself by using the svnadmin command
> (bypassing hooks if necessary):
> -----
> $ svnadmin help setlog
> setlog: usage: svnadmin setlog REPOS_PATH -r REVISION FILE
>
> Set the log-message on revision REVISION to the contents of FILE. Use
> --bypass-hooks to avoid triggering the revision-property-related hooks
> (for example, if you do not want an email notification sent
> from your post-revprop-change hook, or because the modification of
> revision properties has not been enabled in the pre-revprop-change
> hook).
>
> NOTE: Revision properties are not versioned, so this command will
> overwrite the previous log message.
>
> Valid options:
> -r [--revision] ARG : specify revision number ARG (or X:Y range)
> --bypass-hooks : bypass the repository hook system
> -----
>
> Regards,
> Johan
>
Received on 2010-01-14 15:43:48 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.