Commit graph

38051 commits

Author SHA1 Message Date
Joey Hess
d89984b121
sync --all avoid unncessary first pass
Sped up seeking to around twice as fast, by avoiding a pass over the
worktree files when preferred content expressions of the local repo and
remotes don't use include=/exclude=.

Thanks to Lukey for identifying the optimisation.

This commit was sponsored by Brock Spratlen on Patreon.
2020-09-24 15:12:09 -04:00
yarikoptic
12f8d42a23 Added a comment 2020-09-24 18:49:06 +00:00
Joey Hess
b45b37b088
wait for first pass to complete before second pass
Otherwise the bloom filter may not be fully populated when the second
pass starts, which could have led to incorrect behavior with --all -J,
probably in very rare circumstances.
2020-09-24 14:23:25 -04:00
Joey Hess
167da965b9
remove obsolete comment 2020-09-24 14:22:56 -04:00
Joey Hess
c1b4d76e6b
make MatchFiles introspectable
matchNeedsFileContent is not used yet, but shows how to add information
about terminals. That one would be needed for
https://git-annex.branchable.com/todo/sync_fast_import/

Note the tricky bit in Annex.FileMatcher.call where it folds over the
included matcher to propagate the information.

This commit was sponsored by Svenne Krap on Patreon.
2020-09-24 14:01:53 -04:00
Joey Hess
6d95361f35
add meta todo 2020-09-24 12:54:54 -04:00
Joey Hess
4d4f963c46
Merge branch 'master' of ssh://git-annex.branchable.com into master 2020-09-24 12:42:32 -04:00
Joey Hess
68f9766544
Improve --debug output to show pid of processes that are started and stopped
getPid returns Nothing if the process has already been stopped, and in that
case, the pid will not be displayed. I think that would only happen if
waitForProcess or similar gets called more than once on the same process
handle though.

getPid on unix has an overhead of only a MVar read. On Windows it needs to
make a syscall, so will be probably more expensive. While the added expense
happens even when debug logging is disabled, it should be small enough
compared with the overhead of starting a process that it's not a problem.

(It does occur to me that a debugM that took an IO String could only run it
when debugging is really enabled, which would improve performance. It does
not seem possible to use the current hslogger interface to do that though;
it does not expose the information that would be needed.)
2020-09-24 12:39:57 -04:00
Lukey
221b47162d 2020-09-24 16:36:12 +00:00
yarikoptic
661fdbf51e Added a comment: is -J shared between workers and ASYNC or "multipliticative"? 2020-09-24 15:37:21 +00:00
yarikoptic
9e033f3001 initial TODO for making failure messages for processes be more informative 2020-09-23 13:03:38 +00:00
Joey Hess
6a5e0cbfc7
Improve the "Try making some of these repositories available" message
With some hints for the user for what to do.

Took care to avoid changing the json output. It would have been ok to add
the new separated lists to it, in addition to the old list, but I didn't
do that because I didn't see much point.
2020-09-22 14:10:30 -04:00
Joey Hess
5cfcf1f05f
cache remote.log
Unlikely to speed up any of the existing uses much, but I want to use it
in a message that might be displayed many times.
2020-09-22 13:52:26 -04:00
Joey Hess
ebdce707da
fix typo 2020-09-22 13:26:49 -04:00
Joey Hess
361ef19999
wording 2020-09-22 12:39:33 -04:00
Joey Hess
41044de833
comment 2020-09-22 12:24:22 -04:00
achilleas.k@14be77d42a1252fab5ec9dbf4e5ea03c5833e8c8
c084bf7a31 Added a comment 2020-09-21 14:42:03 +00:00
kyle
8ae39dc930 Added a comment 2020-09-21 14:38:26 +00:00
achilleas.k@14be77d42a1252fab5ec9dbf4e5ea03c5833e8c8
88729cbfeb 2020-09-21 14:15:18 +00:00
NicholasLee
ed04443d36 Added a comment 2020-09-21 00:24:32 +00:00
Ilya_Shlyakhter
7768406d49 Added a comment: history of annexed file 2020-09-20 21:58:45 +00:00
NicholasLee
7108ff5933 Added a comment 2020-09-20 02:28:11 +00:00
yarikoptic
c44cd27520 Added a comment 2020-09-18 20:11:27 +00:00
Joey Hess
3457b526ef
make git-annex add --no-check-gitignore not skip ignored files, same as with --force 2020-09-18 13:33:35 -04:00
Joey Hess
46a7fcef0d
close 2020-09-18 13:21:32 -04:00
Joey Hess
186c3827d0
comment 2020-09-18 13:21:00 -04:00
Joey Hess
d0b06c17c0
Added --no-check-gitignore option for finer grained control than using --force.
add, addurl, importfeed, import: Added --no-check-gitignore option
for finer grained control than using --force.

