Commit graph

36336 commits

Author SHA1 Message Date
Joey Hess
2be4122bfc
include passthrough params in --describe-other-params 2020-01-20 16:53:27 -04:00
Joey Hess
aa949bbb7d
initremote --describe-other-params
Does not yet include descriptions from external special remote programs.
2020-01-20 16:05:51 -04:00
Joey Hess
2f8822307f
Merge branch 'remoteconfig' 2020-01-20 15:21:05 -04:00
Joey Hess
7038acf96c
add descriptions for all remote config fields
not yet used
2020-01-20 15:20:04 -04:00
Joey Hess
201049cf93
gcrypt inherits shellescape setting from rsync, allow it 2020-01-20 15:13:49 -04:00
Joey Hess
923230ea30
convert RemoteConfigFieldParser to data type 2020-01-20 13:49:30 -04:00
bastibe
15bc8741c2 2020-01-20 14:57:04 +00:00
timothe
b4c135619d 2020-01-17 22:47:50 +00:00
Joey Hess
0b6fb506eb
Merge branch 'master' of ssh://git-annex.branchable.com 2020-01-17 17:30:09 -04:00
Joey Hess
8406ff8861
speed hack
Avoids the external program being started just to use LISTCONFIGS on an
already accepted config.

So initremote/enableremote will still run the external program an extra
time to use LISTCONFIGS, but everything that uses the special remote after
it's initialized will not any longer.
2020-01-17 17:26:36 -04:00
Joey Hess
b1c224dd48
done 2020-01-17 17:18:44 -04:00
Joey Hess
5c58f86790
always add the specialRemoteConfigParsers
Was not being added in some places, resulting in error messages about
encryption not being a valid field.
2020-01-17 17:13:44 -04:00
Joey Hess
2a4731216d
avoid adding parsers for fields that already have a parser 2020-01-17 17:11:55 -04:00
Joey Hess
8b9b90c74a
bugfixes
getRemoteConfigPassedThrough was never returning anything, Typeable
prevented the type checker from noticing a dumb mistake.

parseRemoteConfig was not adding Accepted values as PassedThrough
2020-01-17 17:09:56 -04:00
Joey Hess
99cb3e75f1
add LISTCONFIGS to external special remote protocol
Special remote programs that use GETCONFIG/SETCONFIG are recommended
to implement it.

The description is not yet used, but will be useful later when adding a way
to make initremote list all accepted configs.

configParser now takes a RemoteConfig parameter. Normally, that's not
needed, because configParser returns a parter, it does not parse it
itself. But, it's needed to look at externaltype and work out what
external remote program to run for LISTCONFIGS.

Note that, while externalUUID is changed to a Maybe UUID, checkExportSupported
used to use NoUUID. The code that now checks for Nothing used to behave
in some undefined way if the external program made requests that
triggered it.

Also, note that in externalSetup, once it generates external,
it parses the RemoteConfig strictly. That generates a
ParsedRemoteConfig, which is thrown away. The reason it's ok to throw
that away, is that, if the strict parse succeeded, the result must be
the same as the earlier, lenient parse.

initremote of an external special remote now runs the program three
times. First for LISTCONFIGS, then EXPORTSUPPORTED, and again
LISTCONFIGS+INITREMOTE. It would not be hard to eliminate at least
one of those, and it should be possible to only run the program once.
2020-01-17 16:07:17 -04:00
Joey Hess
1ce722d86f
avoid relying on crazy monoid instance
This code worked as intended, but only by accident, because of this
instance:

instance Monoid b => Monoid (x -> b) where mempty = const (mempty :: b)

Let's be explicit that we throw away the error message.
2020-01-17 13:49:12 -04:00
Joey Hess
e78bf29725
avoid getting config parser when there is no config to parse
The benefit here is that external special remotes will need a
LISTCONFIGS request and response to generate their config parser,
and this avoids it being done for all the ones that don't have any
configs.

