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

RE: update_editor.c:close_edit setting "un-incomplete"

From: Bert Huijben <bert_at_qqmail.nl>
Date: Wed, 14 Sep 2011 16:21:32 +0200

> -----Original Message-----
> From: Philip Martin [mailto:philip.martin_at_wandisco.com]
> Sent: woensdag 14 september 2011 16:15
> To: dev_at_subversion.apache.org
> Subject: update_editor.c:close_edit setting "un-incomplete"
>
> Looking a issue 3993, a serf/googlecode oddity
> http://subversion.tigris.org/issues/show_bug.cgi?id=3993
> leads me to this code in libsvn_wc/update_editor.c:close_edit
>
> /* The editor didn't even open the root; we have to take care of
> some cleanup stuffs. */
> if (! eb->root_opened
> && *eb->target_basename == '\0')
> {
> /* We need to "un-incomplete" the root directory. */
> SVN_ERR(svn_wc__db_temp_op_end_directory_update(eb->db,
> eb->anchor_abspath,
> scratch_pool));
> }
>
> That's WCNG code, but the concept has been present since 1.0. The
> "un-incomplete" state is presence=normal in WCNG terms.
>
>
> Why do we do that? If we don't call open_root and the directory is
> incomplete then it must have been incomplete before the update started.
> Is it correct for a drive that doesn't call open_root to change such a
> directory to normal? I think leaving the directory incomplete is the
> correct action.

We shouldn't un-incomplete the root directory, because we didn't mark it
complete in the first place.

But when just removing these lines we introduce a new problem:
We will still bump the revisions of all nodes to revisions in which they
don't exist. (At least that is what that example targetting google code
does).

As I have been unable to reproduce this code path I'm thinking that we
should never get here in the first place: the fs api should have reported a
PATH not found much earlier on Google's side.

So this code should probably return an error indicating what went wrong...
(And I have no idea what went wrong, because I can't reproduce it on any
standard ra implementation)

        Bert
Received on 2011-09-14 16:21:56 CEST

This is an archived mail posted to the Subversion Dev mailing list.