(--force is used for too many different things, and at least one
of these also uses it for something else. I would like to reduce
--force's footprint until it only forces drops or a few other data
losses. For now, --force still disables checking ignores too.)

addunused: Don't check .gitignores when adding files. This is a behavior
change, but I justify it by analogy with git add of a gitignored file
adding it, asking to add all unused files back should add them all back,
not skip some. The old behavior was surprising.

In Command.Lock and Command.ReKey, CheckGitIgnore False does not change
behavior, it only makes explicit what is done. Since these commands are run
on annexed files, the file is already checked into git, so git add won't
check ignores.
2020-09-18 13:19:13 -04:00
Joey Hess
500454935f
comment 2020-09-18 12:08:11 -04:00
Joey Hess
956ff1350a
Merge branch 'master' of ssh://git-annex.branchable.com into master 2020-09-18 12:00:12 -04:00
Joey Hess
81a38df5a7
add missing CHECKURL-FAILURE ErrorMsg to docs 2020-09-18 11:58:18 -04:00
yarikoptic
b48acde47d some whining about check-ignore 2020-09-18 15:30:23 +00:00
yarikoptic
f913822c03 initial todo to add ErrorMsg to all -FAILURE responses 2020-09-17 23:39:42 +00:00
Joey Hess
922621301a
Serialize use of C magic library, which is not thread safe.
This fixes failures uploading to S3 when using -J.

This commit was sponsored by Denis Dzyubenko on Patreon.
2020-09-17 17:27:42 -04:00
Joey Hess
59f5d6509c
comment 2020-09-17 17:19:58 -04:00
Joey Hess
d293c0bced
improve this comment 2020-09-17 17:19:45 -04:00
https://christian.amsuess.com/chrysn
b301a64aa2 Added a comment: Re: comment 1 2020-09-17 20:42:12 +00:00
Joey Hess
f2cdacdb68
reproduced, some tcpdump analysis 2020-09-17 16:23:29 -04:00
Joey Hess
16c05c176c
comment 2020-09-17 14:26:16 -04:00
https://christian.amsuess.com/chrysn
7749b2278b Added a comment: update 2020-09-17 14:57:54 +00:00
https://christian.amsuess.com/chrysn
0d8f6e70f5 document bug i ran into early while exploring httpalso 2020-09-17 14:43:49 +00:00
Joey Hess
83df401d93
Merge branch 'batchasync' into master 2020-09-16 13:02:58 -04:00
Joey Hess
10f9107c1b
close 2020-09-16 13:02:35 -04:00
Joey Hess
38e9fc0161
tip documenting mostly --batch --json including with -J 2020-09-16 13:00:47 -04:00
Joey Hess
b6642dde8a
avoid interleaving command stages with Concurrency 1
Before, -J1 was different than no -J: It makes concurrent-output be used
for display, and it actually can run concurrent jobs in some situations.
Eg, a perform stage and a cleanup stage can both run.

dupState is used in several places, and changes NonConcurrent to
Concurrent 1. My concern is that this might, in some case, enable
that concurrent behavior. And in particular, that it might get enabled in
--batch mode, when the user is not expecting concurrent output because
they did not pass -J.

While I don't have a test case where that happens and causes out of
order output, it looks like it could, and so prudent to make this change.
2020-09-16 12:10:45 -04:00
Joey Hess
877ef84a1b
support --batch -J
--batch combined with -J now runs batch requests concurrently for many
commands. Before, the combination was accepted, but did not enable
concurrency. Since the output of batch requests can be in any order, --json
with the new "input" field is recommended to be used, to determine which
batch request each response corresponds to.

If --json is not used, batch mode still runs concurrently, using the usual
concurrent-output. That will not be very useful for most batch mode users,
probably, but who knows.

If a program was using --batch -J before, and was parsing non-json output,
this could break it. But, it was relying on git-annex not supporting
concurrency despite it being enabled, so it should have expected concurrent
output. So, I think that's ok.

annex.jobs does not enable concurrency in --batch mode, because that would
confuse programs that use --batch but don't expect concurrency.
2020-09-16 12:10:37 -04:00
Joey Hess
77c42782d0
differentiate between concurrency enabled at command line and by git config
The latter should not affect --batch mode.
2020-09-16 11:47:12 -04:00
Joey Hess
8471df3b6d
rename Configurable for clarity 2020-09-16 11:16:48 -04:00
Joey Hess
7a4f3ff345
remove callCommandAction'
This is prep for making batchCommandAction use commandAction,
which will enable concurrency for batch mode. Since commandAction can't
return anything, have to handle the case of a CommandStart that chooses
to do nothing in a different way.
2020-09-16 10:53:16 -04:00
Joey Hess
7b4c7a7ffc
refactor
batchStart folded into only caller
2020-09-16 10:18:36 -04:00
Joey Hess
d677a30d54
comment 2020-09-15 16:41:01 -04:00