Note that, a config parser could in theory fail to parse if there are no
configs (none currently do), but a parse failure is already thrown away
when generating the remote list because it's too late. Such problems
have to be caught at initremote/enableremote time, not here.
2020-01-17 13:32:48 -04:00
yarikoptic
c1e2389e8e moving under datalad project, since I do not see explicit repronim-specific use case addressed 2020-01-17 17:32:08 +00:00
hans
6eea31acb8 Added a comment 2020-01-16 14:22:07 +00:00
Joey Hess
8017f41476
Merge branch 'master' of ssh://git-annex.branchable.com 2020-01-15 14:16:27 -04:00
Joey Hess
96d434af06
devblog 2020-01-15 14:14:46 -04:00
Joey Hess
987076690c
started on --list-params-for 2020-01-15 14:09:30 -04:00
Joey Hess
ba518c625c
comment 2020-01-15 14:08:58 -04:00
Joey Hess
9c45eca37d
update 2020-01-15 14:08:44 -04:00
Joey Hess
1d711c4378
use "param" not "field" to match man pages 2020-01-15 14:07:05 -04:00
Joey Hess
fa28b51206
fix build of webapp 2020-01-15 13:47:31 -04:00
Ilya_Shlyakhter
f4b5128b69 removed 2020-01-15 17:28:43 +00:00
Joey Hess
b7e37334fe
fix build of assistant 2020-01-15 13:19:02 -04:00
Joey Hess
34975bada8
Merge branch 'master' into remoteconfig 2020-01-15 13:11:20 -04:00
Joey Hess
c20fe23079
remove deleted module 2020-01-15 13:08:39 -04:00
Joey Hess
465ec9dcd7
ported Remote.External
Not yet added anything to the protocol to get a list of remote config
fields; any fields will be accepted and are available for the external
remote to use as before.

There is one minor behavior change.. Before, GETCONFIG could be passed a
field such as type, externaltype, encryption, etc, and would get the
value of that. Now, GETCONFIG only works on fields that don't have a
defined meaning to git-annex, so are passed through to the external
remote. This seems unlikely to affect any external special remotes in
practice.
2020-01-15 13:01:22 -04:00
Joey Hess
6a982e38eb
a few more field functions 2020-01-15 12:57:56 -04:00
Joey Hess
2edf0506a5
a few forgotten remote config fields
preferreddir can be used with any special remote, so its parser needs to
be included in the commonFieldParsers.

initremote with uuid= changed to delete that field, so it does not
need to be included in commonFieldParsers. Note that, existing remotes
initialized before this change will have the field in remote.log.
This will not cause problems parsing, because the value will be
Accepted.

Grepping for 'Accepted "' found these, and I'm pretty sure this is all of
them.
2020-01-15 11:22:36 -04:00
Joey Hess
907ca937ab
use more field functions
Using field functions consistently avoids possibility of typos and also
helps ensure that all fields are added to RemoteConfigParsers (as long
as I have remembered to add them when writing the functions).
2020-01-15 11:15:07 -04:00
Joey Hess
7f2bfd41d7
include credPairRemoteFields in RemoteConfigParsers
Avoids parse error when the fields are added to RemoteConfig at setup
time and it then gets parsed, also at setup time. After setup time, such
internally added fields are not a problem, because they're Accepted. So
it may not be necessary in all cases to list such internally added
fields, but I think it's a good idea to always do so.
2020-01-15 10:57:45 -04:00
Joey Hess
0706d9d093
finish porting S3 2020-01-15 10:52:28 -04:00
peterjhons1212@37e49dc920410e3ff2592014a4d480a71e6d8e60
9c22d4fcb4 2020-01-15 09:35:24 +00:00
Joey Hess
c4ea3ca40a
ported almost all remotes, until my brain melted
external is not started yet, and S3 is part way through and not
compiling yet
2020-01-14 15:41:34 -04:00
Joey Hess
c498269a88
convert configParser to Annex action and add passthrough option
Needed so Remote.External can query the external program for its
configs. When the external program does not support the query,
the passthrough option will make all input fields be available.
2020-01-14 13:52:03 -04:00
Joey Hess
8f142a9279
fix wrong type
Use of Typeable means the type checker can't catch this kind of mistake,
the error is deferred to runtime.

testremote now passes on a directory special remote
2020-01-14 13:05:38 -04:00
Ilya_Shlyakhter
49ad9b06d2 removed 2020-01-14 17:01:33 +00:00
Ilya_Shlyakhter
ddd9eb1157 removed 2020-01-14 16:58:20 +00:00
Ilya_Shlyakhter
33236be1d7 removed 2020-01-14 16:56:23 +00:00
Joey Hess
963239da5c
separate RemoteConfig parsing basically working
Many special remotes are not updated yet and are commented out.
2020-01-14 12:35:08 -04:00
asgardroper9999@1aaf36a247c0e6dcf6a46d246f232024c1fa13fc
25d0c3632d 2020-01-14 11:04:01 +00:00
drakeorba@50df1b43541b82299ffda86e45d9d92b4d6dff51
861872cb12 2020-01-14 10:39:24 +00:00
macchristmas001@3f3c07e6de414d3d408af6907ac2fd329d697460
56b7af71d1 2020-01-14 09:35:01 +00:00
kyle
76aa98ce83 Added a comment: re: what am I doing wrong? 2020-01-14 03:19:22 +00:00
yarikoptic
0fa983803f Added a comment: what am I doing wrong? 2020-01-13 20:05:40 +00:00
yarikoptic
803722bb2d Added a comment: preferred way to automate population of the cache upon get 2020-01-13 19:01:11 +00:00