diff options
author | Joey Hess <joey@kitenet.net> | 2011-11-07 14:46:01 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-11-07 15:59:16 -0400 |
commit | 63a292324d20832b68c92f784828e55e644481cc (patch) | |
tree | f49c7077caf738cd285681421f9c9baa03068c99 /Command | |
parent | b08f7c428b4bc9eabd95596d08594ddd1057a0bf (diff) |
add a UUID type
Should have done this a long time ago.
Diffstat (limited to 'Command')
-rw-r--r-- | Command/ConfigList.hs | 2 | ||||
-rw-r--r-- | Command/Map.hs | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/Command/ConfigList.hs b/Command/ConfigList.hs index cbc6e801b..fadcbb843 100644 --- a/Command/ConfigList.hs +++ b/Command/ConfigList.hs @@ -21,5 +21,5 @@ seek = [withNothing start] start :: CommandStart start = do u <- getUUID - liftIO $ putStrLn $ "annex.uuid=" ++ u + liftIO $ putStrLn $ "annex.uuid=" ++ show u stop diff --git a/Command/Map.hs b/Command/Map.hs index 7e61d2e9e..803324e99 100644 --- a/Command/Map.hs +++ b/Command/Map.hs @@ -62,7 +62,7 @@ drawMap rs umap ts = Dot.graph $ repos ++ trusted ++ others others = map (unreachable . uuidnode) $ filter (`notElem` ruuids) (M.keys umap) trusted = map (trustworthy . uuidnode) ts - uuidnode u = Dot.graphNode u $ M.findWithDefault "" u umap + uuidnode u = Dot.graphNode (show u) $ M.findWithDefault "" u umap hostname :: Git.Repo -> String hostname r @@ -76,7 +76,7 @@ basehostname r = head $ split "." $ hostname r - or the remote name if not. -} repoName :: M.Map UUID String -> Git.Repo -> String repoName umap r - | null repouuid = fallback + | repouuid == NoUUID = fallback | otherwise = M.findWithDefault fallback repouuid umap where repouuid = getUncachedUUID r @@ -86,8 +86,8 @@ repoName umap r nodeId :: Git.Repo -> String nodeId r = case getUncachedUUID r of - "" -> Git.repoLocation r - u -> u + NoUUID -> Git.repoLocation r + UUID u -> u {- A node representing a repo. -} node :: M.Map UUID String -> [Git.Repo] -> Git.Repo -> String |