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

Re: Getting HEAD revision number from a URL

From: Peter Valdemar Mørch <swp5jhu02_at_sneakemail.com>
Date: 2004-10-26 12:27:38 CEST

Garrick Olson Garrick.Olson-at-Aceva.com |Lists| wrote:
> I am not very familiar with that API. Does it get the latest revision
> for the entire repository, or the latest revision (that contains
> changes) for a path within the repository?
>
> The important thing for build servers, is that you want to pick up
> changes only for a particular path (branch) within the repository.

and then Ben Collins-Sussman sussman-at-collab.net |Lists| wrote:
> It sounds like you're missing a fundamental SVN concept. The
> repository has a single, global revision number. There's no such
> thing as "the latest revnum of a path".

It seems that this is really two questions:

* Question 1: What is the HEAD of the entire repository
http://<repos>?
======================================================
This is unique and common to http://<repos>/<projN> and
http://<repos>/<projM>. I can get this with
        svn log -q -v HEAD http://<repos>.

(But if I only have http://<repos>/<projN>, how do I reliably determine
the http://<repos> part?)

This is the question Ben's headrev.c answers.

* Question 2: What is the last revision where something changed in
http://<repos>/<projN>?
================================================================
This may or not be HEAD, depending on where the last commit took place.
svn log -q http://<repos>/<path1> | head -2 | my_svn_log_parse
will tell me that.

lyta_at_pvm:~> svn log --quiet svn+ssh://cmdev/repos/trunk | head -2
------------------------------------------------------------------------
r4725 | hjc | 2004-10-26 10:31:45 +0200 (Tue, 26 Oct 2004)
svn: Can't write to stream: Broken pipe

lyta_at_pvm:~> svn log --quiet svn+ssh://cmdev/repos/branches | head -2
------------------------------------------------------------------------
r4708 | pvm | 2004-10-24 15:26:56 +0200 (Sun, 24 Oct 2004)
svn: Can't write to stream: Broken pipe

lyta_at_pvm:~> headrev svn+ssh://cmdev/repos/branches
The latest revision is 4725.

Isn't that true? There are really two different questions here, with two
different answers (4725 and 4708)...

Peter

-- 
Peter Valdemar Mørch
http://www.morch.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Oct 26 12:28:19 2004

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.