diff --git a/Assistant/Alert.hs b/Assistant/Alert.hs index 4e6dab0331..7e47e8396b 100644 --- a/Assistant/Alert.hs +++ b/Assistant/Alert.hs @@ -82,7 +82,7 @@ warningAlert name msg = Alert errorAlert :: String -> AlertButton -> Alert errorAlert msg button = Alert { alertClass = Error - , alertHeader = Just $ tenseWords ["error"] + , alertHeader = Nothing , alertMessageRender = renderData , alertData = [UnTensed $ T.pack msg] , alertCounter = 0 @@ -175,7 +175,7 @@ fsckAlert button n = baseActivityAlert } brokenRepositoryAlert :: AlertButton -> Alert -brokenRepositoryAlert = errorAlert "Your repository needs repairs." +brokenRepositoryAlert = errorAlert "Serious problems have been detected with your repository. This needs your immediate attention!" pairingAlert :: AlertButton -> Alert pairingAlert button = baseActivityAlert diff --git a/Assistant/Threads/Cronner.hs b/Assistant/Threads/Cronner.hs index 786044b200..d0d277d775 100644 --- a/Assistant/Threads/Cronner.hs +++ b/Assistant/Threads/Cronner.hs @@ -192,7 +192,7 @@ runActivity' urlrenderer (ScheduledSelfFsck _ d) = do when (Git.Fsck.foundBroken fsckresults) $ do u <- liftAnnex getUUID liftAnnex $ writeFsckResults u fsckresults - button <- mkAlertButton True (T.pack "Repair") urlrenderer $ + button <- mkAlertButton True (T.pack "Click Here") urlrenderer $ RepairRepositoryR u void $ addAlert $ brokenRepositoryAlert button mapM_ reget =<< liftAnnex (dirKeys gitAnnexBadDir) diff --git a/doc/assistant/brokenrepositoryalert.png b/doc/assistant/brokenrepositoryalert.png new file mode 100644 index 0000000000..ea001aec04 Binary files /dev/null and b/doc/assistant/brokenrepositoryalert.png differ diff --git a/doc/assistant/repairrepository.png b/doc/assistant/repairrepository.png new file mode 100644 index 0000000000..d49ea9d955 Binary files /dev/null and b/doc/assistant/repairrepository.png differ diff --git a/doc/design/assistant/disaster_recovery.mdwn b/doc/design/assistant/disaster_recovery.mdwn index c630a72b47..ef6eb47302 100644 --- a/doc/design/assistant/disaster_recovery.mdwn +++ b/doc/design/assistant/disaster_recovery.mdwn @@ -57,10 +57,14 @@ call it for non-local remotes. ## git fsck -Have the sanity checker run git fsck periodically (it's fairly inexpensive, -but still not too often, and should be ioniced and niced). +Add git fsck to scheduled self fsck **done** -If committing to the repository fails, after resolving any dangling lock +TODO: Add git fsck of local remotes to scheduled remote fscks. + +TODO: Display an alert to nudge user to schedule a fsck, if none is +scheduled. Without being annoying about it. + +TODO: If committing to the repository fails, after resolving any dangling lock files (see above), it should git fsck. If git fsck finds problems, launch git repository repair. diff --git a/templates/control/repairrepository.hamlet b/templates/control/repairrepository.hamlet index 3965d22137..63c8a00d74 100644 --- a/templates/control/repairrepository.hamlet +++ b/templates/control/repairrepository.hamlet @@ -1,6 +1,6 @@