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

Re: Usage for svn list

From: Tim Landscheidt <tim_at_tim-landscheidt.de>
Date: Tue, 26 Jan 2010 17:19:07 +0000

Felix Gilcher <felix.gilcher_at_bitextender.com> wrote:

> you seem to be confused about Peg revisions, you could read about them here: http://svnbook.red-bean.com/en/1.5/svn.advanced.pegrevs.html

> In short, a peg revions (@2, @HEAD, ...) denotes that the item you're looking for can be found at the specified path at the specified revision. So

> svn list -r2 file:///var/tmp/svn-repo/a_at_r4

> translates to "show me the list in revision 2 for the directory that's named "a" in revision 4. Peg revisions can be implied and usually default to "BASE" which is the working copy revision. A peg revision must be a revision number and cannot be a date, but as above, you can combine peg revisions and the -r parameter.

> Hope that answers your questions.
> [...]

Yes, it does. I wasn't aware of those peg revisions, as on
the way over from CVS there were huge signs: "A revision in
SVN always relates to a whole tree." and some parts of the
SVN book I looked at used them interchangeable like they
were just syntactic sugar (cf.

| Compare revision 3000 to revision 3500 using “@” syntax:

| $ svn diff http://svn.collab.net/repos/svn/trunk/COMMITTERS@3000 \
| http://svn.collab.net/repos/svn/trunk/COMMITTERS@3500
| ===================================================================
| --- COMMITTERS (revision 3000)
| +++ COMMITTERS (revision 3500)
| …

| Compare revision 3000 to revision 3500 using range notation
| (pass only the one URL in this case):

| $ svn diff -r 3000:3500 http://svn.collab.net/repos/svn/trunk/COMMITTERS
| ===================================================================
| --- COMMITTERS (revision 3000)
| +++ COMMITTERS (revision 3500)

Even more so, I am *still* (:-)) baffled by the behaviour
descending paths:

| [tim_at_passepartout ~]$ svn list file:///var/tmp/svn-repo
| [tim_at_passepartout ~]$ svn list -r r2 file:///var/tmp/svn-repo
| a/
| [tim_at_passepartout ~]$ svn list -r r2 file:///var/tmp/svn-repo/a
| svn: File not found: revision 4, path '/a'
| [tim_at_passepartout ~]$ svn list file:///var/tmp/svn-repo/a_at_r2
| b
| [tim_at_passepartout ~]$

It is perfectly logical from SVN's point of view, but
scarcely intuitive :-).

  Anyhow, is there a "proper" way to deduce a revision num-
ber from a date for a given path? At the moment (I'm brows-
ing the output of cvs2svn to see if the repository has been
converted correctly), I use "svn log --verbose" on the

Received on 2010-01-26 18:20:15 CET

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.