Commit graph

36282 commits

Author SHA1 Message Date
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
Joey Hess
31a03aa6af
Revert spam
This reverts commit c4a33d15b5.
2020-01-13 13:22:43 -04:00
Joey Hess
2ae241cddb
Revert spam
This reverts commit a1261c5f36.
2020-01-13 13:22:31 -04:00
Joey Hess
9cd8922fe5
Revert spam
This reverts commit 1c5edbd823.
2020-01-13 13:22:02 -04:00
Joey Hess
ee393c49e4
Revert spam
This reverts commit a746c210cc.
2020-01-13 13:21:41 -04:00
Joey Hess
37c9958ee8
Revert spam
This reverts commit fa7c78c31d.
2020-01-13 13:21:24 -04:00
Joey Hess
5c31e5ac72
Merge branch 'master' of ssh://git-annex.branchable.com 2020-01-13 13:17:17 -04:00
Joey Hess
4a01cd74b0
devblog 2020-01-13 13:16:48 -04:00
Joey Hess
71f78fe45d
wip separate RemoteConfig parsing
Remote now contains a ParsedRemoteConfig. The parsing happens when the
Remote is constructed, rather than when individual configs are used.

This is more efficient, and it lets initremote/enableremote
reject configs that have unknown fields or unparsable values.

It also allows for improved type safety, as shown in
Remote.Helper.Encryptable where things that used to match on string
configs now match on data types.

This is a work in progress, it does not build yet.

The main risk in this conversion is forgetting to add a field to
RemoteConfigParser. That will prevent using that field with
initremote/enableremote, and will prevent remotes that already are set
up from seeing that configuration. So will need to check carefully that
every field that getRemoteConfigValue is called on has been added to
RemoteConfigParser.

(One such case I need to remember is that credPairRemoteField needs to be
included in the RemoteConfigParser.)
2020-01-13 12:39:21 -04:00
peterjhons1212@37e49dc920410e3ff2592014a4d480a71e6d8e60
fa7c78c31d 2020-01-13 12:14:38 +00:00
sr0665047@eb63f1dba8c3fd8df62fe41387eb4deeb0f8dd89
a746c210cc 2020-01-13 09:26:09 +00:00
diana.roger100@4fe4714d78b74795de56915fc7fb924f444963fa
1c5edbd823 2020-01-13 06:39:11 +00:00
diana.roger100@4fe4714d78b74795de56915fc7fb924f444963fa
a1261c5f36 2020-01-13 06:29:14 +00:00
diana.roger100@4fe4714d78b74795de56915fc7fb924f444963fa
c4a33d15b5 2020-01-13 06:28:07 +00:00
AdamSpiers
5aef27d825 add missing backtick 2020-01-13 00:25:27 +00:00
Joey Hess
4a135934ff
Merge branch 'master' of ssh://git-annex.branchable.com 2020-01-10 14:53:00 -04:00