Darcs.Commands.Repair uses the function Darcs.Repository.amInRepository
as a prerequisite. Then the calls are:
Darcs.Repository.amInRepository
Darcs.Repository.maybeIdentifyRepository
check if _darcs exists (doesDirectoryExists)
if ok, check if it can handle _darcs/formats (identifyRepoFormat)
if ok, identify pristine tree
-> Darcs.Repository.Pristine.identifyPristine
if no pristine tree in any format, display: "Pristine tree does
not exist"
Bad solution: remove identifyPristine completely, since commands other
than repair need to use that pristine tree to work!
So I suggest that the prerequisite of "darcs repair" is not
amInRepository, but amInRepairableRepository, which will not make any
pristine tree test, and aim at rebuilding a pristine.hashed tree.
|