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

Re: svn revert .?

From: Michael Wood <mwood_at_its.uct.ac.za>
Date: 2003-10-16 00:08:02 CEST

On Wed, Oct 15, 2003 at 10:28:30PM +0100, Roger Lipscombe wrote:
> > 'svn revert .' will just revert the directory itself, not any
> > files in it. You want svn 'revert . -R'
> >
>
> No I don't :-)
>
> I _only_ want to revert changes in the current directory, not in its
> descendants. I guess 'svn revert *' is what I need, then. Or maybe
> it's not. Will this revert changes to the directories (e.g.
> properties etc.)?

The recursive/non-recursive behaviour of various Subversion commands is
likely to change at some point to a --depth=[0|1|infinite] or something
similar, because recursive/non-recursive doesn't give you enough
options.

"svn revert" uses depth 0, unless you specify --recursive, in which case
it's infinite. There's no way to get depth 1 safely. The closest
approximation would be "svn revert *" but you might prefer:

$ find ./ -maxdepth 1 -type f -print0 | xargs -0 svn revert

Hope that helps :)

-- 
Michael Wood <mwood@its.uct.ac.za>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Oct 16 00:09:33 2003

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.