arrange for regional output manager to run when -J is enabled
Commands that want to use it have to run their seek action inside allowConcurrentOutput. Which seems reasonable; perhaps some future command will want to support the -J flag but not use regions. The region state moved from Annex to MessageState. This makes sense organizationally, and note that some uses of onLocal use a different Annex state, but pass the MessageState into it, which is what is needed.
This commit is contained in:
parent
a4dd8503b8
commit
c0c595345c
12 changed files with 58 additions and 50 deletions
|
@ -37,7 +37,7 @@ optParser desc = GetOptions
|
|||
<*> optional (parseKeyOptions True)
|
||||
|
||||
seek :: GetOptions -> CommandSeek
|
||||
seek o = do
|
||||
seek o = allowConcurrentOutput $ do
|
||||
from <- maybe (pure Nothing) (Just <$$> getParsed) (getFrom o)
|
||||
withKeyOptions (keyOptions o) (autoMode o)
|
||||
(startKeys from)
|
||||
|
|
|
@ -41,10 +41,11 @@ instance DeferredParseClass MirrorOptions where
|
|||
<*> pure (keyOptions v)
|
||||
|
||||
seek :: MirrorOptions -> CommandSeek
|
||||
seek o = withKeyOptions (keyOptions o) False
|
||||
(startKey o Nothing)
|
||||
(withFilesInGit $ whenAnnexed $ start o)
|
||||
(mirrorFiles o)
|
||||
seek o = allowConcurrentOutput $
|
||||
withKeyOptions (keyOptions o) False
|
||||
(startKey o Nothing)
|
||||
(withFilesInGit $ whenAnnexed $ start o)
|
||||
(mirrorFiles o)
|
||||
|
||||
start :: MirrorOptions -> FilePath -> Key -> CommandStart
|
||||
start o file = startKey o (Just file)
|
||||
|
|
|
@ -45,10 +45,11 @@ instance DeferredParseClass MoveOptions where
|
|||
<*> pure (keyOptions v)
|
||||
|
||||
seek :: MoveOptions -> CommandSeek
|
||||
seek o = withKeyOptions (keyOptions o) False
|
||||
(startKey o True)
|
||||
(withFilesInGit $ whenAnnexed $ start o True)
|
||||
(moveFiles o)
|
||||
seek o = allowConcurrentOutput $
|
||||
withKeyOptions (keyOptions o) False
|
||||
(startKey o True)
|
||||
(withFilesInGit $ whenAnnexed $ start o True)
|
||||
(moveFiles o)
|
||||
|
||||
start :: MoveOptions -> Bool -> FilePath -> Key -> CommandStart
|
||||
start o move = start' o move . Just
|
||||
|
|
|
@ -93,7 +93,7 @@ optParser desc = SyncOptions
|
|||
<*> optional parseAllOption
|
||||
|
||||
seek :: SyncOptions -> CommandSeek
|
||||
seek o = do
|
||||
seek o = allowConcurrentOutput $ do
|
||||
prepMerge
|
||||
|
||||
-- There may not be a branch checked out until after the commit,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue