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

Re: @REV vs -r REV

From: Zing <zing+svnusers_at_fastmail.fm>
Date: Wed, 22 Apr 2009 11:12:28 -0400 (EDT)

On Wed, 22 Apr 2009, Andrey Repin wrote:

> Greetings, Giulio T!
>
> >> >> []$svn cat -r HEAD http://svn.darkdragon/repos/trunk/file1@22
> >> >> svn: Unable to find repository location for
> >> >> 'http://svn.darkdragon/repos/trunk/file1' in revision 25
>
> >> >> []$svn cat -r 23 http://svn.darkdragon/repos/trunk/file1@22
> >> >> svn: Unable to find repository location for
> >> >> 'http://svn.darkdragon/repos/trunk/file1' in revision 23
> >> >>
>
> > To me it seems obvious that svn can't find the file. You're asking for a
> > revision (with the -r option) that is past the peg revision (specified by
> > the @). It's like saying, what did you look like when you were 20 if you
> > consider yourself 15 now?
>
> Comparing SVN to yourself is not going to help well, unless you've been
> resurrected already :)
>
> > Or maybe I got the idea of operation and peg revisions completely wrong.
>
> If you take a closer look at the script attached to my previous post, you'll
> see that file1_at_1 and file1_at_2 is a two different files.
> Completely different.
>
> If you want translation of my construction to "normal english", it would read
> svn cat "Show me
> -r HEAD current content
> file://repos/file1_at_1 of the file that originating from /file1 in revision 1
>
> Because SVN, unlike CVS, *DO* track file renames, it SHOULD find it... but it
> couldn't...

Thanks for the script.sh, I understand now. For your script, subversion
COULD in theory return what you are looking for: the contents of file2_at_4,
but the current algorithm can't (it's explained in the peg rev section of
the book).

But, things get complicated very easily. If you then do:

$ svn cp file://$repos/file1_at_1 file3
$ svn ci -m 'Commit 5'

Now what answer would you expect when you run:

$ svn cat -rHEAD file://$repos/file1_at_1

Both file2_at_5 and file3_at_5, have lines of history back to file1_at_1. You just
can't pick one of the two and show that, although I suppose you could
display both, but I rather not think about trying to support that. :)

Hope that helps.

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1861780

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-04-22 17:13:38 CEST

This is an archived mail posted to the Subversion Users mailing list.