2016-08-03 16:37:12 +00:00
|
|
|
{- items that a command can act on
|
|
|
|
-
|
git style filename quoting controlled by core.quotePath
This is by no means complete, but escaping filenames in actionItemDesc does
cover most commands.
Note that for ActionItemBranchFilePath, the value is branch:file, and I
choose to only quote the file part (if necessary). I considered quoting the
whole thing. But, branch names cannot contain control characters, and while
they can contain unicode, git coes not quote unicode when displaying branch
names. So, it would be surprising for git-annex to quote unicode in a
branch name.
The find command is the most obvious command that still needs to be
dealt with. There are probably other places that filenames also get
displayed, eg embedded in error messages.
Some other commands use ActionItemOther with a filename, I think that
ActionItemOther should either be pre-sanitized, or should explicitly not
be used for filenames, so that needs more work.
When --json is used, unicode does not get escaped, but control
characters were already escaped in json.
(Key escaping may turn out to be needed, but I'm ignoring that for now.)
Sponsored-by: unqueued on Patreon
2023-04-08 18:20:02 +00:00
|
|
|
- Copyright 2016-2023 Joey Hess <id@joeyh.name>
|
2016-08-03 16:37:12 +00:00
|
|
|
-
|
2019-03-13 19:48:14 +00:00
|
|
|
- Licensed under the GNU AGPL version 3 or higher.
|
2016-08-03 16:37:12 +00:00
|
|
|
-}
|
|
|
|
|
|
|
|
{-# LANGUAGE TypeSynonymInstances, FlexibleInstances #-}
|
|
|
|
|
2023-04-08 19:48:32 +00:00
|
|
|
module Types.ActionItem (
|
|
|
|
module Types.ActionItem,
|
2023-04-10 21:03:41 +00:00
|
|
|
StringContainingQuotedPath(..),
|
2023-04-08 19:48:32 +00:00
|
|
|
) where
|
2016-08-03 16:37:12 +00:00
|
|
|
|
2017-02-24 17:42:30 +00:00
|
|
|
import Key
|
2016-08-03 16:37:12 +00:00
|
|
|
import Types.Transfer
|
expire, trust et al, dead, describe: Support --json and --json-error-messages
For expire, the normal output is unchanged, but the --json output includes the uuid
in machine parseable form. Which could be very useful for this somewhat obscure
command. That needed ActionItemUUID to be implemented, which seemed like a lot
of work, but then ---
I had been going to skip implementing them for trust, untrust, dead, semitrust,
and describe, but putting the uuid in the json is useful information, it tells
what uuid git-annex picked given the input. It was not hard to support
these once ActionItemUUID was implemented.
Sponsored-By: the NIH-funded NICEMAN (ReproNim TR&D3) project
2023-05-05 19:29:49 +00:00
|
|
|
import Types.UUID
|
2023-07-26 18:34:21 +00:00
|
|
|
import Types.FileMatcher
|
2016-08-03 16:37:12 +00:00
|
|
|
import Git.FilePath
|
2023-04-12 21:18:29 +00:00
|
|
|
import Git.Quote (StringContainingQuotedPath(..))
|
2019-11-26 19:27:22 +00:00
|
|
|
import Utility.FileSystemEncoding
|
2016-08-03 16:37:12 +00:00
|
|
|
|
|
|
|
data ActionItem
|
2019-06-06 16:53:24 +00:00
|
|
|
= ActionItemAssociatedFile AssociatedFile Key
|
|
|
|
| ActionItemKey Key
|
|
|
|
| ActionItemBranchFilePath BranchFilePath Key
|
2016-08-03 16:37:12 +00:00
|
|
|
| ActionItemFailedTransfer Transfer TransferInfo
|
2021-03-12 18:09:19 +00:00
|
|
|
| ActionItemTreeFile RawFilePath
|
expire, trust et al, dead, describe: Support --json and --json-error-messages
For expire, the normal output is unchanged, but the --json output includes the uuid
in machine parseable form. Which could be very useful for this somewhat obscure
command. That needed ActionItemUUID to be implemented, which seemed like a lot
of work, but then ---
I had been going to skip implementing them for trust, untrust, dead, semitrust,
and describe, but putting the uuid in the json is useful information, it tells
what uuid git-annex picked given the input. It was not hard to support
these once ActionItemUUID was implemented.
Sponsored-By: the NIH-funded NICEMAN (ReproNim TR&D3) project
2023-05-05 19:29:49 +00:00
|
|
|
| ActionItemUUID UUID StringContainingQuotedPath
|
|
|
|
-- ^ UUID with a description or name of the repository
|
2023-04-10 21:03:41 +00:00
|
|
|
| ActionItemOther (Maybe StringContainingQuotedPath)
|
finish CommandStart transition
The hoped for optimisation of CommandStart with -J did not materialize.
In fact, not runnign CommandStart in parallel is slower than -J3.
So, CommandStart are still run in parallel.
(The actual bad performance I've been seeing with -J in my big repo
has to do with building the remoteList.)
But, this is still progress toward making -J faster, because it gets rid
of the onlyActionOn roadblock in the way of making CommandCleanup jobs
run separate from CommandPerform jobs.
Added OnlyActionOn constructor for ActionItem which fixes the
onlyActionOn breakage in the last commit.
Made CustomOutput include an ActionItem, so even things using it can
specify OnlyActionOn.
In Command.Move and Command.Sync, there were CommandStarts that used
includeCommandAction, so output messages, which is no longer allowed.
Fixed by using startingCustomOutput, but that's still not quite right,
since it prevents message display for the includeCommandAction run
inside it too.
2019-06-12 13:23:26 +00:00
|
|
|
| OnlyActionOn Key ActionItem
|
expire, trust et al, dead, describe: Support --json and --json-error-messages
For expire, the normal output is unchanged, but the --json output includes the uuid
in machine parseable form. Which could be very useful for this somewhat obscure
command. That needed ActionItemUUID to be implemented, which seemed like a lot
of work, but then ---
I had been going to skip implementing them for trust, untrust, dead, semitrust,
and describe, but putting the uuid in the json is useful information, it tells
what uuid git-annex picked given the input. It was not hard to support
these once ActionItemUUID was implemented.
Sponsored-By: the NIH-funded NICEMAN (ReproNim TR&D3) project
2023-05-05 19:29:49 +00:00
|
|
|
-- ^ Use to avoid more than one thread concurrently processing the
|
|
|
|
-- same Key.
|
finish CommandStart transition
The hoped for optimisation of CommandStart with -J did not materialize.
In fact, not runnign CommandStart in parallel is slower than -J3.
So, CommandStart are still run in parallel.
(The actual bad performance I've been seeing with -J in my big repo
has to do with building the remoteList.)
But, this is still progress toward making -J faster, because it gets rid
of the onlyActionOn roadblock in the way of making CommandCleanup jobs
run separate from CommandPerform jobs.
Added OnlyActionOn constructor for ActionItem which fixes the
onlyActionOn breakage in the last commit.
Made CustomOutput include an ActionItem, so even things using it can
specify OnlyActionOn.
In Command.Move and Command.Sync, there were CommandStarts that used
includeCommandAction, so output messages, which is no longer allowed.
Fixed by using startingCustomOutput, but that's still not quite right,
since it prevents message display for the includeCommandAction run
inside it too.
2019-06-12 13:23:26 +00:00
|
|
|
deriving (Show, Eq)
|
2016-08-03 16:37:12 +00:00
|
|
|
|
|
|
|
class MkActionItem t where
|
|
|
|
mkActionItem :: t -> ActionItem
|
|
|
|
|
make CommandStart return a StartMessage
The goal is to be able to run CommandStart in the main thread when -J is
used, rather than unncessarily passing it off to a worker thread, which
incurs overhead that is signficant when the CommandStart is going to
quickly decide to stop.
To do that, the message it displays needs to be displayed in the worker
thread, after the CommandStart has run.
Also, the change will mean that CommandStart will no longer necessarily
run with the same Annex state as CommandPerform. While its docs already
said it should avoid modifying Annex state, I audited all the
CommandStart code as part of the conversion. (Note that CommandSeek
already sometimes runs with a different Annex state, and that has not been
a source of any problems, so I am not too worried that this change will
lead to breakage going forward.)
The only modification of Annex state I found was it calling
allowMessages in some Commands that default to noMessages. Dealt with
that by adding a startCustomOutput and a startingUsualMessages.
This lets a command start with noMessages and then select the output it
wants for each CommandStart.
One bit of breakage: onlyActionOn has been removed from commands that used it.
The plan is that, since a StartMessage contains an ActionItem,
when a Key can be extracted from that, the parallel job runner can
run onlyActionOn' automatically. Then commands won't need to worry about
this detail. Future work.
Otherwise, this was a fairly straightforward process of making each
CommandStart compile again. Hopefully other behavior changes were mostly
avoided.
In a few cases, a command had a CommandStart that called a CommandPerform
that then called showStart multiple times. I have collapsed those
down to a single start action. The main command to perhaps suffer from it
is Command.Direct, which used to show a start for each file, and no
longer does.
Another minor behavior change is that some commands used showStart
before, but had an associated file and a Key available, so were changed
to ShowStart with an ActionItemAssociatedFile. That will not change the
normal output or behavior, but --json output will now include the key.
This should not break it for anyone using a real json parser.
2019-06-06 19:42:30 +00:00
|
|
|
instance MkActionItem ActionItem where
|
|
|
|
mkActionItem = id
|
|
|
|
|
2019-06-06 16:53:24 +00:00
|
|
|
instance MkActionItem (AssociatedFile, Key) where
|
|
|
|
mkActionItem = uncurry ActionItemAssociatedFile
|
|
|
|
|
|
|
|
instance MkActionItem (Key, AssociatedFile) where
|
|
|
|
mkActionItem = uncurry $ flip ActionItemAssociatedFile
|
2016-08-03 16:37:12 +00:00
|
|
|
|
2019-11-26 19:27:22 +00:00
|
|
|
instance MkActionItem (Key, RawFilePath) where
|
make CommandStart return a StartMessage
The goal is to be able to run CommandStart in the main thread when -J is
used, rather than unncessarily passing it off to a worker thread, which
incurs overhead that is signficant when the CommandStart is going to
quickly decide to stop.
To do that, the message it displays needs to be displayed in the worker
thread, after the CommandStart has run.
Also, the change will mean that CommandStart will no longer necessarily
run with the same Annex state as CommandPerform. While its docs already
said it should avoid modifying Annex state, I audited all the
CommandStart code as part of the conversion. (Note that CommandSeek
already sometimes runs with a different Annex state, and that has not been
a source of any problems, so I am not too worried that this change will
lead to breakage going forward.)
The only modification of Annex state I found was it calling
allowMessages in some Commands that default to noMessages. Dealt with
that by adding a startCustomOutput and a startingUsualMessages.
This lets a command start with noMessages and then select the output it
wants for each CommandStart.
One bit of breakage: onlyActionOn has been removed from commands that used it.
The plan is that, since a StartMessage contains an ActionItem,
when a Key can be extracted from that, the parallel job runner can
run onlyActionOn' automatically. Then commands won't need to worry about
this detail. Future work.
Otherwise, this was a fairly straightforward process of making each
CommandStart compile again. Hopefully other behavior changes were mostly
avoided.
In a few cases, a command had a CommandStart that called a CommandPerform
that then called showStart multiple times. I have collapsed those
down to a single start action. The main command to perhaps suffer from it
is Command.Direct, which used to show a start for each file, and no
longer does.
Another minor behavior change is that some commands used showStart
before, but had an associated file and a Key available, so were changed
to ShowStart with an ActionItemAssociatedFile. That will not change the
normal output or behavior, but --json output will now include the key.
This should not break it for anyone using a real json parser.
2019-06-06 19:42:30 +00:00
|
|
|
mkActionItem (key, file) = ActionItemAssociatedFile (AssociatedFile (Just file)) key
|
|
|
|
|
2019-11-26 19:27:22 +00:00
|
|
|
instance MkActionItem (RawFilePath, Key) where
|
make CommandStart return a StartMessage
The goal is to be able to run CommandStart in the main thread when -J is
used, rather than unncessarily passing it off to a worker thread, which
incurs overhead that is signficant when the CommandStart is going to
quickly decide to stop.
To do that, the message it displays needs to be displayed in the worker
thread, after the CommandStart has run.
Also, the change will mean that CommandStart will no longer necessarily
run with the same Annex state as CommandPerform. While its docs already
said it should avoid modifying Annex state, I audited all the
CommandStart code as part of the conversion. (Note that CommandSeek
already sometimes runs with a different Annex state, and that has not been
a source of any problems, so I am not too worried that this change will
lead to breakage going forward.)
The only modification of Annex state I found was it calling
allowMessages in some Commands that default to noMessages. Dealt with
that by adding a startCustomOutput and a startingUsualMessages.
This lets a command start with noMessages and then select the output it
wants for each CommandStart.
One bit of breakage: onlyActionOn has been removed from commands that used it.
The plan is that, since a StartMessage contains an ActionItem,
when a Key can be extracted from that, the parallel job runner can
run onlyActionOn' automatically. Then commands won't need to worry about
this detail. Future work.
Otherwise, this was a fairly straightforward process of making each
CommandStart compile again. Hopefully other behavior changes were mostly
avoided.
In a few cases, a command had a CommandStart that called a CommandPerform
that then called showStart multiple times. I have collapsed those
down to a single start action. The main command to perhaps suffer from it
is Command.Direct, which used to show a start for each file, and no
longer does.
Another minor behavior change is that some commands used showStart
before, but had an associated file and a Key available, so were changed
to ShowStart with an ActionItemAssociatedFile. That will not change the
normal output or behavior, but --json output will now include the key.
This should not break it for anyone using a real json parser.
2019-06-06 19:42:30 +00:00
|
|
|
mkActionItem (file, key) = mkActionItem (key, file)
|
|
|
|
|
2016-08-03 16:37:12 +00:00
|
|
|
instance MkActionItem Key where
|
2019-06-06 16:53:24 +00:00
|
|
|
mkActionItem = ActionItemKey
|
2016-08-03 16:37:12 +00:00
|
|
|
|
2019-06-06 16:53:24 +00:00
|
|
|
instance MkActionItem (BranchFilePath, Key) where
|
|
|
|
mkActionItem = uncurry ActionItemBranchFilePath
|
2016-08-03 16:37:12 +00:00
|
|
|
|
|
|
|
instance MkActionItem (Transfer, TransferInfo) where
|
|
|
|
mkActionItem = uncurry ActionItemFailedTransfer
|
|
|
|
|
2023-07-26 18:34:21 +00:00
|
|
|
instance MkActionItem MatchInfo where
|
|
|
|
mkActionItem (MatchingFile i) = ActionItemTreeFile (matchFile i)
|
|
|
|
mkActionItem (MatchingInfo i) = case providedFilePath i of
|
|
|
|
Just f -> ActionItemTreeFile f
|
|
|
|
Nothing -> case providedKey i of
|
|
|
|
Just k -> ActionItemKey k
|
|
|
|
Nothing -> ActionItemOther Nothing
|
|
|
|
mkActionItem (MatchingUserInfo _) = ActionItemOther Nothing
|
|
|
|
|
2023-04-10 21:03:41 +00:00
|
|
|
actionItemDesc :: ActionItem -> StringContainingQuotedPath
|
|
|
|
actionItemDesc (ActionItemAssociatedFile (AssociatedFile (Just f)) _) =
|
|
|
|
QuotedPath f
|
|
|
|
actionItemDesc (ActionItemAssociatedFile (AssociatedFile Nothing) k) =
|
|
|
|
UnquotedByteString (serializeKey' k)
|
|
|
|
actionItemDesc (ActionItemKey k) =
|
|
|
|
UnquotedByteString (serializeKey' k)
|
|
|
|
actionItemDesc (ActionItemBranchFilePath bfp _) =
|
|
|
|
descBranchFilePath bfp
|
|
|
|
actionItemDesc (ActionItemFailedTransfer t i) = actionItemDesc $
|
2019-06-06 16:53:24 +00:00
|
|
|
ActionItemAssociatedFile (associatedFile i) (transferKey t)
|
2023-04-10 21:03:41 +00:00
|
|
|
actionItemDesc (ActionItemTreeFile f) = QuotedPath f
|
expire, trust et al, dead, describe: Support --json and --json-error-messages
For expire, the normal output is unchanged, but the --json output includes the uuid
in machine parseable form. Which could be very useful for this somewhat obscure
command. That needed ActionItemUUID to be implemented, which seemed like a lot
of work, but then ---
I had been going to skip implementing them for trust, untrust, dead, semitrust,
and describe, but putting the uuid in the json is useful information, it tells
what uuid git-annex picked given the input. It was not hard to support
these once ActionItemUUID was implemented.
Sponsored-By: the NIH-funded NICEMAN (ReproNim TR&D3) project
2023-05-05 19:29:49 +00:00
|
|
|
actionItemDesc (ActionItemUUID _ desc) = desc
|
2023-04-10 21:03:41 +00:00
|
|
|
actionItemDesc (ActionItemOther Nothing) = mempty
|
|
|
|
actionItemDesc (ActionItemOther (Just v)) = v
|
|
|
|
actionItemDesc (OnlyActionOn _ ai) = actionItemDesc ai
|
2019-06-06 16:53:24 +00:00
|
|
|
|
make CommandStart return a StartMessage
The goal is to be able to run CommandStart in the main thread when -J is
used, rather than unncessarily passing it off to a worker thread, which
incurs overhead that is signficant when the CommandStart is going to
quickly decide to stop.
To do that, the message it displays needs to be displayed in the worker
thread, after the CommandStart has run.
Also, the change will mean that CommandStart will no longer necessarily
run with the same Annex state as CommandPerform. While its docs already
said it should avoid modifying Annex state, I audited all the
CommandStart code as part of the conversion. (Note that CommandSeek
already sometimes runs with a different Annex state, and that has not been
a source of any problems, so I am not too worried that this change will
lead to breakage going forward.)
The only modification of Annex state I found was it calling
allowMessages in some Commands that default to noMessages. Dealt with
that by adding a startCustomOutput and a startingUsualMessages.
This lets a command start with noMessages and then select the output it
wants for each CommandStart.
One bit of breakage: onlyActionOn has been removed from commands that used it.
The plan is that, since a StartMessage contains an ActionItem,
when a Key can be extracted from that, the parallel job runner can
run onlyActionOn' automatically. Then commands won't need to worry about
this detail. Future work.
Otherwise, this was a fairly straightforward process of making each
CommandStart compile again. Hopefully other behavior changes were mostly
avoided.
In a few cases, a command had a CommandStart that called a CommandPerform
that then called showStart multiple times. I have collapsed those
down to a single start action. The main command to perhaps suffer from it
is Command.Direct, which used to show a start for each file, and no
longer does.
Another minor behavior change is that some commands used showStart
before, but had an associated file and a Key available, so were changed
to ShowStart with an ActionItemAssociatedFile. That will not change the
normal output or behavior, but --json output will now include the key.
This should not break it for anyone using a real json parser.
2019-06-06 19:42:30 +00:00
|
|
|
actionItemKey :: ActionItem -> Maybe Key
|
|
|
|
actionItemKey (ActionItemAssociatedFile _ k) = Just k
|
|
|
|
actionItemKey (ActionItemKey k) = Just k
|
|
|
|
actionItemKey (ActionItemBranchFilePath _ k) = Just k
|
|
|
|
actionItemKey (ActionItemFailedTransfer t _) = Just (transferKey t)
|
2021-03-12 18:09:19 +00:00
|
|
|
actionItemKey (ActionItemTreeFile _) = Nothing
|
expire, trust et al, dead, describe: Support --json and --json-error-messages
For expire, the normal output is unchanged, but the --json output includes the uuid
in machine parseable form. Which could be very useful for this somewhat obscure
command. That needed ActionItemUUID to be implemented, which seemed like a lot
of work, but then ---
I had been going to skip implementing them for trust, untrust, dead, semitrust,
and describe, but putting the uuid in the json is useful information, it tells
what uuid git-annex picked given the input. It was not hard to support
these once ActionItemUUID was implemented.
Sponsored-By: the NIH-funded NICEMAN (ReproNim TR&D3) project
2023-05-05 19:29:49 +00:00
|
|
|
actionItemKey (ActionItemUUID _ _) = Nothing
|
make CommandStart return a StartMessage
The goal is to be able to run CommandStart in the main thread when -J is
used, rather than unncessarily passing it off to a worker thread, which
incurs overhead that is signficant when the CommandStart is going to
quickly decide to stop.
To do that, the message it displays needs to be displayed in the worker
thread, after the CommandStart has run.
Also, the change will mean that CommandStart will no longer necessarily
run with the same Annex state as CommandPerform. While its docs already
said it should avoid modifying Annex state, I audited all the
CommandStart code as part of the conversion. (Note that CommandSeek
already sometimes runs with a different Annex state, and that has not been
a source of any problems, so I am not too worried that this change will
lead to breakage going forward.)
The only modification of Annex state I found was it calling
allowMessages in some Commands that default to noMessages. Dealt with
that by adding a startCustomOutput and a startingUsualMessages.
This lets a command start with noMessages and then select the output it
wants for each CommandStart.
One bit of breakage: onlyActionOn has been removed from commands that used it.
The plan is that, since a StartMessage contains an ActionItem,
when a Key can be extracted from that, the parallel job runner can
run onlyActionOn' automatically. Then commands won't need to worry about
this detail. Future work.
Otherwise, this was a fairly straightforward process of making each
CommandStart compile again. Hopefully other behavior changes were mostly
avoided.
In a few cases, a command had a CommandStart that called a CommandPerform
that then called showStart multiple times. I have collapsed those
down to a single start action. The main command to perhaps suffer from it
is Command.Direct, which used to show a start for each file, and no
longer does.
Another minor behavior change is that some commands used showStart
before, but had an associated file and a Key available, so were changed
to ShowStart with an ActionItemAssociatedFile. That will not change the
normal output or behavior, but --json output will now include the key.
This should not break it for anyone using a real json parser.
2019-06-06 19:42:30 +00:00
|
|
|
actionItemKey (ActionItemOther _) = Nothing
|
finish CommandStart transition
The hoped for optimisation of CommandStart with -J did not materialize.
In fact, not runnign CommandStart in parallel is slower than -J3.
So, CommandStart are still run in parallel.
(The actual bad performance I've been seeing with -J in my big repo
has to do with building the remoteList.)
But, this is still progress toward making -J faster, because it gets rid
of the onlyActionOn roadblock in the way of making CommandCleanup jobs
run separate from CommandPerform jobs.
Added OnlyActionOn constructor for ActionItem which fixes the
onlyActionOn breakage in the last commit.
Made CustomOutput include an ActionItem, so even things using it can
specify OnlyActionOn.
In Command.Move and Command.Sync, there were CommandStarts that used
includeCommandAction, so output messages, which is no longer allowed.
Fixed by using startingCustomOutput, but that's still not quite right,
since it prevents message display for the includeCommandAction run
inside it too.
2019-06-12 13:23:26 +00:00
|
|
|
actionItemKey (OnlyActionOn _ ai) = actionItemKey ai
|
2016-08-03 16:37:12 +00:00
|
|
|
|
2021-03-12 18:09:19 +00:00
|
|
|
actionItemFile :: ActionItem -> Maybe RawFilePath
|
|
|
|
actionItemFile (ActionItemAssociatedFile (AssociatedFile af) _) = af
|
|
|
|
actionItemFile (ActionItemTreeFile f) = Just f
|
expire, trust et al, dead, describe: Support --json and --json-error-messages
For expire, the normal output is unchanged, but the --json output includes the uuid
in machine parseable form. Which could be very useful for this somewhat obscure
command. That needed ActionItemUUID to be implemented, which seemed like a lot
of work, but then ---
I had been going to skip implementing them for trust, untrust, dead, semitrust,
and describe, but putting the uuid in the json is useful information, it tells
what uuid git-annex picked given the input. It was not hard to support
these once ActionItemUUID was implemented.
Sponsored-By: the NIH-funded NICEMAN (ReproNim TR&D3) project
2023-05-05 19:29:49 +00:00
|
|
|
actionItemFile (ActionItemUUID _ _) = Nothing
|
2021-03-12 18:09:19 +00:00
|
|
|
actionItemFile (OnlyActionOn _ ai) = actionItemFile ai
|
|
|
|
actionItemFile _ = Nothing
|
2016-08-03 16:37:12 +00:00
|
|
|
|
expire, trust et al, dead, describe: Support --json and --json-error-messages
For expire, the normal output is unchanged, but the --json output includes the uuid
in machine parseable form. Which could be very useful for this somewhat obscure
command. That needed ActionItemUUID to be implemented, which seemed like a lot
of work, but then ---
I had been going to skip implementing them for trust, untrust, dead, semitrust,
and describe, but putting the uuid in the json is useful information, it tells
what uuid git-annex picked given the input. It was not hard to support
these once ActionItemUUID was implemented.
Sponsored-By: the NIH-funded NICEMAN (ReproNim TR&D3) project
2023-05-05 19:29:49 +00:00
|
|
|
actionItemUUID :: ActionItem -> Maybe UUID
|
|
|
|
actionItemUUID (ActionItemUUID uuid _) = Just uuid
|
|
|
|
actionItemUUID _ = Nothing
|
|
|
|
|
2016-08-03 16:37:12 +00:00
|
|
|
actionItemTransferDirection :: ActionItem -> Maybe Direction
|
|
|
|
actionItemTransferDirection (ActionItemFailedTransfer t _) = Just $
|
|
|
|
transferDirection t
|
finish CommandStart transition
The hoped for optimisation of CommandStart with -J did not materialize.
In fact, not runnign CommandStart in parallel is slower than -J3.
So, CommandStart are still run in parallel.
(The actual bad performance I've been seeing with -J in my big repo
has to do with building the remoteList.)
But, this is still progress toward making -J faster, because it gets rid
of the onlyActionOn roadblock in the way of making CommandCleanup jobs
run separate from CommandPerform jobs.
Added OnlyActionOn constructor for ActionItem which fixes the
onlyActionOn breakage in the last commit.
Made CustomOutput include an ActionItem, so even things using it can
specify OnlyActionOn.
In Command.Move and Command.Sync, there were CommandStarts that used
includeCommandAction, so output messages, which is no longer allowed.
Fixed by using startingCustomOutput, but that's still not quite right,
since it prevents message display for the includeCommandAction run
inside it too.
2019-06-12 13:23:26 +00:00
|
|
|
actionItemTransferDirection (OnlyActionOn _ ai) = actionItemTransferDirection ai
|
2016-08-03 16:37:12 +00:00
|
|
|
actionItemTransferDirection _ = Nothing
|