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

Re: Why won't `svn revert` restore directories?

From: Ryan Schmidt <subversion-2006c_at_ryandesign.com>
Date: 2006-07-18 15:45:24 CEST

On Jul 18, 2006, at 10:39, Björn Eriksson wrote:

> Greetings list,
> `svn help revert` says "... However, it does not restore removed
> directories."
> Why is that?
> [Btw, the svnbook (nightly) doesn't mention this. It says "svn revert
> — Undo all local edits." and "Reverts any local changes to a file or
> directory..."]

In order to revert anything, Subversion needs to get at the pristine
copy of everything it stashed away in the directory's .svn directory.

If you did "svn rm <directory>" and then wanted to revert that, you
could, by saying "svn revert <directory>". This works because
Subversion doesn't actually delete the directory until you commit,
thus the .svn directory with the pristine files still exists.

If OTOH you did "rm -rf <directory>" then you could not "svn revert
<directory>" because the rm -rf also removed the .svn directory with
the pristine files.

To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Jul 18 15:47:40 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.