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

Re: Difficulty checking out a snapshot based on date or revision

From: Ryan Schmidt <subversion-2006Q1_at_ryandesign.com>
Date: 2006-03-12 13:43:03 CET

On Mar 12, 2006, at 07:02, Bil Kleb wrote:

> For v1.2.1 (r15230) on two different machines, v1.2.3 (r15833)
> on another machine, and v1.3.0 (r17949) on four other machines,
> I get
>
> svn: Syntax error in revision argument '2005-12-09'
>
> for commands like
>
> svn co -r {2005-12-09} svn+ssh://machine/svnroot/old/path
> svn co -r {"2005-12-09"} svn+ssh://machine/svnroot/old/path
> svn co -r {'2005-12-09'} svn+ssh://machine/svnroot/old/path
> svn co -r "2005-12-09" svn+ssh://machine/svnroot/old/path
> svn co -r '2005-12-09' svn+ssh://machine/svnroot/old/path

Yes, those are all not going to do what you want. Subversion needs to
see the revision argument as {2005-12-09} but since shells like Bash
and probably others treat the curly brackets specially, you need to
escape them on the shell.

> or if I play with escaping the braces like so,
>
> svn co -r '{2005-12-09}' svn+ssh://machine/svnroot/old/path
> svn co -r "{2005-12-09}" svn+ssh://machine/svnroot/old/path
> svn co -r \{2005-12-09\} svn+ssh://machine/svnroot/old/path
>
> svn fails trying to check out the current revision (18628) due
> to the old/path that does not exist in the current revision,
>
> svn: File not found: revision 18628, path '/old/path'

The first and third syntax you list are correct. The second may again
not work, because text inside double quotation marks is also
interpreted by the shell, in some shells.

> Even specifying the revision number corresponding to that
> date, e.g.,
>
> svn co -r 17019 svn+ssh://machine/svnroot/old/path
> svn co svn+ssh://machine/svnroot/old/path_at_17019
>
> fails with the same behavior (svn tries to check out the
> current revision but fails due to obsolete path).

I see you've already discovered peg revision syntax:

http://svnbook.red-bean.com/nightly/en/svn.advanced.pegrevs.html

And it's important to understand the difference between the two
revisions that can be specified, and that you sometimes need to
specify both.

This /old/path you're trying to check out... it no longer exists in
the repository's current revision? Then I think you need:

svn co -r 17019 svn+ssh://machine/svnroot/old/path_at_17019

That is: go to revision 17019 (the @17019 part) in the repository,
find the object that was called /old/path at that point, and check
out revision 17019 (the -r 17019 part) of it.

> But for the oldest version, v1.1.4 (r13838), on a fifth
> machine, svn behaves as advertised in the book.
>
> What's up?

I don't know what to say about that. :-)

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Sun Mar 12 13:43:56 2006

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.