The problem happens when a patch does a succession of the following
primitive changes:
move dir1 to dir2
adddir dir1
In which case, the export stream never says that dir1 should be deleted.
To fix this, we have to add to the primitive patches a function similar
to `listTouchedFiles` but that would give us a list of paths that are
the source of a move.
Observe that this is distinct from the case of patch that does:
deldir dir1
adddir dir1
In fact such a patch cannot be created by darcs because it would be
coalesced. On the other hand, nothing is coalesced when a moved dir is
recreated in the same patch. Then, the code of "convert export"
believes the same directory (and its contents) is keeps being present.
|