move dummy uuids to Annex.UUID
This commit is contained in:
parent
8d1e372a8b
commit
7e422269a6
9 changed files with 16 additions and 10 deletions
|
@ -23,6 +23,8 @@ module Annex.UUID (
|
||||||
storeUUID,
|
storeUUID,
|
||||||
storeUUIDIn,
|
storeUUIDIn,
|
||||||
setUUID,
|
setUUID,
|
||||||
|
webUUID,
|
||||||
|
bitTorrentUUID,
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import Common.Annex
|
import Common.Annex
|
||||||
|
@ -98,3 +100,11 @@ setUUID :: Git.Repo -> UUID -> IO Git.Repo
|
||||||
setUUID r u = do
|
setUUID r u = do
|
||||||
let s = show configkey ++ "=" ++ fromUUID u
|
let s = show configkey ++ "=" ++ fromUUID u
|
||||||
Git.Config.store s r
|
Git.Config.store s r
|
||||||
|
|
||||||
|
-- Dummy uuid for the whole web. Do not alter.
|
||||||
|
webUUID :: UUID
|
||||||
|
webUUID = UUID "00000000-0000-0000-0000-000000000001"
|
||||||
|
|
||||||
|
-- Dummy uuid for bittorrent. Do not alter.
|
||||||
|
bitTorrentUUID :: UUID
|
||||||
|
bitTorrentUUID = UUID "00000000-0000-0000-0000-000000000002"
|
||||||
|
|
|
@ -21,6 +21,7 @@ import Logs.Web
|
||||||
import Logs.Presence
|
import Logs.Presence
|
||||||
import Logs.Location
|
import Logs.Location
|
||||||
import Annex.Content
|
import Annex.Content
|
||||||
|
import Annex.UUID
|
||||||
import qualified Backend
|
import qualified Backend
|
||||||
import qualified Types.Backend
|
import qualified Types.Backend
|
||||||
import qualified Types.Key
|
import qualified Types.Key
|
||||||
|
|
|
@ -42,7 +42,6 @@ import Utility.Gpg
|
||||||
import Annex.UUID
|
import Annex.UUID
|
||||||
import Assistant.Ssh
|
import Assistant.Ssh
|
||||||
import Config
|
import Config
|
||||||
import Logs.Web (webUUID)
|
|
||||||
|
|
||||||
import qualified Data.Text as T
|
import qualified Data.Text as T
|
||||||
import qualified Data.Map as M
|
import qualified Data.Map as M
|
||||||
|
|
|
@ -22,6 +22,7 @@ import qualified Backend.URL
|
||||||
import qualified Remote
|
import qualified Remote
|
||||||
import qualified Types.Remote as Remote
|
import qualified Types.Remote as Remote
|
||||||
import Annex.Content
|
import Annex.Content
|
||||||
|
import Annex.UUID
|
||||||
import Logs.Web
|
import Logs.Web
|
||||||
import Types.Key
|
import Types.Key
|
||||||
import Types.KeySource
|
import Types.KeySource
|
||||||
|
|
|
@ -30,6 +30,7 @@ import qualified Utility.Format
|
||||||
import Utility.Tmp
|
import Utility.Tmp
|
||||||
import Command.AddUrl (addUrlFile, downloadRemoteFile, relaxedOption)
|
import Command.AddUrl (addUrlFile, downloadRemoteFile, relaxedOption)
|
||||||
import Annex.Perms
|
import Annex.Perms
|
||||||
|
import Annex.UUID
|
||||||
import Backend.URL (fromUrl)
|
import Backend.URL (fromUrl)
|
||||||
#ifdef WITH_QUVI
|
#ifdef WITH_QUVI
|
||||||
import Annex.Quvi
|
import Annex.Quvi
|
||||||
|
|
|
@ -10,6 +10,7 @@ module Command.RmUrl where
|
||||||
import Common.Annex
|
import Common.Annex
|
||||||
import Command
|
import Command
|
||||||
import Logs.Web
|
import Logs.Web
|
||||||
|
import Annex.UUID
|
||||||
import qualified Remote
|
import qualified Remote
|
||||||
|
|
||||||
cmd :: [Command]
|
cmd :: [Command]
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
|
|
||||||
module Logs.Web (
|
module Logs.Web (
|
||||||
URLString,
|
URLString,
|
||||||
webUUID,
|
|
||||||
getUrls,
|
getUrls,
|
||||||
getUrlsWithPrefix,
|
getUrlsWithPrefix,
|
||||||
setUrlPresent,
|
setUrlPresent,
|
||||||
|
@ -35,10 +34,6 @@ import qualified Git
|
||||||
import qualified Git.LsFiles
|
import qualified Git.LsFiles
|
||||||
import Utility.Url
|
import Utility.Url
|
||||||
|
|
||||||
-- Dummy uuid for the whole web. Do not alter.
|
|
||||||
webUUID :: UUID
|
|
||||||
webUUID = UUID "00000000-0000-0000-0000-000000000001"
|
|
||||||
|
|
||||||
{- Gets all urls that a key might be available from. -}
|
{- Gets all urls that a key might be available from. -}
|
||||||
getUrls :: Key -> Annex [URLString]
|
getUrls :: Key -> Annex [URLString]
|
||||||
getUrls key = do
|
getUrls key = do
|
||||||
|
|
|
@ -23,15 +23,12 @@ import Utility.Metered
|
||||||
import Utility.Tmp
|
import Utility.Tmp
|
||||||
import Backend.URL
|
import Backend.URL
|
||||||
import Annex.Perms
|
import Annex.Perms
|
||||||
|
import Annex.UUID
|
||||||
import qualified Annex.Url as Url
|
import qualified Annex.Url as Url
|
||||||
|
|
||||||
import qualified Data.Map as M
|
import qualified Data.Map as M
|
||||||
import Network.URI
|
import Network.URI
|
||||||
|
|
||||||
-- Dummy uuid for bittorrent. Do not alter.
|
|
||||||
bitTorrentUUID :: UUID
|
|
||||||
bitTorrentUUID = UUID "00000000-0000-0000-0000-000000000002"
|
|
||||||
|
|
||||||
remote :: RemoteType
|
remote :: RemoteType
|
||||||
remote = RemoteType {
|
remote = RemoteType {
|
||||||
typename = "bittorrent",
|
typename = "bittorrent",
|
||||||
|
|
|
@ -16,6 +16,7 @@ import qualified Git.Construct
|
||||||
import Annex.Content
|
import Annex.Content
|
||||||
import Config.Cost
|
import Config.Cost
|
||||||
import Logs.Web
|
import Logs.Web
|
||||||
|
import Annex.UUID
|
||||||
import Types.Key
|
import Types.Key
|
||||||
import Utility.Metered
|
import Utility.Metered
|
||||||
import qualified Annex.Url as Url
|
import qualified Annex.Url as Url
|
||||||
|
|
Loading…
Reference in a new issue