From 161d8915087c5888e253bbd683f2efb491b14abe Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 29 Sep 2016 16:29:54 -0400 Subject: [PATCH] Add "total-size" field to --json-progress output. --- CHANGELOG | 1 + Messages/JSON.hs | 1 + .../comment_7_dc29d3603ce7ce436fac7fa6d6f80871._comment | 8 ++++++++ 3 files changed, 10 insertions(+) create mode 100644 doc/todo/interface_to_the___34__progress__34___of_annex_operations/comment_7_dc29d3603ce7ce436fac7fa6d6f80871._comment diff --git a/CHANGELOG b/CHANGELOG index e94c1b0b30..c36fcb74f8 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -6,6 +6,7 @@ git-annex (6.20160924) UNRELEASED; urgency=medium copies of the environment. Speeds up commands like "git-annex find --in remote" by over 50%. * Optimised git-annex branch log file timestamp parsing. + * Add "total-size" field to --json-progress output. -- Joey Hess Mon, 26 Sep 2016 16:46:19 -0400 diff --git a/Messages/JSON.hs b/Messages/JSON.hs index 6c22d9537b..fb288b7359 100644 --- a/Messages/JSON.hs +++ b/Messages/JSON.hs @@ -104,6 +104,7 @@ progress maction size bytesprocessed = emit $ case maction of Object o = object [ "byte-progress" .= n , "percent-progress" .= showPercentage 2 (percentage size n) + , "total-size" .= size ] -- A value that can be displayed either normally, or as JSON. diff --git a/doc/todo/interface_to_the___34__progress__34___of_annex_operations/comment_7_dc29d3603ce7ce436fac7fa6d6f80871._comment b/doc/todo/interface_to_the___34__progress__34___of_annex_operations/comment_7_dc29d3603ce7ce436fac7fa6d6f80871._comment new file mode 100644 index 0000000000..2acb1e16c1 --- /dev/null +++ b/doc/todo/interface_to_the___34__progress__34___of_annex_operations/comment_7_dc29d3603ce7ce436fac7fa6d6f80871._comment @@ -0,0 +1,8 @@ +[[!comment format=mdwn + username="joey" + subject="""comment 7""" + date="2016-09-29T20:27:46Z" + content=""" +Added a "total-size" field for the size. Although, if a key's size is not +known, git-annex does not currently do any progress displays for that key. +"""]] -- 2.30.2