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

RE: Getting the current repository version

From: Mike Quilleash <mike.quilleash_at_subexazure.com>
Date: 2007-05-10 12:08:57 CEST

Ah I kept getting an error about 'svn info' not supporting URLs only
local paths. I've upgraded to the latest client and it works fine.

This will be used by a build process which always does update at the top
level so I'm not too worried about different versions in the local copy.

Thanks for the help.


-----Original Message-----
From: Ryan Schmidt [mailto:subversion-2007b@ryandesign.com]
Sent: 10 May 2007 10:45
To: Mike Quilleash
Cc: users@subversion.tigris.org
Subject: Re: Getting the current repository version

On May 10, 2007, at 04:29, Mike Quilleash wrote:

> I want to be able to detect if a local copy is older than the
> respository. Closest thing I can find to do this is:
> svn -q -r HEAD log svn://xxx/trunk
> Which prints out the repo revision of the head, but i'm not sure if
> this works for branches.

Branches are nothing special. The HEAD of the repository is the HEAD of
the repository, regardless what URL you use to ask for it.

You could also use "svn info" to get this information:

$ svn info svn://xxx/whatever | awk '/^Revision:/ {print $2}'

> Just being able to get the latest revision of a repository URL would
> be fine as I can get the local revision with 'svn info'

Be aware that "svn info" on a local working copy will only tell you
about the exact object on which you asked for the info. For example, if
you run "svn info" at the root of your working copy and it's, let's say,
42, there's no guarantee that the files or directories inside that
directory are also at that revision. So it's better to use "svnversion"
instead of "svn info" for this. It might print something like "39:42"
which tells you the low and high revision numbers across the entire
working copy.

 This e-mail is bound by the terms and conditions described at http://www.subexazure.com/mail-disclaimer.html

To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu May 10 12:09:20 2007

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.