Commit graph

43275 commits

Author SHA1 Message Date
Joey Hess
c208442292
unused: Support --json and --json-error-messages
Generalized AddJSONActionItemField to allow it to add several fields. Not entirely
happy with that, since the names of the fields have to be carefully chosen to
not conflict with other json fields. And fields added that way can't be parsed
back in FromJSON, except for the "fields" field that is special cased for metadata.
Still, I couldn't see another way to do it.

Also, omit file:null from the json output. Which does affect other commands,
eg git-annex whereis --all --json. Hopefully that won't break something that expects
a null file. If it did, that could be reverted, but it would be ugly to have
file:null in the unused --json

Sponsored-By: the NIH-funded NICEMAN (ReproNim TR&D3) project
2023-05-08 14:39:57 -04:00
Joey Hess
dd90c7abda
remove spam 2023-05-08 14:35:44 -04:00
Joey Hess
4ccf6e4f1c
remove spam 2023-05-08 13:43:51 -04:00
dumsdat31w@f50d4cfc680f8d60eff3fe8e76ece7e1fb65e690
ccba75ec7b Added a comment: The Best solution for missing files 2023-05-08 14:41:46 +00:00
dumsdat31w@f50d4cfc680f8d60eff3fe8e76ece7e1fb65e690
8b6dd8c03c removed 2023-05-08 14:40:49 +00:00
dumsdat31w@f50d4cfc680f8d60eff3fe8e76ece7e1fb65e690
980a8f7c97 Added a comment: A nice solution 2023-05-08 14:40:09 +00:00
dumsdat31w@f50d4cfc680f8d60eff3fe8e76ece7e1fb65e690
1deff91e04 Added a comment: The best option of s3 mac client 2023-05-08 14:37:33 +00:00
dumsdat31w@f50d4cfc680f8d60eff3fe8e76ece7e1fb65e690
a1018a7b17 Added a comment: The best option of s3 mac client 2023-05-08 14:37:09 +00:00
jstritch
005c474a05 2023-05-08 13:52:43 +00:00
Joey Hess
e1a0409870
Revert "update"
This reverts commit 940f9ee9ce.
2023-05-07 12:54:29 -04:00
Joey Hess
940f9ee9ce
update 2023-05-07 12:54:19 -04:00
Joey Hess
a267a5efa1
oops 2023-05-05 15:36:51 -04:00
Joey Hess
365dbc89dc
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 15:33:30 -04:00
Joey Hess
1a9af823bc
addunused, dropunused: Support --json and --json-error-messages
This also changes addunused to display the names of the files that it adds.
That seems like a general usability improvement, and not displaying the input
number does not seem likely to be a problem to a user, since the filename
is based on the key. Displaying the filename was necessary to get it and the key
included in the json.

dropunused does not include the key in the json. It would be possible to
add, but would need more changes. And I doubt that dropunused --json
would be used in a situation where a program cared which keys were
dropped. Note that drop --unused does have the key in its json, so such
a program could just use it. Or could just dropkey --batch with the
specific keys it wants to drop if it cares about specific keys.

