diff options
author | Joey Hess <joey@kitenet.net> | 2011-02-03 18:55:12 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-02-03 19:05:15 -0400 |
commit | 0c7d17ae062c136e549cc9800dae85f3e3793237 (patch) | |
tree | 7452b6ab846e986466a7bd7a0fcbfacb3cd7cbcb /UUID.hs | |
parent | 14bc885de96dd3ec52ab33ec6bbb02974d0a381c (diff) |
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
Diffstat (limited to 'UUID.hs')
-rw-r--r-- | UUID.hs | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -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 |