Some additional remarks.
(1) It is obvious that there is absolutely *no* need to touch *any*
patch other than the last one for this operation. The last patch is
needed because its effect must be added to pending.
(2) Even if we unrecord patches that are not at the top of the repo, we
only ever have to read patches from the first match up to the top, so we
can do the necessary commutation (or fail).
(3) Even in interactive mode we don't normally need the patch data, just
the meta data, which are stored in the inventory. The only case where we
have to inspect a patch file is when we pass -v or if the user hits 'v',
or if we need to commute patches.
I don't understand this. We do have the tools in place to read the patch
data on demand. PatchInfoAnd goes to great pains to allow the actual
patch data not be be present. But it seems this feature is not used.
(4) When I look at the output of 'darcs unrecord -a --last=1 --debug' I
see a strange artefact, even in the optimized repo with clean tags:
About to gzFetchFilePS from
"/home/ben/src/darcs/hm2/_darcs/inventories/0000153295-4ebfa2bc72876474b0f5a6693570fa6b0a8020022f7d48d752d09f63912911f0"
Caught exception, now attempt creating cache.
About to gzFetchFilePS from
"/home/ben/.cache/darcs/inventories/4e/0000153295-4ebfa2bc72876474b0f5a6693570fa6b0a8020022f7d48d752d09f63912911f0"
Caught exception, now attempt creating cache.
In fetchFileUsingCachePrivate I'm directly grabbing file contents from
/home/ben/src/darcs/hunkmove/_darcs/inventories/0000153295-4ebfa2bc72876474b0f5a6693570fa6b0a8020022f7d48d752d09f63912911f0
In fetchFileUsingCachePrivate I'm directly grabbing file contents from
./_darcs/inventories/0000153295-4ebfa2bc72876474b0f5a6693570fa6b0a8020022f7d48d752d09f63912911f0
No sources from which to fetch file
`0000153295-4ebfa2bc72876474b0f5a6693570fa6b0a8020022f7d48d752d09f63912911f0'
in spite of the fact that
>find -name
0000153295-4ebfa2bc72876474b0f5a6693570fa6b0a8020022f7d48d752d09f63912911f0
./_darcs/inventories/0000153295-4ebfa2bc72876474b0f5a6693570fa6b0a8020022f7d48d752d09f63912911f0
Is this to be expected?
(5) The debug output tells me
Beginning writing inventory...
before all the copyFileUsingCache messages. And then, later on, I get
*all of this again*. So we are not only accessing (or at least
copying/hardlinking) patch files unnecessarily, we do it twice.
|