summaryrefslogtreecommitdiff
path: root/Annex.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-04-27 13:23:52 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-04-27 13:54:33 -0400
commit76102c1c7541e7b10c3a3fbe242e9856fef955b3 (patch)
treee9c0b61fd1913c59c68dfa9929a860fc61d767bf /Annex.hs
parente0b7012ccc405dedb556b8c940eb66e42304bc73 (diff)
display "Recording state in git..." when staging the journal
A bit tricky to avoid printing it twice in a row when there are queued git commands to run and journal to stage. Added a generic way to run an action that may output multiple side messages, with only the first displayed.
Diffstat (limited to 'Annex.hs')
-rw-r--r--Annex.hs8
1 files changed, 3 insertions, 5 deletions
diff --git a/Annex.hs b/Annex.hs
index 2b58c2bd4..441e460be 100644
--- a/Annex.hs
+++ b/Annex.hs
@@ -10,7 +10,6 @@
module Annex (
Annex,
AnnexState(..),
- OutputType(..),
new,
newState,
run,
@@ -44,6 +43,7 @@ import qualified Types.Remote
import Types.Crypto
import Types.BranchState
import Types.TrustLevel
+import Types.Messages
import Utility.State
import qualified Utility.Matcher
import qualified Data.Map as M
@@ -69,8 +69,6 @@ instance MonadBaseControl IO Annex where
where
unStAnnex (StAnnex st) = st
-data OutputType = NormalOutput | QuietOutput | JSONOutput
-
type Matcher a = Either [Utility.Matcher.Token a] (Utility.Matcher.Matcher a)
-- internal state storage
@@ -78,7 +76,7 @@ data AnnexState = AnnexState
{ repo :: Git.Repo
, backends :: [BackendA Annex]
, remotes :: [Types.Remote.RemoteA Annex]
- , output :: OutputType
+ , output :: MessageState
, force :: Bool
, fast :: Bool
, auto :: Bool
@@ -104,7 +102,7 @@ newState gitrepo = AnnexState
{ repo = gitrepo
, backends = []
, remotes = []
- , output = NormalOutput
+ , output = defaultMessageState
, force = False
, fast = False
, auto = False