add git-annex updatecluster command

Seems to work fine, making the right changes to the git-annex branch.
This commit is contained in:
Joey Hess 2024-06-14 14:21:50 -04:00
parent 2844230dfe
commit bbf261487d
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
13 changed files with 114 additions and 28 deletions

View file

@ -21,7 +21,6 @@ import Types.Cluster
import Logs
import Logs.UUIDBased
import Logs.MapLog
import Annex.UUID
import qualified Data.Set as S
import qualified Data.Map as M
@ -61,10 +60,9 @@ recordCluster clusteruuid nodeuuids = do
nodeuuids
c <- currentVectorClock
u <- getUUID
Annex.Branch.change (Annex.Branch.RegardingUUID [fromClusterUUID clusteruuid]) clusterLog $
(buildLogNew buildClusterNodeList)
. changeLog c u nodeuuids'
. changeLog c (fromClusterUUID clusteruuid) nodeuuids'
. parseClusterLog
buildClusterNodeList :: S.Set ClusterNodeUUID -> Builder

View file

@ -85,5 +85,4 @@ parseProxyList = S.fromList <$> many parseword
-- characters in names, and ensures the name can be used anywhere a usual
-- git remote name can be used without causing issues.
validateProxies :: S.Set Proxy -> S.Set Proxy
validateProxies = S.filter $ \p ->
Git.Remote.makeLegalName (proxyRemoteName p) == proxyRemoteName p
validateProxies = S.filter $ Git.Remote.isLegalName . proxyRemoteName