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

Re: [PATCH] Explain svn_wc_entry_t's "deleted" flag.

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: Mon, 10 Nov 2008 16:08:38 +0000

On Mon, 2008-11-10 at 10:28 -0500, C. Michael Pilato wrote:
> Julian Foad wrote:
> > * subversion/include/svn_wc.h
> > (svn_wc_entry_t): Explain the "deleted" flag a bit better.
> >
> > [[[
> > Index: subversion/include/svn_wc.h
> > ===================================================================
> > --- subversion/include/svn_wc.h (revision 34116)
> > +++ subversion/include/svn_wc.h (working copy)
> > @@ -1894,7 +1894,9 @@
> > when the entry itself is @c svn_wc_schedule_normal) */
> > svn_boolean_t copied;
> >
> > - /** deleted, but parent rev lags behind */
> > + /** deleted, but parent rev lags behind. Only applicable to a 'this_dir'
> > + * entry. An entry can be 'deleted' and also schedule-add, meaning this
> > + * entry is for a new directory that will replace the old one. */
> > svn_boolean_t deleted;
> >
> > /** absent -- we know an entry of this name exists, but that's all
> > ]]]
> >
> > Is this right?
>
> I ... don't think so. deleted != "scheduled for deletion". I'm not sure
> how to best describe it. Maybe a scenario will help (sorry if the below
> isn't verbatim ... I'm winging it):

Thanks. Greg's saying something similar on IRC right now. I know it's
not schedule-delete. I was intending to make that clear, but clearly
didn't.

> $ svn update dir
> Updated to revision 4.
> $ svn rm dir/some-file
> $ svn ci -m "delete some-file"
> Deleting dir/some-file
> Committed revision 5.
> $
>
> At this point, we have 'dir' at revision 4, and 'dir/some-file' is gone.
> But we need the entries file for 'dir' to list all of dir's children *as of
> revision 4*. So we leave 'some-dir' in that entries list, but mark it with
> this special 'deleted' flag so we know that the record is there only to
> ensure the integrity of the entries list for 'dir'.
>
> Back in the day, we referred to the problems caused by *not* storing these
> special "deleted" records as "ghudson bugs" (after their reporter, not their
> composer).

Trying again:

[[[

/** The directory containing this entry had a versioned child of this
 * name, but this entry represents a different revision or a switched
 * path at which no item exists in the repository. This typically
 * arises from committing or updating to a deletion of this entry
 * without committing or updating the parent directory.
 *
 * The schedule can be 'normal' or 'add'. */
svn_boolean_t deleted;

]]]

Better?

- Julian

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-11-10 17:08:59 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.