Sponsored-By: the NIH-funded NICEMAN (ReproNim TR&D3) project
2023-05-05 14:01:40 -04:00
Joey Hess
972fd05688
comment 2023-05-05 13:36:57 -04:00
nobodyinperson
4a3d859922 Added a comment: out of date git-annex 2023-05-05 14:19:42 +00:00
jt
19b7c136a3 Added a comment: Invalid argument `whereused' 2023-05-05 14:04:06 +00:00
Joey Hess
8c3a847960
update 2023-05-04 16:48:51 -04:00
Joey Hess
1d4bd2dcb8
migrate, undo: Support --json and --json-error-messages
Sponsored-By: the NIH-funded NICEMAN (ReproNim TR&D3) project
2023-05-04 16:34:35 -04:00
Joey Hess
38fc5d3fc7
rekey, setpresentkey: Support --json and --json-error-messages
Sponsored-By: the NIH-funded NICEMAN (ReproNim TR&D3) project
2023-05-04 16:03:54 -04:00
Joey Hess
9bc9421c08
update 2023-05-04 14:34:37 -04:00
Joey Hess
f20c8b087e
fix: Support --json and --json-error-messages
And triaged out some commands that don't need to support these options.

Sponsored-By: the NIH-funded NICEMAN (ReproNim TR&D3) project
2023-05-04 14:28:21 -04:00
Joey Hess
46c7c30140
log: Support --json and --json-error-messages
Also in passing the --all display was fixed up to not quote keys like filenames.

Note that the check added to compareChanges was needed to avoid logging when
nothing changed.

Sponsored-By: the NIH-funded NICEMAN (ReproNim TR&D3) project
2023-05-04 12:36:31 -04:00
Joey Hess
f56f6140fa
remote tailing 's' from log --raw-data
log: When --raw-date is used, display only seconds from the epoch, as
documented, omitting a trailing "s" that was included in the output
before.

Sponsored-By: the NIH-funded NICEMAN (ReproNim TR&D3) project
2023-05-04 11:53:38 -04:00
Joey Hess
c235488e2d
rmurl: Support --json and --json-error-messages
The json does not include an url field, but it does have an input field that is
"file url" when using --batch and ["file", "url"] when using the command line.
I chose not to change that because it would complicate batchInput.
An url field could be added if it turns out to be useful.

Sponsored-By: the NIH-funded NICEMAN (ReproNim TR&D3) project
2023-05-04 11:28:27 -04:00
yarikoptic
563d6dcf62 moved log and rmurl to the top as the one we use AFAIK 2023-05-04 00:10:09 +00:00
Joey Hess
6cbcba484c
unannex: Support --json and --json-error-messages
Sponsored-By: the NIH-funded NICEMAN (ReproNim TR&D3) project
2023-05-03 15:56:20 -04:00
Joey Hess
7fc48fb348
comment 2023-05-03 15:25:17 -04:00
yarikoptic
2002108a55 plea for --json for unannex and other commands 2023-05-03 19:08:03 +00:00
nobodyinperson
bc1410100b Added a comment: adding all files or only in current directory? 2023-05-03 14:23:05 +00:00
dud225@35a1ee469f82f3a7eb1f2dce4ad453f5e47bdfd3
327bd6bad0 Added a comment: Groups comprised of archive drives of various size 2023-05-03 07:49:19 +00:00
Joey Hess
b90c2156a6
forwarded git bug 2023-05-02 13:27:04 -04:00
Joey Hess
72fb1262a3
comment 2023-05-01 17:10:31 -04:00
Joey Hess
460992d2a1
comment 2023-05-01 17:08:44 -04:00
Joey Hess
703014d989
beat my head against this bug for a couple hours 2023-05-01 17:05:51 -04:00
Joey Hess
d98a7f0afc
comment 2023-05-01 13:09:47 -04:00
Joey Hess
57c1b4f5e5
initremote: Avoid creating a remote that is not encrypted when gpg is broken
checksize was applied lazily, so the exception didn't happen until the
remote was set up.

Sponsored-by: k0ld on Patreon
2023-05-01 13:00:05 -04:00
Joey Hess
23719bc91b
comment 2023-05-01 12:30:25 -04:00
Joey Hess
a4c9d649ad
Merge branch 'master' of ssh://git-annex.branchable.com 2023-05-01 12:29:31 -04:00
Joey Hess
e0dde88797
fix reversion in display of fatal exceptions
fdac66ae10 lost the "git-annex:" prefix,
which broke datalad's parsing of an error message (ugh)

Also, don't use warningIO because it displays a blank line to stdout,
which is also a behavior change from before, and does not seem
necessary.

Sponsored-by: Brock Spratlen on Patreon
2023-05-01 12:25:14 -04:00
tom@b87e4336a0d0785eb7d5853e390835a18797402f
59f0ea3aeb Added a comment 2023-05-01 16:10:00 +00:00
Joey Hess
0bf983d3ab
fixed related issue 2023-05-01 12:07:20 -04:00
Joey Hess
1beca851ff
back compat fix for info --json on unknown item
This was changed in a0e6fa18eb in a way
that broke datalad, which expected to see a "file" field in the --json.

See 45ddd4b12f
2023-05-01 12:05:21 -04:00
Joey Hess
66fe3b0908
comment 2023-05-01 11:57:49 -04:00
tom@b87e4336a0d0785eb7d5853e390835a18797402f
7cb870e008 Added a comment: output 2023-05-01 12:58:46 +00:00
nobodyinperson
def1eee573 Added a comment 2023-05-01 12:26:10 +00:00
tom@b87e4336a0d0785eb7d5853e390835a18797402f
c8176f899b 2023-05-01 12:05:34 +00:00
nobodyinperson
52c0fc97e3 Added a comment: git-annex relaying syncs across remotes 2023-05-01 08:50:10 +00:00
tom@b87e4336a0d0785eb7d5853e390835a18797402f
0ef32b50fe Added a comment: What is the underlying reason for needing a two-way SSH connection 2023-05-01 08:34:46 +00:00
nobodyinperson
7301308be6 Added a comment 2023-04-29 14:46:46 +00:00