Question

Can someone explain the difference between the use of the -r REV and URL@REV syntax in the following two SVN commands:

  • svn co -r6002 https://svnserv2.acme.com/stx/project1/trunk/gui/Mammoth/WebContent/css

    svn: Unable to find repository location for 'https ://svnserv2.acme.com/stx/project1/trunk/gui/Mammoth/WebContent/css' in revision 6002

  • svn co https://svnserv2.acme.com/stx/project1/trunk/gui/Mammoth/WebContent/css@6002

    Checked out revision 6002.

So if I checkout a version of an SVN directory with -r it fails, but if I use url@REV it works - I would have thought the two were equivalent and unfortunately the SVN docs do not seem to explain the difference.

No correct solution

OTHER TIPS

-r X says to Subversion "go to the URL as it is today, and tell me what you know about revision X" (assuming you haven't specified an @ revision)

url@X says to Subversion "go to revision X and find this URL"

The @ syntax is called a Peg Revision. The -r X is the Operative Revision.

It's a very subtle difference, but very important. You'll often use -r X when you're using @X.

So if you deleted https://svnserv2.acme.com/stx/project1/trunk/gui/Mammoth/WebContent/css in revision 6003, it can't look at that URL now that HEAD is revision 6004 (or anything later) because it doesn't exist.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top