> -----Original Message-----
> From: Bob Archer [mailto:Bob.Archer_at_amsi.com]
> Sent: donderdag 10 februari 2011 19:57
> To: Philip Martin
> Cc: dev_at_subversion.apache.org
> Subject: RE: Partially recursive revert when node kind changes
>
> > 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.
>
> Ah... well I just tried it and can't do it. At least, in Windows... if
> I svn delete a folder and then try to create a file of the same name I
> get an error that it is a duplicate name. Because the folder is still
> in the file system marked as deleted in the working copy. Perhaps
> another file system type will still allow the file to be there?
This scenario is new in 1.7. It couldn't work on older versions because:
* The directory would remain after deleting (to keep the .svn). In 1.7 the
data is in the single .svn of the working copy root.
* svn_wc_entry_t could only store one node type.
Bert
Received on 2011-02-10 20:00:50 CET