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

Re: copy/remove weirdness

From: Ben Collins-Sussman <sussman_at_collab.net>
Date: 2004-03-31 18:16:05 CEST

On Wed, 2004-03-31 at 09:28, Joe Drew wrote:

> I can't seem to copy removed files without using a URL:
>
> $ svn rm a.txt
> D a.txt
> $ svn ci
> Deleting a.txt
>
> Committed revision 2.
> $ svn cp -r PREV a.txt a.txt
> svn: 'a.txt' is not under version control

Well, sure. The file is gone. You can't ask svn subcommands to
manipulate working-copy paths that aren't there. You'll need to look
through history (svn log) to find the last (rev,URL) coordinates in
which it existed, and then manipulate the URL if you want to resurrect
the file. The book (chapter 6) explicitly discusses resurrecting
deleted things.

> --- Separate issue ---
>
> Copying using some symbolic revision names gives me misleading error
> messages:
>
> $ svn cp -r PREV file:///home/hosehead/repo/a.txt .
> svn: A path under version control is needed for this operation
> $ svn cp -r COMMITTED file:///home/hosehead/repo/a.txt c.txt
> svn: A path under version control is needed for this operation

I agree, the error messages could be more specific. They should say
something like: 'The PREV/COMMITTED revision keywords only apply to
working copy paths, not URLs'.

> Using numeric values I get:
> $ svn cp -r 4 file:///home/hosehead/repo/a.txt c.txt
> svn: Path 'file:///home/hosehead/repo/a.txt' not found in revision '4'

What's misleading here? You've asked for a path that doesn't exist in
revision 4, and that's exactly what it told you.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Mar 31 18:16:57 2004

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.