Sigh.
Really, if it was that easy, it would have been fixed a while ago.
Welcome to libsvn_wc.
Also take particular notice of process_committed_leaf(). It falls into
this same mess. It is able to "guess" the filename/checksum, but it
*does* have to derive it. There is no solid dataflow from delta
transmission to final installation.
I changed process_committed_leaf() a while back to figure out the
checksum, and it *can* do that (that's what the SVN_DEBUG section
finally proves). Because it has a checksum there, it also means that
the delta transmission could install a pristine, and
process_committed_leaf can reference it out of the storage.
You may also notice the API gap between transmit and the commit
finalization. Remember when I said the transmit_text_delta function is
bogus and should go? This is part of the reason why. The dataflow and
*assumptions* made are ridiculous, creating offhand dependencies
across the codebase.
The simplest answer here is: study the use of text_base_path() across
the codebase before trying to change it. I did this long ago and hit
the wall of "easy" changes. You're in the hard-to-fix area, so changes
need to be made with *very* particular care.
-g
On Fri, Mar 5, 2010 at 10:22, Julian Foad <julian.foad_at_wandisco.com> wrote:
> I (Julian Foad) wrote:
> [...]
>> I've converted svn_wc__open_writable_base() to use a generic temp dir
>> and unique file name, rather than a WC-1-specific path, and made all
>> three places use it for their WC-1 temp base file, it all still works.
>>
>> OK, that bit works. That's a bit neater. Committed in r919413.
>
> A problem:
>
> In doing this, I made the temporary text-bases live at arbitrary paths
> rather than the special paths where they lived before.
>
> There is still one code path that looks on disk at the special text-base
> temp path, to see if there is a file there. After this change, there
> probably won't ever be. The code path is in
> workqueue.c:install_committed_file() - see it calling
> svn_wc__text_base_path(..., tmp=TRUE, ...) to find the special path.
>
> There is still one code path that *puts* a file at that special place.
> It is adm_crawler.c:svn_wc__internal_transmit_text_deltas().
>
> I'm looking to see whether this is a real problem. It's remotely
> possible that the two remaining code paths (above) always go together
> and thus no problem, but that's unlikely. As the code paths are a little
> hard to follow, I may just end up assuming that there is a problem, and
> go on to fix it.
>
> My first thought on how to solve it is to somehow communicate the info
> that install_committed_file() needs in another way.
>
> (And, for completeness, change svn_wc__internal_transmit_text_deltas()
> to use an arbitrary path, and delete the "tmp=TRUE" option of
> svn_wc__text_base_path().)
>
> - Julian
>
>
>
Received on 2010-03-05 18:15:55 CET