From 2e9f128dea0c3206af85f8edac39c5a2fb0f259f Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 29 Oct 2018 23:13:36 -0400 Subject: [PATCH] moved module and relicensed --- Annex/VectorClock.hs | 2 +- Assistant/DaemonStatus.hs | 2 +- Command/Fsck.hs | 2 +- Logs/MetaData.hs | 2 +- Logs/Transfer.hs | 2 +- Logs/Unused.hs | 2 +- Utility/PartialPrelude.hs | 5 +++-- {Logs => Utility}/TimeStamp.hs | 6 +++--- git-annex.cabal | 2 +- 9 files changed, 13 insertions(+), 12 deletions(-) rename {Logs => Utility}/TimeStamp.hs (88%) diff --git a/Annex/VectorClock.hs b/Annex/VectorClock.hs index c7f6d6336d..951145ca14 100644 --- a/Annex/VectorClock.hs +++ b/Annex/VectorClock.hs @@ -15,7 +15,7 @@ import Control.Applicative import Prelude import Utility.Env -import Logs.TimeStamp +import Utility.TimeStamp import Utility.QuickCheck -- | Some very old logs did not have any time stamp at all; diff --git a/Assistant/DaemonStatus.hs b/Assistant/DaemonStatus.hs index 2f1df5725a..6576a32b6a 100644 --- a/Assistant/DaemonStatus.hs +++ b/Assistant/DaemonStatus.hs @@ -16,7 +16,7 @@ import Utility.NotificationBroadcaster import Types.Transfer import Logs.Transfer import Logs.Trust -import Logs.TimeStamp +import Utility.TimeStamp import qualified Remote import qualified Types.Remote as Remote import Config.DynamicConfig diff --git a/Command/Fsck.hs b/Command/Fsck.hs index 6608b71502..f51bda5eb1 100644 --- a/Command/Fsck.hs +++ b/Command/Fsck.hs @@ -22,7 +22,7 @@ import Annex.Link import Logs.Location import Logs.Trust import Logs.Activity -import Logs.TimeStamp +import Utility.TimeStamp import Logs.PreferredContent import Annex.NumCopies import Annex.UUID diff --git a/Logs/MetaData.hs b/Logs/MetaData.hs index 09e429cd23..890c071458 100644 --- a/Logs/MetaData.hs +++ b/Logs/MetaData.hs @@ -40,7 +40,7 @@ import Annex.VectorClock import qualified Annex.Branch import qualified Annex import Logs -import Logs.TimeStamp +import Utility.TimeStamp import Logs.MetaData.Pure import qualified Data.Set as S diff --git a/Logs/Transfer.hs b/Logs/Transfer.hs index aebb249fd4..6cff8b9c4c 100644 --- a/Logs/Transfer.hs +++ b/Logs/Transfer.hs @@ -18,7 +18,7 @@ import Utility.Metered import Utility.Percentage import Utility.PID import Annex.LockPool -import Logs.TimeStamp +import Utility.TimeStamp import Logs.File import Data.Time.Clock diff --git a/Logs/Unused.hs b/Logs/Unused.hs index d76d19a564..ebf968f8c2 100644 --- a/Logs/Unused.hs +++ b/Logs/Unused.hs @@ -33,7 +33,7 @@ import Data.Time import Annex.Common import qualified Annex -import Logs.TimeStamp +import Utility.TimeStamp import Logs.File -- everything that is stored in the unused log diff --git a/Utility/PartialPrelude.hs b/Utility/PartialPrelude.hs index 5dbddad683..85f80534ca 100644 --- a/Utility/PartialPrelude.hs +++ b/Utility/PartialPrelude.hs @@ -38,8 +38,9 @@ last = Prelude.last {- Attempts to read a value from a String. - - - Unlike Text.Read.readMaybe, this ignores leading/trailing whitespace, - - and throws away any trailing text after the part that can be read. + - Unlike Text.Read.readMaybe, this ignores some trailing text + - after the part that can be read. However, if the trailing text looks + - like another readable value, it fails. -} readish :: Read a => String -> Maybe a readish s = case reads s of diff --git a/Logs/TimeStamp.hs b/Utility/TimeStamp.hs similarity index 88% rename from Logs/TimeStamp.hs rename to Utility/TimeStamp.hs index a07b6a66da..0514529c24 100644 --- a/Logs/TimeStamp.hs +++ b/Utility/TimeStamp.hs @@ -1,13 +1,13 @@ -{- log timestamp parsing +{- timestamp parsing and formatting - - Copyright 2015-2016 Joey Hess - - - Licensed under the GNU GPL version 3 or higher. + - License: BSD-2-clause -} {-# LANGUAGE CPP #-} -module Logs.TimeStamp where +module Utility.TimeStamp where import Utility.PartialPrelude import Utility.Misc diff --git a/git-annex.cabal b/git-annex.cabal index 1d56b1e357..52144af5fd 100644 --- a/git-annex.cabal +++ b/git-annex.cabal @@ -879,7 +879,6 @@ Executable git-annex Logs.SingleValue Logs.SingleValue.Pure Logs.Smudge - Logs.TimeStamp Logs.Transfer Logs.Transitions Logs.Trust @@ -1062,6 +1061,7 @@ Executable git-annex Utility.SshHost Utility.Su Utility.SystemDirectory + Utility.TimeStamp Utility.TList Utility.Tense Utility.ThreadLock