copy, move, mirror: Support --json and --json-progress.
This commit is contained in:
parent
c277a21ece
commit
3e22d60549
8 changed files with 36 additions and 4 deletions
|
@ -9,6 +9,7 @@ git-annex (6.20160908) UNRELEASED; urgency=medium
|
|||
* addurl, get: Added --json-progress option, which adds progress
|
||||
objects to the json output.
|
||||
* Remove key:null from git-annex add --json output.
|
||||
* copy, move, mirror: Support --json and --json-progress.
|
||||
|
||||
-- Joey Hess <id@joeyh.name> Thu, 08 Sep 2016 12:48:55 -0400
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ import Annex.Wanted
|
|||
import Annex.NumCopies
|
||||
|
||||
cmd :: Command
|
||||
cmd = withGlobalOptions (jobsOption : annexedMatchingOptions) $
|
||||
cmd = withGlobalOptions (jobsOption : jsonOption : jsonProgressOption : annexedMatchingOptions) $
|
||||
command "copy" SectionCommon
|
||||
"copy content of files to/from another repository"
|
||||
paramPaths (seek <--< optParser)
|
||||
|
|
|
@ -17,7 +17,7 @@ import Annex.NumCopies
|
|||
import Types.Transfer
|
||||
|
||||
cmd :: Command
|
||||
cmd = withGlobalOptions ([jobsOption] ++ annexedMatchingOptions) $
|
||||
cmd = withGlobalOptions (jobsOption : jsonOption : jsonProgressOption : annexedMatchingOptions) $
|
||||
command "mirror" SectionCommon
|
||||
"mirror content of files to/from another repository"
|
||||
paramPaths (seek <--< optParser)
|
||||
|
|
|
@ -20,7 +20,7 @@ import Annex.NumCopies
|
|||
import System.Log.Logger (debugM)
|
||||
|
||||
cmd :: Command
|
||||
cmd = withGlobalOptions (jobsOption : annexedMatchingOptions) $
|
||||
cmd = withGlobalOptions (jobsOption : jsonOption : jsonProgressOption : annexedMatchingOptions) $
|
||||
command "move" SectionCommon
|
||||
"move content of files to/from another repository"
|
||||
paramPaths (seek <--< optParser)
|
||||
|
|
|
@ -72,6 +72,15 @@ Copies the content of files from or to another remote.
|
|||
The [[git-annex-matching-options]](1)
|
||||
can be used to specify files to copy.
|
||||
|
||||
* `--json`
|
||||
|
||||
Enable JSON output. This is intended to be parsed by programs that use
|
||||
git-annex. Each line of output is a JSON object.
|
||||
|
||||
* `--json-progress`
|
||||
|
||||
Include progress objects in JSON output.
|
||||
|
||||
# SEE ALSO
|
||||
|
||||
[[git-annex]](1)
|
||||
|
|
|
@ -66,6 +66,15 @@ contents. Use [[git-annex-sync]](1) for that.
|
|||
The [[git-annex-matching-options]](1)
|
||||
can be used to specify files to mirror.
|
||||
|
||||
* `--json`
|
||||
|
||||
Enable JSON output. This is intended to be parsed by programs that use
|
||||
git-annex. Each line of output is a JSON object.
|
||||
|
||||
* `--json-progress`
|
||||
|
||||
Include progress objects in JSON output.
|
||||
|
||||
# SEE ALSO
|
||||
|
||||
[[git-annex]](1)
|
||||
|
|
|
@ -55,6 +55,15 @@ Moves the content of files from or to another remote.
|
|||
The [[git-annex-matching-options]](1)
|
||||
can be used to specify files to move.
|
||||
|
||||
* `--json`
|
||||
|
||||
Enable JSON output. This is intended to be parsed by programs that use
|
||||
git-annex. Each line of output is a JSON object.
|
||||
|
||||
* `--json-progress`
|
||||
|
||||
Include progress objects in JSON output.
|
||||
|
||||
# SEE ALSO
|
||||
|
||||
[[git-annex]](1)
|
||||
|
|
|
@ -12,4 +12,8 @@ Related:
|
|||
> relay the progress messages when datalad is doing a nested retrieval, I
|
||||
> suppose.) --[[Joey]]
|
||||
|
||||
>> [[done]]; --json-progress implemented. --[[Joey]]
|
||||
>> [[done]]; --json-progress implemented. I limited the frequency of json
|
||||
>> progress items to 10 per second max, and it's typically only 1 per
|
||||
>> second or less, so didn't implement
|
||||
>> --json-progress=N to tune it. Also added --json and --json-progress to
|
||||
>> copy, move, mirror commands. --[[Joey]]
|
||||
|
|
Loading…
Add table
Reference in a new issue