Felix Gilcher <felix.gilc...@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...@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.
<URI:http://svnbook.red-bean.com/en/1.5/svn.ref.svn.c.diff.html>):

| Compare revision 3000 to revision 3500 using �...@” syntax:

|    $ svn diff http://svn.collab.net/repos/svn/trunk/committ...@3000 \
|               http://svn.collab.net/repos/svn/trunk/committ...@3500
|    Index: COMMITTERS
|    ===================================================================
|    --- 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
|    Index: COMMITTERS
|    ===================================================================
|    --- COMMITTERS  (revision 3000)
|    +++ COMMITTERS  (revision 3500)

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

| [...@passepartout ~]$ svn list file:///var/tmp/svn-repo
| [...@passepartout ~]$ svn list -r r2 file:///var/tmp/svn-repo
| a/
| [...@passepartout ~]$ svn list -r r2 file:///var/tmp/svn-repo/a
| svn: File not found: revision 4, path '/a'
| [...@passepartout ~]$ svn list file:///var/tmp/svn-repo/a...@r2
| b
| [...@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
trunk.

Tim

Reply via email to