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

Re: Hooks scripts Merge, Reintegrate, and similar

From: David Weintraub <qazwart_at_gmail.com>
Date: Tue, 4 May 2010 19:43:08 -0400

2010/5/4 Vojįček Ale¹ <avojacek_at_fblgroup.cz>:
> Hi all,
> Is it possible to decide and log out, that new Branch was created, branche was reintergrated, tag was created using any of svn hooks?

Hooks don't run in the user's environment and therefore cannot talk to
the user who did the commit or lock or whatever triggered the hook.

The hook script cannot do anything with the client's workspace either.
The best you can do is email the user or if the hook fails, send to
STDERR something that the user will see.

If what you want is an email to someone when someone creates a branch
or does some sort of merge, that's sort of possible.

What you have to do is have a hook script that can help determine that
information. You'd have to have some way of examining the Subversion
log and parsing the information you need. Branching might be fairly
easy since it is a copy and you expect branches to be copied to a
particular place in your repository. For example:

   A /modules/adsuite/branches/5.3.3.5 (from
/modules/adsuite/tags/DEV/ADS-5.3.3-D-1292:64049)

I can see that branch 5.3.3.5 was created from tag ADS-5.3.3-D-1292.
But, only because I see that the directory was copied to under the
branches directory.

Merging is a bit harder to figure out since the log itself just shows
the files that were changed, and doesn't show a change in the
svn:merge property. However, I guess you could get a list of all the
files changed, then compare the svn:merge properties and see which got
changed (which would show you that it was merged).

> Another question is about, how to get enough information using svnlook but with no impacting performance of operations of svn server. What I mean is, that if I will use svnlook changed [rep] command on large commit (say 100+ files in one commit) if it will not extremely impact performens of svn server.

svnlook is very efficient. I have no problems with running svnlook on
large number of changes. However, what you do with that information
might impact the server if you do very program intensive stuff with
it.

-- 
David Weintraub
qazwart_at_gmail.com
Received on 2010-05-05 01:43:37 CEST

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.