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

Peg Revisions, Was: bug in Subversion, or do I have unreasonable expectations?

From: Scott Palmer <scott_at_digital-rapids.com>
Date: 2005-09-20 15:24:00 CEST

On 20-Sep-05, at 3:46 AM, A.T.Hofkamp wrote:

> Phillip Susi wrote:
>> Add me to the list of people who don't get peg revisions. It
>> seems to me that when you specify revision x to checkout, it
>> should look in the repository under revision x, not the head, and
>> check out the files it
> Hello all,
> I also have yet to encounter the use-of-peg-revisions (and I doubt
> whether I will 'get it' the first time, but it seems to me that a
> lot of confusion is created by the -r rev option, which seems to
> work a lot like CVS -r with the attached assumed semantics which
> don't fully match.

Let me try to help, and at the same time ask for confirmation from
others that I 'get' peg revisions...

Imagine doing something like

svn log -rZZZ myfile

Where ZZZ is some older revision and myfile is the name of a file in
your working copy - NOT a URL.

As I understand it, if myfile was copied from a different file at
revision ZZZ+X, it will not exist in the repository with the name
'myfile' at revision ZZZ. But the above command is supposed to
work. It traces the history of myfile back to 'someotherfile' from
which it was copied.

The name matching of the file is done based on the revision that you
had in the WC, not the revision specified with -r.

Peg-revisions are a way to get the name matching done on a specific
revision, where names could be different. It is only about finding
matching names to identify the resource, and has nothing to do with
the revisions specified with -r, which is used to specify the
revision to operate on, which can be different from the revision to
use for name matching.

Peg revisions become even more important if you actually do have
overlap in the name space.. e.g. what if there was an unrelated file
'myfile' at rev ZZZ that was deleted later and then a new file with
the same name was put in it's place? Now when you ask for info about
'myfile' you need to be able to identify which one. if you want info
on 'myfile' at rev ZZZ, do you want to trace back the history of the
current 'myfile'? Or do you want to get the information about the
myfile that was at that spot in rev ZZZ? They can be two different

Can someone that knows please correct me if I'm wrong about this, or
confirm that I've got it straight?

> As a suggestion, would it be a good idea to drop the -r option and
> have users always use peg revisions?
> Then you have a totally different look and feel of getting old
> revisions with a lot less possibilities for confusion.

No, -r and peg-revisions (as I understand them) are totally different
concepts, you need both.


To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Sep 20 15:26:37 2005

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.