[darcs-devel] [patch2135] index refactors
Ganesh Sittampalam
bugs at darcs.net
Sun Mar 21 22:16:01 UTC 2021
Ganesh Sittampalam <ganesh at earth.li> added the comment:
Sorry for the long delay.
> * simplify the logic that handles existence and validity of the index
OK - there are some slightly subtle changes here, but they seem fine:
- In checkIndex, we now rely on indexFormatValid return False
if the file doesn't exst
- The 'invalid' file is just removed unconditionally instead of
tracking its existence
> * add some debug messages (index, patch index)
OK
> * index: update a few comments
OK
> * index: remove unnecessary conversions
OK
> * minor refactor in D.Util.Index.readDir
OK
> * use file IDs from unix-compat
OK (I didn't check every detail)
> * index: make readDir/readFile local to readItem
OK (I assume it's just a code move)
> * index: add progress reports when "reading" (actually updating) the index
OK
> * index: use iPath instead of realPath
OK
> * fix haddocks for D.U.Index.updateItem
OK
> * remove invalidateIndex
> Instead of creating _darcs/index_invalid we now directly call updateIndex
> where necessary. This was already done in finalizeRepositoryChanges (and
> also in the add and move commands) in order to support --look-for-moves
> which requires an up-to-date index. This is now handled uniformly by adding
> a call to updateIndex inside addToPending and addPendingDiffToPending, which
> are the two functions called by commands that modify only the pending patch
> and not any recorded patches and thus do not currently call
> finalizeRepositoryChanges. The UI layer no longer needs to concern itself
> with the index at all (other than passing down the value of the useIndex
> option).
>
> For compatibility we still check if _darcs/index_invalid exists and
> re-create the index in that case.
OK (I have not checked in detail that every path still updates the index
where needed, but your explanation makes sense).
> * D.R.State: build w/o warning with TEST_INDEX=1
OK
__________________________________
Darcs bug tracker <bugs at darcs.net>
<http://bugs.darcs.net/patch2135>
__________________________________
More information about the darcs-devel
mailing list