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

Re: Is this a bug in the incomplete=true handling?

From: Ben Collins-Sussman <sussman_at_collab.net>
Date: 2003-08-22 16:30:20 CEST

Philip Martin <philip@codematters.co.uk> writes:

> Now run "svn co file://`pwd`/repo wc" under gdb and set a breakpoint
> on svn_wc__run_log. When the breakpoint is reached delete the file
> wc/foo/.svn/.svn/tmp/text-base/bar.svn-base and continue. This
> results in a failed checkout, with a locked working copy and a log
> file that won't run due to a missing file. It appears to be Steve's
> original problem, although quite how the file got deleted is a
> mystery.

Ok, I follow you so far.

> The way I would expect to recover is to "rm -rf wc/foo" and then
> update, but that doesn't work.

Ah, yes, sure.

> The working copy reporter doesn't appear to handle missing
> directories in an incomplete working copy. Looking at
> libsvn_wc/adm_crawler.c:report_revisions:309 I see that the path foo
> is correctly identified as missing, but because the
> report_everything flag is set the reporter->delete_path call is not
> made and an attempt is made to access the missing working copy.

The 'report_everything' flag is exactly what should be happening --
it's the "low confidence" reporting mode that an 'incomplete' flag
should trigger.

> Is this a bug in the incomplete=true handling, or this scenario just
> not supposed to happen?

Well, it sounds like you're experiencing a bug, but the part you
describe above is normal.

Here's what *should* happen:

  * 'incomplete' flag on wc dir should cause adm_crawler to run with
    'report_everything' flag.

  * The first reporter command sent should be a set_path() call with
    the 'start empty' argument set.

  * wc has no other entries to list via set_path, so we call
    finish_report().

  * the server should now have a transaction that models the wc
    correctly -- just an empty dir -- and thus know to send back the
    missing directory.

Ahhhhh.... *now* I bet I can predict the bug.

You're in a situation where wc -does- contain the entry for foo, but
foo is missing on disk. Our 'low confidence' report logic falls down
here. You're right, Philip... one step ahead of me. If the entry
exists in the parent, but is missing from disk, we need to *not* tell
the server about it in a low-confidence report.

But now I worry what will happen if the server then tries to resend
the directory, but the entry for it already exists in the
parent... will that break?

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Aug 22 16:35:25 2003

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.