When we clone a repo lazily and then cut the connection to the parent
repo e.g. by removing _darcs/prefs/sources, then it can happen that a
subsequent 'darcs log -v' fails with the dreaded
Couldn't fetch 0000000739-
0f917f7c6fb861de7ff441d0d6ab413dae1f02a66714cd64c585a0bc12230ecd
in subdir inventories from sources:
.....
Note the fine print here: it says "in subdir inventories". This does
not happen for missing patches, because in that case we catch
exceptions and display the patch as "[this patch is not vailable]" and
move on. But in case of a missing inventory we have no way to proceed.
This reproducably happens if you clone a repo that ends with a tag
using --no-cache --lazy. In this case the clone has *no* files under
_darcs/patches and a single file under _darcs/inventories.
Strictly speaking this is not a bug, given the semantics of lazy
clones. But the UX is not very nice here.
Perhaps we could afford to copy the whole chain of inventories even in
a lazy clone. This will make lazy clones over e.g. http or ssh a
little bit less fast when using --no-cache or when cloning the first
time. However, note that even for a repo with a long history such as
darcs itself, this pulls only 74 inventories with a combined size of
1.4MB.
At least this is a caveat that should be documented.
|