map: Combine duplicate repositories, for a nicer looking map.
This commit is contained in:
parent
db2fe522ba
commit
6314be1e3c
2 changed files with 11 additions and 2 deletions
|
@ -35,7 +35,7 @@ seek = [withNothing start]
|
|||
|
||||
start :: CommandStart
|
||||
start = do
|
||||
rs <- spider =<< gitRepo
|
||||
rs <- combineSame <$> (spider =<< gitRepo)
|
||||
|
||||
umap <- uuidMap
|
||||
trusted <- trustGet Trusted
|
||||
|
@ -77,7 +77,7 @@ hostname r
|
|||
| otherwise = "localhost"
|
||||
|
||||
basehostname :: Git.Repo -> String
|
||||
basehostname r = Prelude.head $ split "." $ hostname r
|
||||
basehostname r = fromMaybe "" $ headMaybe $ split "." $ hostname r
|
||||
|
||||
{- A name to display for a repo. Uses the name from uuid.log if available,
|
||||
- or the remote name if not. -}
|
||||
|
@ -236,3 +236,11 @@ tryScan r
|
|||
sshnote = do
|
||||
showAction "sshing"
|
||||
showOutput
|
||||
|
||||
{- Spidering can find multiple paths to the same repo, so this is used
|
||||
- to combine (really remove) duplicate repos with the same UUID. -}
|
||||
combineSame :: [Git.Repo] -> [Git.Repo]
|
||||
combineSame = map snd . nubBy sameuuid . map pair
|
||||
where
|
||||
sameuuid (u1, _) (u2, _) = u1 == u2 && u1 /= NoUUID
|
||||
pair r = (getUncachedUUID r, r)
|
||||
|
|
1
debian/changelog
vendored
1
debian/changelog
vendored
|
@ -14,6 +14,7 @@ git-annex (4.20130315) UNRELEASED; urgency=low
|
|||
* xmpp: Re-enable XA flag, since disabling it did not turn out to help
|
||||
with the problems Google Talk has with not always sending presence
|
||||
messages to clients.
|
||||
* map: Combine duplicate repositories, for a nicer looking map.
|
||||
|
||||
-- Joey Hess <joeyh@debian.org> Fri, 15 Mar 2013 00:10:07 -0400
|
||||
|
||||
|
|
Loading…
Reference in a new issue