You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Bil Kleb <Bi...@nasa.gov> on 2006/03/12 06:02:35 UTC

Difficulty checking out a snapshot based on date or revision

Hello,

I'm confused by svn's behavior with respect to checking
out a repository as of a specific date or revision.

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

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'

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@17019

fails with the same behavior (svn tries to check out the
current revision but fails due to obsolete path).

But for the oldest version, v1.1.4 (r13838), on a fifth
machine, svn behaves as advertised in the book.

What's up?

I've scoured bug reports, the manuals, the fax, Google,
release notes, the tracker, but the closest thing I could
find was,

  http://subversion.tigris.org/issues/show_bug.cgi?id=2349

Surely, this behavior is due to some user error on my part?

Thanks,
-- 
Bil Kleb
http://fun3d.larc.nasa.gov

Note: the machines span x86, x86_64, ppc, and irix64
architectures; WindowsXP (mingw), GNU/Linux, OS X, and
Irix OSs; and bash and tcsh shells.  The OS X ppc with
bash happens to be the combination that works.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

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

Posted by Ryan Schmidt <su...@ryandesign.com>.
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@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@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