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

Re: [TSVN] Recover deleted file

From: SteveKing <steveking_at_gmx.ch>
Date: 2004-06-25 20:09:11 CEST

David CM Weber wrote:
> Sorry if this seems basic, but I actually cannot find the answer. I
> STFI, RTFAQ, STArchive, RTFM, etc.
>
> Reading the svn book, it states that the best way to recover a deleted
> file is to copy a specific revision to the WC, and then commit it. So,
> I started poking around in TSVN for the comprable command.
>
> I looked in the repository explorer, found the file in the correct
> revision, right click.... No copy. Searched the documentation. No
> luck.

Sorry. I just saw that the copy command in the repository browser is
only there for HEAD revisions.

> I can't seem to find a way to do an "interactive" copy. Am I missing
> something?

No. You're right.

> What is the "accepted" way to undelete files using tsvn?

Ok, so currently TSVN has no way to "copy" an old revision to the
working copy. But as a workaround, you can use the "save as..." command
in the repository browser. But this way you will loose the history of
that file, i.e. it gets re-added from scratch.

As of revision 1278, I added a copy command to the repository browser.
If the repobrowser is showing the HEAD revision, the copy command
behaves like before. If showing _not_ HEAD (i.e. an older revision) the
"copy to..." command shows the "save as..." dialog where you can specify
the path in the working copy. It then does a copy from the URL@rev to
your working copy - exactly what you need.

> (Off topic [but related]: I tried using the command line svn to do it
> that way, but the URI has spaces in it, which is messing up SVN. I
> tried using %20 in place of the spaces, but again, no dice. It was
> complaining that the file wasn't in that revision. Any way to work
> around this? Get a URI encoded version of the files at particular
> revisions?)

Are you sure that you escaped _all_ spaces with %20 ? Also, not all
chars are URI conformant, you also have to escape non-ASCII chars!
If you want to see the URI of a file, select it, right-click on it and
choose "properties" in the explorer context menu (_not_ the TSVN context
menu). Then in that dialog go to the Subversion tab. On top of that tab,
the URI of that file is shown (including several other infos about that
file).

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org
Received on Fri Jun 25 21:12:51 2004

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

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