add web special remote
Generalized LocationLog to PresenceLog, and use a presence log to record urls for the web special remote.
This commit is contained in:
parent
ceb887d826
commit
cdbcd6f495
17 changed files with 272 additions and 139 deletions
16
UUID.hs
16
UUID.hs
|
@ -17,7 +17,6 @@ module UUID (
|
|||
getUncachedUUID,
|
||||
prepUUID,
|
||||
genUUID,
|
||||
prettyPrintUUIDs,
|
||||
describeUUID,
|
||||
uuidMap,
|
||||
uuidLog
|
||||
|
@ -86,21 +85,6 @@ prepUUID = do
|
|||
uuid <- liftIO $ genUUID
|
||||
setConfig configkey uuid
|
||||
|
||||
{- Pretty-prints a list of UUIDs -}
|
||||
prettyPrintUUIDs :: [UUID] -> Annex String
|
||||
prettyPrintUUIDs uuids = do
|
||||
here <- getUUID =<< Annex.gitRepo
|
||||
m <- uuidMap
|
||||
return $ unwords $ map (\u -> "\t" ++ prettify m u here ++ "\n") uuids
|
||||
where
|
||||
prettify m u here = base ++ ishere
|
||||
where
|
||||
base = if not $ null $ findlog m u
|
||||
then u ++ " -- " ++ findlog m u
|
||||
else u
|
||||
ishere = if here == u then " <-- here" else ""
|
||||
findlog m u = M.findWithDefault "" u m
|
||||
|
||||
{- Records a description for a uuid in the uuidLog. -}
|
||||
describeUUID :: UUID -> String -> Annex ()
|
||||
describeUUID uuid desc = do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue