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

Re: Committing incomplete directories

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: Tue, 25 Oct 2011 11:58:39 +0100 (BST)

Philip Martin wrote:
> Julian Foad writes:
> > Philip Martin wrote:
> >> http://subversion.tigris.org/issues/show_bug.cgi?id=4042
> > [...]  Should we support that in 1.7?  Or should we simply have the
> >> client refuse to commit incomplete nodes.  Most incomplete nodes
> >> occur after an interrupted update, but wc could have incomplete
> >> working nodes resulting from a wc-wc copy.
> >
> > I think we should start refusing to commit changes to or in an
> > incomplete' directory, in order to keep things simple.  I don't see a
> > practical reason why such a commit should be supported, only the
> > eternal desire to keep backward-compatibility.  Back-compat is very
> > important to me in general, but here it appears to me that we have an
> > example of a behaviour which isn't wanted and merely happened to
> > exist.  (I mean the ability to commit a dir while it's marked
> > incomplete' is not important, I don't mean nobody ever finds a use for
> > it.)  Please speak up if I'm wrong about that.
>
> I think it's relatively simple to make 1.7 behave the same
> as 1.6:

I have no objection to you fixing it up in the short term. My point can be considered separately, longer term.

- Julian

> Index: subversion/libsvn_wc/adm_ops.c
> ===================================================================
>    SVN_ERR_ASSERT(status == svn_wc__db_status_normal
> +       || status == svn_wc__db_status_incomplete
>                 || status == svn_wc__db_status_added);
>
> Index: subversion/libsvn_wc/wc_db.c
> ===================================================================
>
> +  old_presence = svn_sqlite__column_token(stmt_info, 3, presence_map);
> +  /* ### other stuff?  */
>
[...]
> -  /* ### other presences? or reserve that for separate functions?  */
> -  new_presence = svn_wc__db_status_normal;
> +  /* Preserve any incomplete status */
> +  new_presence = (old_presence == svn_wc__db_status_incomplete
> +                  ? svn_wc__db_status_incomplete
> +                  : svn_wc__db_status_normal);
Received on 2011-10-25 12:59:16 CEST

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.