diff options
author | Joey Hess <joey@kitenet.net> | 2011-03-15 21:34:13 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-03-15 21:34:13 -0400 |
commit | 9d49fe2c172b135a1a3735827df014b5f45d99a2 (patch) | |
tree | 32caea71926c1b05d9b1921a16f364f57fc3e62f /Command/DropUnused.hs | |
parent | 675ee89749ba2272d37b763078020b6e5f4cd380 (diff) |
first pass at using new keys
It compiles. It sorta works. Several subcommands are FIXME marked and
broken, because things that used to accept separate --backend and --key
params need to be changed to accept just a --key that encodes all the key
info, now that there is metadata in keys.
Diffstat (limited to 'Command/DropUnused.hs')
-rw-r--r-- | Command/DropUnused.hs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Command/DropUnused.hs b/Command/DropUnused.hs index 594564cb7..8ed61ba65 100644 --- a/Command/DropUnused.hs +++ b/Command/DropUnused.hs @@ -11,6 +11,7 @@ import Control.Monad (when) import Control.Monad.State (liftIO) import qualified Data.Map as M import System.Directory +import Data.Maybe import Command import Types @@ -19,6 +20,7 @@ import Locations import qualified Annex import qualified Command.Drop import Backend +import Key command :: [Command] command = [Command "dropunused" (paramRepeating paramNumber) seek @@ -55,7 +57,6 @@ readUnusedLog = do return $ M.fromList $ map parse $ lines l else return $ M.empty where - parse line = (head ws, tokey $ unwords $ tail ws) + parse line = (head ws, fromJust $ readKey $ unwords $ tail ws) where ws = words line - tokey s = read s :: Key |