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

Re: Add text to commit log

From: Erling Wegger Linde <erlingwl_at_gmail.com>
Date: Wed, 12 Mar 2008 09:52:51 +0100

Thanks it works now!

I had to strip "/home/" from repos, and add username and password
params to the command.

My REPO url now looks like: http://localhost:8090/svn/milesplatform

Thanks again! :D

- Erling

On Tue, Mar 11, 2008 at 7:26 PM, Hansa <mythtv_at_logic-q.nl> wrote:
> Ok.. I've figured it out. I think :)
>
> The final part of my last e-mail isn't entirely correct.
> You should make a combination between a post-commit hook and a
> post-revprop-change hook. Why? Because you want to change the "svn:log"
> property after you've committed a revision.
>
> Properties (via svn propset) can be set on files, dirs, or revisions. Also
> "svn propset" acts on "working copies" or via a URL on the repository. "svn
> propset" does NOT act directly on the repository path.
>
> svn propset svn:log --revprop -r $REV $PROPVAL /path/to/repository
> ^^ does not work ^^
> Here is what you should do:
>
> # cd /path/to/svn/repos/hooks
> # cp post-commit.tmpl post-commit
> # chmod 755 post-commit
>
> edit post-commit and make it look something like this:
>
> REPOS="$1"
> REV="$2"
>
> # Modify REPOS to svn/html URL
> REPOS=`echo $REPOS | sed 's/\/path\/to\/repos\///'`
> REPOS="svn://svnserve.url/$REPOS"
> # or:
> #REPOS="http://svn.appache.url/$REPOS"
>
> svn propset svn:log --revprop -r $REV \"new log\" $REPOS
>
> Save.
>
> # cp pre-revprop-change.tmpl pre-revprop-change
> # chmod 755 pre-revprop-change
>
> edit pre-revprop-change:
>
> REPOS="$1"
> REV="$2"
> USER="$3"
> PROPNAME="$4"
> ACTION="$5"
>
> if [ "$ACTION" = "M" -a "$PROPNAME" = "svn:log" ]; then exit 0; fi
> if [ "$ACTION" = "A" -a "$PROPNAME" = "svn:log" ]; then exit 0; fi
> # You could combine -a and -o, but I didn't want to :)
>
> echo "Changing revision properties other than svn:log is prohibited" >&2
> exit 1
>
> Save and you're done (I think) :)
>
> Try it and let me know if this works...
>
> Hansa
>
>

-- 
Med vennlig hilsen
Erling Wegger Linde
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-03-12 09:53:14 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.