add copy count

This commit is contained in:
Joey Hess 2011-03-05 17:41:36 -04:00
parent 80fdfdb72b
commit ef92bd2b0b

View file

@ -12,7 +12,6 @@ import Control.Monad.State (liftIO)
import qualified Annex import qualified Annex
import LocationLog import LocationLog
import Command import Command
import Content
import Messages import Messages
import UUID import UUID
import Types import Types
@ -33,9 +32,15 @@ perform :: Key -> CommandPerform
perform key = do perform key = do
g <- Annex.gitRepo g <- Annex.gitRepo
uuids <- liftIO $ keyLocations g key uuids <- liftIO $ keyLocations g key
let num = length uuids
showNote $ show num ++ " " ++ copiesplural num
if null $ uuids
then return Nothing
else do
pp <- prettyPrintUUIDs uuids pp <- prettyPrintUUIDs uuids
showLongNote $ pp showLongNote $ pp
showProgress showProgress
if null $ uuids return $ Just $ return True
then return Nothing where
else return $ Just $ return True copiesplural 1 = "copy"
copiesplural _ = "copies"