umap <- uuidDescMap
trustmap <- trustMapLoad
-
+
ifM (outputJSONMap rs trustmap umap)
( next $ return True
, do
basehostname :: Git.Repo -> String
basehostname r = fromMaybe "" $ headMaybe $ splitc '.' $ hostname r
-{- A name to display for a repo. Uses the name from uuid.log if available,
- - or the remote name if not. -}
+{- A name to display for a repo. Uses the description
+ - from uuid.log if available, or the remote name if not. -}
repoName :: UUIDDescMap -> Git.Repo -> String
repoName umap r
| repouuid == NoUUID = fallback
]
mknode (r, remotes) = JSON.object
- [ "name" .= packString (repoName umap r)
+ [ "description" .= packString (repoName umap r)
, "uuid" .= mkuuid (getUncachedUUID r)
, "url" .= packString (Git.repoLocation r)
, "remotes" .= map mkremote (filterdead id remotes)
]
mkremote r = JSON.object
- [ "name" .= packString (repoName umap r)
+ [ "remote" .= packString (repoName umap r)
, "uuid" .= mkuuid (getUncachedUUID r)
, "url" .= packString (Git.repoLocation r)
]
{
"nodes": [
{
- "name": "joey@darkstar:~/tmp/mapbench/a",
+ "description": "joey@darkstar:~/tmp/mapbench/a",
"remotes": [
{
- "name": "joey@darkstar:~/tmp/mapbench/b",
+ "remote": "b",
"url": "/home/joey/tmp/mapbench/b",
"uuid": "645d92d8-6461-43c1-b23c-6dd04dc3a015"
}
"uuid": "3f34e4c2-dd19-433a-ab04-9fd4be959325"
},
{
- "name": "joey@darkstar:~/tmp/mapbench/b",
+ "description": "joey@darkstar:~/tmp/mapbench/b",
"remotes": [
{
- "name": "joey@darkstar:~/tmp/mapbench/a",
+ "remote": "a",
"url": "/home/joey/tmp/mapbench/a",
"uuid": "3f34e4c2-dd19-433a-ab04-9fd4be959325"
}
"uuid": "645d92d8-6461-43c1-b23c-6dd04dc3a015"
},
{
- "name": "unknown",
+ "description": "unknown",
"remotes": [
{
- "name": "joey@darkstar:~/tmp/mapbench/b",
+ "remote": "b",
"url": "/home/joey/tmp/mapbench/b",
"uuid": "645d92d8-6461-43c1-b23c-6dd04dc3a015"
}