Comment 20 for bug 343218

Revision history for this message
John A Meinel (jameinel) wrote : Re: [Bug 343218] Re: Export with lightweight checkouts takes a lot of time

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Martin Pool wrote:
> 2009/12/16 John A Meinel <email address hidden>:
>> A lightweight checkout doesn't have any history locally, so it has to. I
>> suppose one option would be to have export see what files are locally
>> modified, and use the wt for unchanged files, and fall back to the
>> repository for the rest. That would complicate the code a fair amount,
>> though.
>
> If we do this, I'd suggest not putting it into export, but rather into
> the DirstateRevisionTree (or whatever it's called). Some care may be
> needed to make sure there is no race between checking the file is
> unmodified and actually reading it. But it's possible.
>

Sure, something like:

1) Check the hashcache to see if there is a chance we are up-to-date
2) Read the contents, hold them in memory, compute the sha hash
3) If everything matched, return the text, else read from upstream.

John
=:->

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkspAIsACgkQJdeBCYSNAAPXvACfTiFkiHWtRCVvPbmrJj6ZIdTD
ha8An1QZgTxGjy19y59jnWwV60sz+ZFV
=cfpA
-----END PGP SIGNATURE-----