Hi,
What I want to do is, create app (may be WCF service) which will do smart evidence about changes in svn vs our bugtrack systém (mantis).
I will parse output from svnlook and I will try to make decision what that change does mean.
If that was creation of branch, tag, Update and so on.
I hopped that there is some way to catch command which was send to svn, because then it will be easier to find out if user merging from trunk into branch or reintergating branch back to trunk. Identify all only from logs will be hard (if I did not miss something) . Sometimes we have problems with mergeinfo properties, so we must fix them, so about merging I cannot be 100% sure that I can find all information only from property.
If there is not way how to indentify exact command what user send to svn server with log, I found only one solution which can solve that. Use some pharse in commit log on some situations. If user will create branch then he puts something like 'CREATE BRANCH' into commit log, similar commands he will put on some operations, then I have exat way how to parse it and how to decode it.
So have you someone any better way, or is there some way how to catch svn command with svn transaction in hook or something else?
About performance, I want to do this app as WCF service, which will accept some data from hook (so parsing, and all other things which can impact performance of svn server) will be asynchronus and will computed on other server. I wanted to do that using JSON messages, but when we have svn server on linux I have to find out if JSON WCF on mono is implemented, if not I have to find another solution how to do this asynchronously and on another server then svn.
And sorry for m y poor English :-)
Have a nice day.
A.
-----Original Message-----
From: David Weintraub [mailto:qazwart_at_gmail.com]
Sent: Wednesday, May 05, 2010 1:43 AM
To: Vojáček Aleš
Cc: users_at_subversion.apache.org
Subject: Re: Hooks scripts Merge, Reintegrate, and similar
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 11:02:40 CEST