darcs

Issue 1977 darcs repair complains when there is no pristine.hashed directory

Title darcs repair complains when there is no pristine.hashed directory
Priority bug Status resolved
Milestone Resolved in 2.8.0
Superseder Nosy List dmitry.kurochkin, gh
Assigned To
Topics Hashed, UI

Created on 2010-10-17.12:00:13 by gh, last changed 2010-11-09.16:44:38 by noreply.

Messages
msg12747 (view) Author: gh Date: 2010-10-17.12:00:12
darcs repair complains when there is no pristine.hashed directory, while 
it should just recreate it!
msg12750 (view) Author: gh Date: 2010-10-17.13:05:32
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.
msg12961 (view) Author: noreply Date: 2010-11-09.16:44:37
The following patch sent by Guillaume Hoffmann <guillaumh@gmail.com> updated issue issue1977 with
status=resolved;resolvedin=2.8.0 HEAD

* resolve issue1977 by considering more repositories as being NoPristine 
Ignore-this: 41987c65face6b464951509e4eeda1f2
History
Date User Action Args
2010-10-17 12:00:13ghcreate
2010-10-17 13:05:33ghsetmessages: + msg12750
2010-11-09 16:44:38noreplysetstatus: unknown -> resolved
messages: + msg12961
resolvedin: 2.8.0