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

Re: How to detect remote changes?

From: Daniel Rall <dlr_at_collab.net>
Date: 2006-11-14 00:20:15 CET

On Sun, 12 Nov 2006, Jochen Wiedmann wrote:

> On 11/12/06, Daniel Rall <dlr@collab.net> wrote:
>
> >> in order to trigger some actions on remote changes, I would like to
> >> detect whether they are any. Think of it as a poor mans cruisecontrol,
> >> or continuum.
> >>
> >> My question is, how I may detect such changes. Of course, I can run
> >> "svn update" and parse the output for lines like "U changes.xml", but
> >> that doesn't attract me too much. Is there any better possibility?
> >
> >Jochen, you want 'svn status -uv'.
>
> Thanks for the hint, Daniel, but how does that help me?

It does exactly what you asked for -- it detects changes to the
repository (without updating your WC).

Last I looked, CruiseControl implemented this via the equivalent of
'svn log -rBASE:HEAD'. This gives you less information, but you can
detect changes to the repository by the presence of any output.

> As far as I can see, it produces even more output than "svn update",
> which I have to parse?

If you use the command-line, that's correct. If you prefer to use one
of Subversion's API, you won't need to do any parsing, but would need
to iterate over the status results.

There is no direct "has the repository changed?" command.

- Dan

  • application/pgp-signature attachment: stored
Received on Tue Nov 14 00:22:17 2006

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.