Joey Hess [Wed, 22 Jan 2020 16:39:55 +0000 (12:39 -0400)]
comment
Joey Hess [Wed, 22 Jan 2020 15:39:15 +0000 (11:39 -0400)]
avoid ugly error message
Http remotes that do expose a git config file, but are not initialized
resulted in an ugly and unncessary error message, now sqelched.
When git-annex-shell configlist is run w/o the autoinit field, it may
not generate a uuid for the repository. So in that case, it's not
unexpected for the config it does list to not include a UUID, and
dumping out the config in a warning message is not needed.
If configlist is asked to autoinit and we don't get back a config with a
UUID in it, that suggests some problem, and what we got back may not be
a config at all but some diagnostic message, so it does make sense to
output it then.
Joey Hess [Tue, 21 Jan 2020 18:36:29 +0000 (14:36 -0400)]
comment
dxld [Tue, 21 Jan 2020 11:53:26 +0000 (11:53 +0000)]
Joey Hess [Mon, 20 Jan 2020 21:04:45 +0000 (17:04 -0400)]
--whatelse is a better name than --describe-other-params
The use case is basically the user having forgotten, so --help would be
best, but it would be quite hard to include this in --help, since it may
even have to spin up an external special remote program.
I also considered --umm but typoed it the first time I tried it as
--uum, and while memorable, it's too cutesy. --whatelse is good because
it explicitly asks, what other params, besides the ones I've given?
Joey Hess [Mon, 20 Jan 2020 20:59:57 +0000 (16:59 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Mon, 20 Jan 2020 20:56:34 +0000 (16:56 -0400)]
fix --describe-other-params of external when encryption is not specified
Encryption not being specified makes lenientRemoteConfigParser fail
to parse, and so it was not able to start the external up to get
LISTCONFIGS.
Joey Hess [Mon, 20 Jan 2020 20:23:35 +0000 (16:23 -0400)]
include passthrough params in --describe-other-params
Joey Hess [Mon, 20 Jan 2020 20:05:51 +0000 (16:05 -0400)]
initremote --describe-other-params
Does not yet include descriptions from external special remote programs.
Joey Hess [Mon, 20 Jan 2020 19:21:05 +0000 (15:21 -0400)]
Merge branch 'remoteconfig'
Joey Hess [Mon, 20 Jan 2020 19:20:04 +0000 (15:20 -0400)]
add descriptions for all remote config fields
not yet used
Joey Hess [Mon, 20 Jan 2020 19:13:49 +0000 (15:13 -0400)]
gcrypt inherits shellescape setting from rsync, allow it
Joey Hess [Mon, 20 Jan 2020 17:49:30 +0000 (13:49 -0400)]
convert RemoteConfigFieldParser to data type
bastibe [Mon, 20 Jan 2020 14:57:04 +0000 (14:57 +0000)]
timothe [Fri, 17 Jan 2020 22:47:50 +0000 (22:47 +0000)]
Joey Hess [Fri, 17 Jan 2020 21:30:09 +0000 (17:30 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Fri, 17 Jan 2020 21:23:19 +0000 (17:23 -0400)]
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.
Joey Hess [Fri, 17 Jan 2020 21:18:44 +0000 (17:18 -0400)]
done
Joey Hess [Fri, 17 Jan 2020 21:13:44 +0000 (17:13 -0400)]
always add the specialRemoteConfigParsers
Was not being added in some places, resulting in error messages about
encryption not being a valid field.
Joey Hess [Fri, 17 Jan 2020 21:11:55 +0000 (17:11 -0400)]
avoid adding parsers for fields that already have a parser
Joey Hess [Fri, 17 Jan 2020 21:09:56 +0000 (17:09 -0400)]
bugfixes
getRemoteConfigPassedThrough was never returning anything, Typeable
prevented the type checker from noticing a dumb mistake.
parseRemoteConfig was not adding Accepted values as PassedThrough
Joey Hess [Fri, 17 Jan 2020 19:30:14 +0000 (15:30 -0400)]
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.
Joey Hess [Fri, 17 Jan 2020 17:49:12 +0000 (13:49 -0400)]
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.
Joey Hess [Fri, 17 Jan 2020 17:32:48 +0000 (13:32 -0400)]
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.
yarikoptic [Fri, 17 Jan 2020 17:32:08 +0000 (17:32 +0000)]
moving under datalad project, since I do not see explicit repronim-specific use case addressed
hans [Thu, 16 Jan 2020 14:22:07 +0000 (14:22 +0000)]
Added a comment
Joey Hess [Wed, 15 Jan 2020 18:16:27 +0000 (14:16 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Wed, 15 Jan 2020 18:14:46 +0000 (14:14 -0400)]
devblog
Joey Hess [Wed, 15 Jan 2020 18:09:30 +0000 (14:09 -0400)]
started on --list-params-for
Joey Hess [Wed, 15 Jan 2020 18:08:58 +0000 (14:08 -0400)]
comment
Joey Hess [Wed, 15 Jan 2020 18:08:44 +0000 (14:08 -0400)]
update
Joey Hess [Wed, 15 Jan 2020 18:07:05 +0000 (14:07 -0400)]
use "param" not "field" to match man pages
Joey Hess [Wed, 15 Jan 2020 17:47:31 +0000 (13:47 -0400)]
fix build of webapp
Ilya_Shlyakhter [Wed, 15 Jan 2020 17:28:43 +0000 (17:28 +0000)]
removed
Joey Hess [Wed, 15 Jan 2020 17:19:02 +0000 (13:19 -0400)]
fix build of assistant
Joey Hess [Wed, 15 Jan 2020 17:11:20 +0000 (13:11 -0400)]
Merge branch 'master' into remoteconfig
Joey Hess [Wed, 15 Jan 2020 17:08:39 +0000 (13:08 -0400)]
remove deleted module
Joey Hess [Wed, 15 Jan 2020 17:01:22 +0000 (13:01 -0400)]
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.
Joey Hess [Wed, 15 Jan 2020 15:30:45 +0000 (11:30 -0400)]
a few more field functions
Joey Hess [Wed, 15 Jan 2020 15:22:36 +0000 (11:22 -0400)]
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.
Joey Hess [Wed, 15 Jan 2020 15:05:07 +0000 (11:05 -0400)]
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).
Joey Hess [Wed, 15 Jan 2020 14:57:45 +0000 (10:57 -0400)]
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.
Joey Hess [Wed, 15 Jan 2020 14:52:28 +0000 (10:52 -0400)]
finish porting S3
Joey Hess [Tue, 14 Jan 2020 19:41:34 +0000 (15:41 -0400)]
ported almost all remotes, until my brain melted
external is not started yet, and S3 is part way through and not
compiling yet
Joey Hess [Tue, 14 Jan 2020 17:18:15 +0000 (13:18 -0400)]
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.
Joey Hess [Tue, 14 Jan 2020 17:05:38 +0000 (13:05 -0400)]
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
Ilya_Shlyakhter [Tue, 14 Jan 2020 17:01:33 +0000 (17:01 +0000)]
removed
Ilya_Shlyakhter [Tue, 14 Jan 2020 16:58:20 +0000 (16:58 +0000)]
removed
Ilya_Shlyakhter [Tue, 14 Jan 2020 16:56:23 +0000 (16:56 +0000)]
removed
Joey Hess [Tue, 14 Jan 2020 16:35:08 +0000 (12:35 -0400)]
separate RemoteConfig parsing basically working
Many special remotes are not updated yet and are commented out.
kyle [Tue, 14 Jan 2020 03:19:22 +0000 (03:19 +0000)]
Added a comment: re: what am I doing wrong?
yarikoptic [Mon, 13 Jan 2020 20:05:40 +0000 (20:05 +0000)]
Added a comment: what am I doing wrong?
yarikoptic [Mon, 13 Jan 2020 19:01:11 +0000 (19:01 +0000)]
Added a comment: preferred way to automate population of the cache upon `get`
Joey Hess [Mon, 13 Jan 2020 17:22:43 +0000 (13:22 -0400)]
Joey Hess [Mon, 13 Jan 2020 17:22:31 +0000 (13:22 -0400)]
Joey Hess [Mon, 13 Jan 2020 17:22:02 +0000 (13:22 -0400)]
Joey Hess [Mon, 13 Jan 2020 17:21:41 +0000 (13:21 -0400)]
Joey Hess [Mon, 13 Jan 2020 17:21:24 +0000 (13:21 -0400)]
Joey Hess [Mon, 13 Jan 2020 17:17:17 +0000 (13:17 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Mon, 13 Jan 2020 17:16:48 +0000 (13:16 -0400)]
devblog
Joey Hess [Mon, 13 Jan 2020 16:35:39 +0000 (12:35 -0400)]
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.)
AdamSpiers [Mon, 13 Jan 2020 00:25:27 +0000 (00:25 +0000)]
add missing backtick
Joey Hess [Fri, 10 Jan 2020 18:53:00 +0000 (14:53 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Fri, 10 Jan 2020 18:10:20 +0000 (14:10 -0400)]
be stricter about rejecting invalid configurations for remotes
This is a first step toward that goal, using the ProposedAccepted type
in RemoteConfig lets initremote/enableremote reject bad parameters that
were passed in a remote's configuration, while avoiding enableremote
rejecting bad parameters that have already been stored in remote.log
This does not eliminate every place where a remote config is parsed and a
default value is used if the parse false. But, I did fix several
things that expected foo=yes/no and so confusingly accepted foo=true but
treated it like foo=no. There are still some fields that are parsed with
yesNo but not not checked when initializing a remote, and there are other
fields that are parsed in other ways and not checked when initializing a
remote.
This also lays groundwork for rejecting unknown/typoed config keys.
Added a comment: using hardlinks
Joey Hess [Fri, 10 Jan 2020 14:47:59 +0000 (10:47 -0400)]
2020
https://christian.amsuess.com/chrysn [Fri, 10 Jan 2020 08:41:20 +0000 (08:41 +0000)]
Added a comment: Summary; Application: shared thumbnails
Joey Hess [Thu, 9 Jan 2020 20:54:11 +0000 (16:54 -0400)]
comment
https://christian.amsuess.com/chrysn [Thu, 9 Jan 2020 13:26:09 +0000 (13:26 +0000)]
notes on my recovery from a bad merge
Joey Hess [Wed, 8 Jan 2020 18:26:48 +0000 (14:26 -0400)]
comment
Joey Hess [Wed, 8 Jan 2020 18:25:26 +0000 (14:25 -0400)]
response
Joey Hess [Wed, 8 Jan 2020 18:24:10 +0000 (14:24 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com
Ilya_Shlyakhter [Wed, 8 Jan 2020 16:16:32 +0000 (16:16 +0000)]
Added a comment: git-annex in docker on Windows
anarcat [Wed, 8 Jan 2020 15:30:51 +0000 (15:30 +0000)]
fix a transcription error - to disable a remote, we set ignore to true, not false!
Added a comment: WSL 1/2 experience
Added a comment
undral [Wed, 8 Jan 2020 00:17:47 +0000 (00:17 +0000)]
removed
undral [Wed, 8 Jan 2020 00:17:14 +0000 (00:17 +0000)]
Added a comment: hi
Joey Hess [Tue, 7 Jan 2020 20:10:57 +0000 (16:10 -0400)]
generalize docs so they will also work when git uses SHA256
Joey Hess [Tue, 7 Jan 2020 19:33:29 +0000 (15:33 -0400)]
response
Joey Hess [Tue, 7 Jan 2020 19:28:20 +0000 (15:28 -0400)]
response
Added a comment: prior research
Joey Hess [Tue, 7 Jan 2020 18:27:53 +0000 (14:27 -0400)]
plan
Joey Hess [Tue, 7 Jan 2020 17:26:14 +0000 (13:26 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Tue, 7 Jan 2020 16:29:37 +0000 (12:29 -0400)]
use --no-abbrev instead of --abbrev=40
This avoids hardcoding the sha size, so when git uses sha256, it will
output the full sha256 and not a truncation to 40 characters.
I reviewed git's history, and while there have been some
bugs with commands not supporting --no-abbrev (eg git diff --no-index
--no-abbrev was broken in git 2.1), none of the commands git-annex
uses will be impacted by those old bugs.
Joey Hess [Tue, 7 Jan 2020 15:35:17 +0000 (11:35 -0400)]
support sha256 git repos
Git will eventually switch to sha2 and there will not be one single
shaSize anymore, but two (40 and 64).
Changed all parsers for git plumbing output to support both sizes of
shas.
One potential problem this does not deal with is, if somewhere in
git-annex it reads two shas from different sources, and compares them
to see if they're the same sha, it would fail if they're sha1 and sha256
of the same value. I don't know if that will really be a concern.
spwhitton [Tue, 7 Jan 2020 12:29:49 +0000 (12:29 +0000)]
Added a comment
Joey Hess [Mon, 6 Jan 2020 19:40:48 +0000 (15:40 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Mon, 6 Jan 2020 19:39:50 +0000 (15:39 -0400)]
comment
Joey Hess [Mon, 6 Jan 2020 19:35:11 +0000 (15:35 -0400)]
fix typo in close