new map subcommand, basically working
Still todo: - add repos from uuid.log that were not directly found - group repos into their respective hosts - display inaccessible repos and broken remote connections in red - anonymize the url display somewhat, so the maps can be shared - use uuid info to tell when two apparently different repos are actually the same repo accessed in different ways
This commit is contained in:
parent
14bc885de9
commit
0c7d17ae06
6 changed files with 185 additions and 6 deletions
10
UUID.hs
10
UUID.hs
|
@ -11,13 +11,15 @@
|
|||
module UUID (
|
||||
UUID,
|
||||
getUUID,
|
||||
getUncachedUUID,
|
||||
prepUUID,
|
||||
genUUID,
|
||||
reposByUUID,
|
||||
reposWithoutUUID,
|
||||
prettyPrintUUIDs,
|
||||
describeUUID,
|
||||
uuidLog
|
||||
uuidLog,
|
||||
uuidMap
|
||||
) where
|
||||
|
||||
import Control.Monad.State
|
||||
|
@ -60,7 +62,7 @@ getUUID r = do
|
|||
g <- Annex.gitRepo
|
||||
|
||||
let c = cached g
|
||||
let u = uncached
|
||||
let u = getUncachedUUID r
|
||||
|
||||
if c /= u && u /= ""
|
||||
then do
|
||||
|
@ -68,11 +70,13 @@ getUUID r = do
|
|||
return u
|
||||
else return c
|
||||
where
|
||||
uncached = Git.configGet r "annex.uuid" ""
|
||||
cached g = Git.configGet g cachekey ""
|
||||
updatecache g u = when (g /= r) $ Annex.setConfig cachekey u
|
||||
cachekey = "remote." ++ Git.repoRemoteName r ++ ".annex-uuid"
|
||||
|
||||
getUncachedUUID :: Git.Repo -> UUID
|
||||
getUncachedUUID r = Git.configGet r "annex.uuid" ""
|
||||
|
||||
{- Make sure that the repo has an annex.uuid setting. -}
|
||||
prepUUID :: Annex ()
|
||||
prepUUID = do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue