On Jul 27, 2010, at 23:30, ram kumar wrote:

> We are using http protocal. Please find the server and client details below. 
> We have to popup some window on the client machine either in pre or post 
> commit operation.

Does this mean there is already some other program installed on every client 
machine watching for incoming connections of some kind, waiting to display 
messages to the user? And you want to interact with that program from the hook 
script?

> Prototype is working fine

What prototype?

> so need to know how to get the client ip adress or hostnmae in pre/post 
> commit trigger.
>  
> SVN Server: Linux
> SVN Clients: Windows XP

Subversion does not make the client IP address or hostname available to you in 
the pre- or post-commit hook scripts.


You could possibly write your own hook triggering method, and bypass 
Subversion's, using a strategy like the one I employ in my svnhookdispatcher 
script:

http://www.ryandesign.com/svnhookdispatcher/

(I read the Apache log, parse out the details, and call some scripts; you could 
additionally parse the client IP out of the log and send it along to the 
scripts.)


Or you could consider a communications method that does not rely on knowing the 
client IP. For example, you already know the committer's username. If the 
committer also has an email address that can be computed or looked up based on 
that username, you could send the committer an email with whatever you wanted 
to tell them. Or if they are running an instant messaging client like AIM or 
ICQ or Jabber and you can discover their instant messaging username, you could 
send them an instant message. Or if you have a Twitter account for commits you 
could post whatever information to the Twitter account and users could read it 
with a Twitter client. Or you could post the information to a web site in an 
RSS-compatible format and users could read it using an RSS client. There are 
many options available (probably more than the ones I've mentioned here).


Reply via email to