git-annex/Assistant
Joey Hess 780367200b
remove dead nodes when loading the cluster log
This is to avoid inserting a cluster uuid into the location log when
only dead nodes in the cluster contain the content of a key.

One reason why this is necessary is Remote.keyLocations, which excludes
dead repositories from the list. But there are probably many more.

Implementing this was challenging, because Logs.Location importing
Logs.Cluster which imports Logs.Trust which imports Remote.List resulted
in an import cycle through several other modules.

Resorted to making Logs.Location not import Logs.Cluster, and instead
it assumes that Annex.clusters gets populated when necessary before it's
called.

That's done in Annex.Startup, which is run by the git-annex command
(but not other commands) at early startup in initialized repos. Or,
is run after initialization.

Note that is Remote.Git, it is unable to import Annex.Startup, because
Remote.Git importing Logs.Cluster leads the the same import cycle.
So ensureInitialized is not passed annexStartup in there.

Other commands, like git-annex-shell currently don't run annexStartup
either.

So there are cases where Logs.Location will not see clusters. So it won't add
any cluster UUIDs when loading the log. That's ok, the only reason to do
that is to make display of where objects are located include clusters,
and to make commands like git-annex get --from treat keys as being located
in a cluster. git-annex-shell certainly does not do anything like that,
and I'm pretty sure Remote.Git (and callers to Remote.Git.onLocalRepo)
don't either.
2024-06-16 14:39:44 -04:00
..
Alert Apply codespell -w throughout 2023-03-17 15:14:58 -04:00
Install fix build on OSX 2023-03-03 13:20:49 -04:00
Pairing filter out control characters in error messages 2023-04-10 13:50:51 -04:00
Threads A few more of typo fixes/skip as detected with bleeding edge codespell 2024-05-01 20:06:08 -04:00
Types Apply codespell -w throughout 2023-03-17 15:14:58 -04:00
WebApp assistant: When generating a gpg secret key, avoid hardcoding the key algorithm and size 2024-01-09 15:31:53 -04:00
Alert.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
BranchChange.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Changes.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Commits.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Common.hs use fastDebug everywhere it can be used 2021-04-06 15:41:24 -04:00
CredPairCache.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
DaemonStatus.hs sync with special remotes with an annex:: url 2024-05-24 14:57:29 -04:00
DeleteRemote.hs filter out control characters in error messages 2023-04-10 13:50:51 -04:00
Drop.hs add SeekInput (not yet used) 2020-09-15 15:41:13 -04:00
Fsck.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Gpg.hs be stricter about rejecting invalid configurations for remotes 2020-01-10 14:52:48 -04:00
Install.hs Windows: Support long filenames in more (possibly all) of the code 2023-03-01 15:55:58 -04:00
MakeRemote.hs filter out control characters in error messages 2023-04-10 13:50:51 -04:00
MakeRepo.hs remove dead nodes when loading the cluster log 2024-06-16 14:39:44 -04:00
Monad.hs turn of PackageImports in cabal file 2022-02-25 13:16:36 -04:00
NamedThread.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Pairing.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Pushes.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
RemoteControl.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Repair.hs fix empty tree import when directory does not exist 2023-08-15 12:57:41 -04:00
RepoProblem.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Restart.hs split out Utility.Url.Parse 2023-08-14 12:28:10 -04:00
ScanRemotes.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Ssh.hs filter out control characters in error messages 2023-04-10 13:50:51 -04:00
Sync.hs convert checkAvailable to use availability rather than localpath 2023-08-16 15:57:30 -04:00
TransferQueue.hs fix --from overriding annex-ignore 2023-11-30 15:12:07 -04:00
TransferSlots.hs add directional stalldetection and bwlimit configs 2024-01-19 15:27:53 -04:00
Unused.hs Apply codespell -w throughout 2023-03-17 15:14:58 -04:00
Upgrade.hs remove Logs.Presence imports 2024-06-14 17:27:34 -04:00
WebApp.hs unified AuthToken type between webapp and tor 2016-11-22 14:18:34 -04:00