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

Re: Polling revision numbers...

From: Andy Levy <andy.levy_at_gmail.com>
Date: Tue, 24 May 2011 16:10:02 -0400

On Tue, May 24, 2011 at 16:01, Jean-Marc van Leerdam
<j.m.van.leerdam_at_gmail.com> wrote:
> Hi,
>
> On 24 May 2011 21:26, JGalarza <jgalarza_at_astromed.com> wrote:
>> Ideally I want to create an internal web portal that displays certain files from a checked out directory.  Mainly certain images/license that may or may not need updating by Product Managers and the like.  The server in which this portal will live will have the directory but that dir needs to be updated, not constantly, before they commit a new image/license and I'd rather not this when the log in or right before they update because our commits can be rather large (speed and performance of portal are essential).
>>
>> My first thought is that constantly sending the 'update' command may bog down the server, even intermittent calls during a session may prove to be too much.  I'm worried about this because we have other living applications on the server (which may or may not include our SVN later).
>>
>
> It is not entirely clear what you want, but it looks like you could
> use post-commit hooks on the repository to 'push' relevant content to
> the webserver/portal. That ensures that there will only be update
> traffic when it is relaly needed.
>
> Read up on the subversion hooks in the svn documentation for more
> information. The hooks can be used to pretty much do anything (they
> are shell scripts or batch files depending on the server platform),
> from sending a notification to copying/exporting files from the
> repository to calling svn update on a specific working copy. It all
> depends on the way your svn server and web server are connected.

I agree, it's very unclear what's being asked here but when a
near-instant update/trigger is needed, a hook is almost always
preferable to polling incessantly.

>> My questions are:
>>
>> A) Is there a process hit from the Update command and the number of times called? If no then is it bad form to call the update command almost constantly during a session?
>>
> Yes, all commands have a (sometimes small) resource demand, and
> polling frequently is generally not a good solution.
>
>> B) Is there a way to ask for ONLY the revision number of my branch and the main tree?  This is so I can manually decide if I should call the update during the session and I don't really have the resources to hash through the revision log to find out every time I send 'update'.
>
> Probably, although I don't know the svn command line switches to do
> it, but using a hook to notify you or push the update to the right
> location is less resource intensive.

svn info <url> then parse the output for the bits you need.

>> C) If the answer to B is "no there is not a way" and "A" is "there is a performance hit" or "sending 'update' constantly is a terrible thing to do" then can I request this as a feature or possibly there is some 3rd-party DLL/app/service/etc that can do this for me?
>
> There is the CommitMonitor[1] that may be useful for you, although I
> have never used it myself yet. It is a user tool and I don't know if
> it can be accessed programmatically.

Just to be clear, TortoiseSVN (and CommitMonitor) is almost certainly
not the right way to approach what's needed here. Command-line svn,
hooks, and possibly language bindings/DLLs/modules/packages are much
better suited to automation like this.

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=2747064

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2011-05-24 22:10:47 CEST

This is an archived mail posted to the TortoiseSVN Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.