note current repo when prettifying uuis list
This commit is contained in:
parent
0de3005c64
commit
80fdfdb72b
1 changed files with 9 additions and 5 deletions
14
UUID.hs
14
UUID.hs
|
@ -106,13 +106,17 @@ reposWithoutUUID repos uuids = filterM unmatch repos
|
||||||
{- Pretty-prints a list of UUIDs -}
|
{- Pretty-prints a list of UUIDs -}
|
||||||
prettyPrintUUIDs :: [UUID] -> Annex String
|
prettyPrintUUIDs :: [UUID] -> Annex String
|
||||||
prettyPrintUUIDs uuids = do
|
prettyPrintUUIDs uuids = do
|
||||||
|
g <- Annex.gitRepo
|
||||||
|
here <- getUUID g
|
||||||
m <- uuidMap
|
m <- uuidMap
|
||||||
return $ unwords $ map (\u -> "\t" ++ prettify m u ++ "\n") uuids
|
return $ unwords $ map (\u -> "\t" ++ prettify m u here ++ "\n") uuids
|
||||||
where
|
where
|
||||||
prettify m u =
|
prettify m u here = base ++ ishere
|
||||||
if not $ null $ findlog m u
|
where
|
||||||
then u ++ " -- " ++ findlog m u
|
base = if not $ null $ findlog m u
|
||||||
else u
|
then u ++ " -- " ++ findlog m u
|
||||||
|
else u
|
||||||
|
ishere = if here == u then " <-- here" else ""
|
||||||
findlog m u = M.findWithDefault "" u m
|
findlog m u = M.findWithDefault "" u m
|
||||||
|
|
||||||
{- Records a description for a uuid in the uuidLog. -}
|
{- Records a description for a uuid in the uuidLog. -}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue