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

RE: Partially recursive revert when node kind changes

From: Bob Archer <Bob.Archer_at_amsi.com>
Date: Thu, 10 Feb 2011 14:01:18 -0500

> Bob Archer <Bob.Archer_at_amsi.com> writes:
>
> >> Suppose I have a directory tree:
> >>
> >> foo/
> >> bar/
> >> zig
> >>
> >> and I delete the tree foo/bar and replace it by a file foo/bar.
> >> What
> >> should "svn revert --depth=files foo" do? Should it revert
> >> foo/bar?
> >> How much of foo/bar should it restore?
> >
> > You have done the following:
> >
> > 1. Delete a folder.
> >
> > 2. Add a file.
> >
> > If you revert "foo" it will remove the add, but it won't restore
> the folder... you would have to revert the delete which would
> restore the folder.
>
> Perhaps, but if I delete a file and replace it with another file,
> or
> delete a directory and replace it with a directory, then revert
> will
> undo both the add and the delete. Nodes that get reverted don't
> generally end up deleted, they end up pristine.

I also noticed if I delete a folder and then revert that folder... all the child items stay deleted. Unless of course I use the -R switch. Did you try using the -R switch when you reverted the bar file?

BOb
Received on 2011-02-10 20:01:56 CET

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.