Eric Kow <[email protected]> writes:
> -------------------------------------------------------------
> Import relevant bits of gorsvet, for now under Darcs.Gorsvet.
> -------------------------------------------------------------
>> > +                   hashed-storage
>
> I see you have put hashed-storage on hackage (thanks!).  Is it safe for
> build slave owners to rely on hashed-storage 0.2 for this current patch
> bundle?
I have? I can't recall doing that. : - ) And my cabal-install says it's not
available from server. But I certainly will, no problem with that.

> Please remember to version this before we release darcs.
Aye.

> ----------------------------------------------------------------------------
> Invalidate index at key positions in relevant (pristine-modifying) commands.
> ----------------------------------------------------------------------------
> TODO (still)
>
> This adds calls to Darcs.Gorsvet.invalidateIndex in strategic places.
>
> Darcs.Gorsvet.invalidateIndex creates a file called 'index_invalid', the
> presence of which presumably is used by hashed-storage to indicate that
> the index is invalid... (which means...)
>
>> invalidateIndex _ = do
>>   BS.writeFile "_darcs/index_invalid" BS.empty
>
> Applying this would be harmless as far as backward compatibility is
> concerned, but it would be a good idea to verify that the places really
> are the right ones, and ideally if that we haven't missed any. 
Yes, I'll double-check that. Basically, the places are:
- before pristine content changes
- before pending changes

I will look around in the library, whether there's a more suitable place than
in the commands themselves (but I'm a little worried that one of the commands
will bypass the canonical code path, since this happens relatively often in
darcs).

> -------------------------------------------------------------------------
> Use index for diffing in the basic whatsnew scenario.
> Pass options to unrecordedChanges and handle LookForAdds and IgnoreTimes.
> -------------------------------------------------------------------------
> TODO: the job here is to see what Darcs.Gorsvet.unrecordedChanges does
> at a high level.

Just to give an overview, unrecordedChanges is a version of get_unrecorded*
(there are many variants in Darcs.Repository.Internal). It completely bypasses
unsafeDiff (from Darcs.Diff) and SlurpDirectory, using hashed-storage and new
diffing code instead. The darcs-specific part of the diff implementation
resides in treeDiff in Darcs.Gorsvet, the more generic diffTrees lives in
Storage.Hashed.Tree (I admit the naming is confusing).

See also:
http://repos.mornfall.net/hashed-storage/dist/doc/html/hashed-storage/Storage-Hashed-Tree.html#v%253AdiffTrees
(observe the Source links in the generated documentation).

Yours,
   Petr.

-- 
Peter Rockai | me()mornfall!net | prockai()redhat!com
 http://blog.mornfall.net | http://web.mornfall.net

"In My Egotistical Opinion, most people's C programs should be
 indented six feet downward and covered with dirt."
     -- Blair P. Houghton on the subject of C program indentation
_______________________________________________
darcs-users mailing list
[email protected]
http://lists.osuosl.org/mailman/listinfo/darcs-users

Reply via email to