[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: Rob Hills <rob_at_netpaver.com.au>
Date: 2004-10-26 11:22:43 CEST

Hi David,

On 26 Oct 2004 at 1:42, David Rees wrote:

> Rob Hills wrote, On 10/25/2004 10:43 PM:
> >>
> >> 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".
> >
> > I understand this, but for any subtree within the repository, the
> > last revision to any file within that subtree won't always be the
> > same as the last revision to the head.
> >
> > This becomes important if you have a tree containing a number of
> > different projects as we do, something like:
> >
> > /projects/project1 /projects/project2
> >
> > etc. The last revision for project1 won't necessarily be the last
> > revision for project2 or for the head.
>
> Are you sure? Think about it. :-)
>
> The last revision for /projects is the same as the last revision for
> /projects/project1 which is also the last revision for /projects/project2.

I agree that is how Subversion works. However, I don't believe that way of thinking
necessarily fits the way everyone works, which is probably why this thread has the
legs that it has. Given the structure mentioned above, let's take a scenario where I
make a change to some source under projects/project1 and commit that as revision
1432, and I then change some source under projects/project2 and commit that as
revision 1433. In this scenario, my view is that the last revision to project1 is revision
1432, not 1433, which is the last revision for project2 and of course the head.

That may not be how everyone sees it, but it's how we see it here. I believe
Subversion could be tweaked to work this way without breaking it for people who like
it the way it is, for example, by adding a special keyword for use with the -r switch
(something like LAST or SUBTREEHEAD could work).

I do note from the documentation however, that normally running the log
subcommand on a "specfic path" (in the words of the "tip" at the end of the
documentation on svn log), it will only return a result if that specific path was changed
in the revision specified. Hence, if this were altered to return the latest revision of any
files in the subtree, I don't believe it would affect the way it is used currently, given
that it's hit and miss whether one gets a meaningful result currently anyway.

Cheers,

Rob Hills
MBBS, Grad Dip Com Stud, MACS
Senior Consultant
Netpaver Web Solutions
Tel: (08) 9485 2555
Mob: (0412) 904 357
Fax: (08) 9485 2555

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Oct 26 11:49:01 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.