diff options
author | 2011-03-15 21:34:13 -0400 | |
---|---|---|
committer | 2011-03-15 21:34:13 -0400 | |
commit | 9d49fe2c172b135a1a3735827df014b5f45d99a2 (patch) | |
tree | 32caea71926c1b05d9b1921a16f364f57fc3e62f /Command.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.hs')
-rw-r--r-- | Command.hs | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/Command.hs b/Command.hs index eba7f2cef..38c63bd77 100644 --- a/Command.hs +++ b/Command.hs @@ -17,11 +17,13 @@ import Data.List import Types import qualified Backend +import qualified BackendTypes import Messages import qualified Annex import qualified GitRepo as Git import Locations import Utility +import Key {- A command runs in four stages. - @@ -233,11 +235,14 @@ cmdlineKey :: Annex Key cmdlineKey = do k <- Annex.getState Annex.defaultkey backends <- Backend.list - return $ genKey (head backends) (keyname' k) + return $ stubKey { + keyName = kname k, + keyBackendName = BackendTypes.name $ head backends + } where - keyname' Nothing = badkey - keyname' (Just "") = badkey - keyname' (Just n) = n + kname Nothing = badkey + kname (Just "") = badkey + kname (Just n) = n badkey = error "please specify the key with --key" {- Given an original list of files, and an expanded list derived from it, |