reorg
This commit is contained in:
parent
86ffeb73d1
commit
1ca111620d
7 changed files with 7 additions and 42 deletions
|
@ -16,7 +16,7 @@ import CmdLine
|
|||
import Command
|
||||
import Annex.UUID
|
||||
import Annex (setField)
|
||||
import Fields
|
||||
import CmdLine.GitAnnexShell.Fields
|
||||
import Utility.UserInfo
|
||||
import Remote.GCrypt (getGCryptUUID)
|
||||
import qualified Annex
|
||||
|
|
|
@ -17,7 +17,7 @@ import Annex
|
|||
import Utility.Rsync
|
||||
import Logs.Transfer
|
||||
import Command.SendKey (fieldTransfer)
|
||||
import qualified Fields
|
||||
import qualified CmdLine.GitAnnexShell.Fields as Fields
|
||||
import qualified Types.Key
|
||||
import qualified Types.Backend
|
||||
import qualified Backend
|
||||
|
|
|
@ -13,7 +13,7 @@ import Annex.Content
|
|||
import Annex
|
||||
import Utility.Rsync
|
||||
import Logs.Transfer
|
||||
import qualified Fields
|
||||
import qualified CmdLine.GitAnnexShell.Fields as Fields
|
||||
import Utility.Metered
|
||||
|
||||
def :: [Command]
|
||||
|
|
|
@ -12,7 +12,7 @@ import Command
|
|||
import Annex.Content
|
||||
import Logs.Transfer
|
||||
import Types.Key
|
||||
import qualified Fields
|
||||
import qualified CmdLine.GitAnnexShell.Fields as Fields
|
||||
import Utility.Metered
|
||||
|
||||
def :: [Command]
|
||||
|
|
35
Fields.hs
35
Fields.hs
|
@ -1,35 +0,0 @@
|
|||
{- git-annex fields
|
||||
-
|
||||
- Copyright 2012 Joey Hess <joey@kitenet.net>
|
||||
-
|
||||
- Licensed under the GNU GPL version 3 or higher.
|
||||
-}
|
||||
|
||||
module Fields where
|
||||
|
||||
import Common.Annex
|
||||
import qualified Annex
|
||||
|
||||
import Data.Char
|
||||
|
||||
{- A field, stored in Annex state, with a value sanity checker. -}
|
||||
data Field = Field
|
||||
{ fieldName :: String
|
||||
, fieldCheck :: String -> Bool
|
||||
}
|
||||
|
||||
getField :: Field -> Annex (Maybe String)
|
||||
getField = Annex.getField . fieldName
|
||||
|
||||
remoteUUID :: Field
|
||||
remoteUUID = Field "remoteuuid" $
|
||||
-- does it look like a UUID?
|
||||
all (\c -> isAlphaNum c || c == '-')
|
||||
|
||||
associatedFile :: Field
|
||||
associatedFile = Field "associatedfile" $ \f ->
|
||||
-- is the file a safe relative filename?
|
||||
not (isAbsolute f) && not ("../" `isPrefixOf` f)
|
||||
|
||||
direct :: Field
|
||||
direct = Field "direct" $ \f -> f == "1"
|
|
@ -36,7 +36,7 @@ import Config
|
|||
import Config.Cost
|
||||
import Init
|
||||
import Types.Key
|
||||
import qualified Fields
|
||||
import qualified CmdLine.GitAnnexShell.Fields as Fields
|
||||
import Logs.Location
|
||||
import Utility.Metered
|
||||
#ifndef mingw32_HOST_OS
|
||||
|
|
|
@ -12,8 +12,8 @@ import qualified Git
|
|||
import qualified Git.Url
|
||||
import Annex.UUID
|
||||
import Annex.Ssh
|
||||
import Fields (Field, fieldName)
|
||||
import qualified Fields
|
||||
import CmdLine.GitAnnexShell.Fields (Field, fieldName)
|
||||
import qualified CmdLine.GitAnnexShell.Fields as Fields
|
||||
import Types.GitConfig
|
||||
import Types.Key
|
||||
import Remote.Helper.Messages
|
||||
|
|
Loading…
Reference in a new issue