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

Issue 4048 update not marking directories complete

From: Philip Martin <philip.martin_at_wandisco.com>
Date: Thu, 03 Nov 2011 17:06:51 +0000

I'm looking at issue 4048 (with an eye on issue 3993, see end of mail)
http://subversion.tigris.org/issues/show_bug.cgi?id=4048

There is code in 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));
    }

This marks the anchor complete when the editor drive is:

   set_target_revision
   close_edit

and this happens when the server is 1.0.x and the update makes no
changes. The problem is that _end_directory_update asserts that the
directory is incomplete and that is not always true.

Newer servers drive the client:

   set_target_revision
   open_directory
   close_directory
   close_edit

so don't trigger this code.

It's easy enough to fix the assert to handle status normal as well as
incomplete, but I'm not sure that really fixes the problem. The code in
close_edit is old, from before 1.0, but I'm not sure it ever worked. It
seems to me that just making the anchor complete is not enough, if
anything it should be making the whole tree to the depth of the update
complete. If we just complete the anchor then we see things like:

$ svn st wc
! wc
! wc/B
$ svn up wc
At revision 4.
$ svn st wc
! wc/B
$ svn up wc/B
At revision 4.
! wc/B

where the rest of the tree remains incomplete. (I see this with a 1.0
client, a 1.6 client and a 1.7 client that is patched to avoid the
assert.)

I'm tempted to make a quick fix that simply removes the call to
_end_directory_update altogether. This will fix the assert. It will
mean that a "no-op" update will not mark an incomplete anchor complete,
but since it doesn't mark the rest of the tree complete that doesn't
seem like a major regression.

There is a related issue, 3993
http://subversion.tigris.org/issues/show_bug.cgi?id=3993
where a serf bug triggers a similar sort of problem on googlecode
servers. If we were to fix 4048 by marking the whole tree complete it
may make 3993 worse.

-- 
uberSVN: Apache Subversion Made Easy
http://www.uberSVN.com
Received on 2011-11-03 18:07:28 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.