summaryrefslogtreecommitdiff
path: root/Command/Map.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-11-07 14:46:01 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-11-07 15:59:16 -0400
commit63a292324d20832b68c92f784828e55e644481cc (patch)
treef49c7077caf738cd285681421f9c9baa03068c99 /Command/Map.hs
parentb08f7c428b4bc9eabd95596d08594ddd1057a0bf (diff)
add a UUID type
Should have done this a long time ago.
Diffstat (limited to 'Command/Map.hs')
-rw-r--r--Command/Map.hs8
1 files changed, 4 insertions, 4 deletions
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