You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by François Beausoleil <fb...@ftml.net> on 2005/05/08 14:24:20 UTC
What different between ls -rX and ls URL@X ?
Hi !
I deleted a bunch of files in r3424, and now I want to copy some of them
back from the previous revision. To determine the exact paths I wanted
to copy, I did:
$ svn ls -r3423 svn://svn.teksol.info/repos/rac/cn-nextgen/trunk/web/
svn: File not found: revision 3424, path '/rac/cn-nextgen/trunk/web'
Notice I did "-r3423". Next, I thought about the @X (peg revision) way
to do things, so I did:
$ svn ls -r3423 svn://svn.teksol.info/repos/rac/cn-nextgen/trunk/web/@3423
LICENSE.txt
Now, I have both -r3423 and @3423. If I run the same command again, and
remove the "-r3423", it works again.
So, there's a concept I'm missing here, and if someone would be so kind
as to explain what I don't understand, I would be grateful. The book
doesn't explain what "peg revisions" are.
In this instance, I expected to see the tree as it existed in r3423.
Thanks !
François
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: What different between ls -rX and ls URL@X ?
Posted by Vincent Lefevre <vi...@vinc17.org>.
On 2005-05-08 11:26:35 -0400, François Beausoleil wrote:
> State of the tree at r3424:
> trunk/
> src/
> web/
>
> (In effect, I did svn mkdir src; srv move web/src src/web; svn commit)
>
> So, when I run "svn ls -r3423 svn://URL/web/src/test-data.ddl", here's
> what I guess is happening:
[...]
> Have I understood things correctly ? If I did, how come the message
> says "test-data.ddl doesn't exist in r3424" ?
Because in HEAD, you have src/web (not web/src) and you requested
.../web/src/... in svn ls?
--
Vincent Lefèvre <vi...@vinc17.org> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / SPACES project at LORIA
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: What different between ls -rX and ls URL@X ?
Posted by François Beausoleil <fb...@ftml.net>.
Ben Collins-Sussman said the following on 2005-05-08 10:29:
> If you wait a few more days, it will. :-)
Great ! I'll be happy to read it :)
> Peg revisions are the mechanism used to trace rename (copy) history.
> Nearly every svn command is of the form:
>
> svn subcommand -r X path@PEGREV
>
> What this means is:
>
> * go to the coordinates (PEGREV, path)
>
> * trace the object backwards to revision X, noticing any copies or
> renames
>
> * perform the command on the older object in revision X, even if it
> has a different path.
Okay, I read what you wrote, but I don't know how to apply it to my case.
State of the tree at r3423:
trunk/
web/
src/
State of the tree at r3424:
trunk/
src/
web/
(In effect, I did svn mkdir src; srv move web/src src/web; svn commit)
So, when I run "svn ls -r3423 svn://URL/web/src/test-data.ddl", here's
what I guess is happening:
* SVN translates the command to "svn ls -r3423 X@HEAD" (HEAD is r3424)
* SVN traces the object backwards to r3423, and notices a copy
(web/src/test-data.ddl@3424 was copied from src/web/test-data.ddl@3423)
* Then, SVN runs the command (ls) on path src/web/test-data.ddl, in
r3423.
Have I understood things correctly ? If I did, how come the message
says "test-data.ddl doesn't exist in r3424" ?
Thanks for helping a lost soul here :)
Bye !
François
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: What different between ls -rX and ls URL@X ?
Posted by Ben Collins-Sussman <su...@collab.net>.
On May 8, 2005, at 9:24 AM, François Beausoleil wrote:
>
> So, there's a concept I'm missing here, and if someone would be so
> kind as to explain what I don't understand, I would be grateful.
> The book doesn't explain what "peg revisions" are.
>
If you wait a few more days, it will. :-)
Peg revisions are the mechanism used to trace rename (copy) history.
Nearly every svn command is of the form:
svn subcommand -r X path@PEGREV
What this means is:
* go to the coordinates (PEGREV, path)
* trace the object backwards to revision X, noticing any copies
or renames
* perform the command on the older object in revision X, even if
it has a different path.
So, for example, if 'foo' was renamed to 'bar' in revision 20, and
then I run
svn cat -r 10 bar@50
...it will actually end up showing the contents of (r10, foo).
If you don't explicitly give a peg-revision, then it defaults to BASE
on working-copy objects, and HEAD on URL objects.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org