Joey Hess [Wed, 9 Dec 2020 16:43:38 +0000 (12:43 -0400)]
fix build failure by avoiding refutable pattern match
Joey Hess [Wed, 9 Dec 2020 16:35:17 +0000 (12:35 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Wed, 9 Dec 2020 16:32:29 +0000 (12:32 -0400)]
move new interface to git-annex transfer
This is to avoid breakage when upgrading or downgrading git-annex with a
process running that uses the interface. It's better to keep the
compatability code for a few years than worry about such breakage.
This commit was sponsored by Brett Eisenberg on Patreon.
jwodder [Wed, 9 Dec 2020 14:11:07 +0000 (14:11 +0000)]
Correct author
jwodder [Wed, 9 Dec 2020 14:09:47 +0000 (14:09 +0000)]
Joey Hess [Tue, 8 Dec 2020 19:55:00 +0000 (15:55 -0400)]
reword
Joey Hess [Tue, 8 Dec 2020 19:46:09 +0000 (15:46 -0400)]
update
Joey Hess [Tue, 8 Dec 2020 19:23:43 +0000 (15:23 -0400)]
Merge branch 'message-serialization'
Joey Hess [Tue, 8 Dec 2020 19:22:18 +0000 (15:22 -0400)]
stall detection is working
New config annex.stalldetection, remote.name.annex-stalldetection, which
can be used to deal with remotes that stall during transfers, or are
sometimes too slow to want to use.
This commit was sponsored by Luke Shumaker on Patreon.
Joey Hess [Tue, 8 Dec 2020 19:20:05 +0000 (15:20 -0400)]
reminder for later
Joey Hess [Tue, 8 Dec 2020 19:17:35 +0000 (15:17 -0400)]
add todo
Not going to do this yet, so remember for later.
Joey Hess [Tue, 8 Dec 2020 16:51:56 +0000 (12:51 -0400)]
avoid parseDuration succeeding on empty string
Joey Hess [Tue, 8 Dec 2020 15:43:06 +0000 (11:43 -0400)]
add killTransferrer
There is redundant code in the assistant that does the same thing,
but that code uses a PID, not a ProcessHandle, and gets the PID from,
apparently, the TransferInfo transferPid (although I can't seem to find
where that gets set on non-windows).
Joey Hess [Tue, 8 Dec 2020 14:53:07 +0000 (10:53 -0400)]
rename
Joey Hess [Mon, 7 Dec 2020 20:56:41 +0000 (16:56 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Mon, 7 Dec 2020 20:55:07 +0000 (16:55 -0400)]
annex.stalldetection docs
Not implemented yet.
This commit was sponsored by Svenne Krap on Patreon.
Joey Hess [Mon, 7 Dec 2020 20:54:57 +0000 (16:54 -0400)]
devblog
Joey Hess [Mon, 7 Dec 2020 20:11:29 +0000 (16:11 -0400)]
finally using transferkeys
Seems to work! Even progress bars. Have not tested prompting or various
error message displays yet.
transferkeys had to be made to operate in different modes for the
Assistant and Annex monads. A bit ugly, but it did relegate that
really ugly Database.Keys.closeDb in transferkeys to only the assistant
code path.
This commit was sponsored by Noam Kremen.
Joey Hess [Mon, 7 Dec 2020 18:44:21 +0000 (14:44 -0400)]
refactoring
This is groundwork for using git-annex transferkeys to run transfers,
in order to allow stalled transfers to be interrupted and retried.
The new upload and download are closer to what git-annex transferkeys
does, so the plan is to make them use it.
Then things that were left using upload' and download' won't recover
from stalls. Notably, that includes import and export. But
at least get/move/copy will be able to. (Also the assistant hopefully,
but not yet.)
This commit was sponsored by Jake Vosloo on Patreon.
yarikoptic [Mon, 7 Dec 2020 18:23:28 +0000 (18:23 +0000)]
added datalad project tag
jwodder [Mon, 7 Dec 2020 17:36:34 +0000 (17:36 +0000)]
Joey Hess [Mon, 7 Dec 2020 17:33:14 +0000 (13:33 -0400)]
Merge branch 'master' into message-serialization
Joey Hess [Mon, 7 Dec 2020 17:08:59 +0000 (13:08 -0400)]
move TransferrerPool from Assistant state to Annex state
This commit was sponsored by Graham Spencer on Patreon.
Joey Hess [Mon, 7 Dec 2020 16:50:48 +0000 (12:50 -0400)]
move TransferrerPool from assistant
This old code will now be useful for git-annex beyond the assistant.
git-annex won't use the CheckTransferrer part, and won't run transferkeys
as a batch process, and will want withTransferrer to not shut down
transferkeys processes. Still, the rest of this is a good fit for what I
need now.
Also removed some dead code, and simplified a little bit.
This commit was sponsored by Mark Reidenbach on Patreon.
Lukey [Sat, 5 Dec 2020 13:07:31 +0000 (13:07 +0000)]
Added a comment
Joey Hess [Sat, 5 Dec 2020 03:52:33 +0000 (23:52 -0400)]
reword
Joey Hess [Sat, 5 Dec 2020 03:49:23 +0000 (23:49 -0400)]
correction
Joey Hess [Sat, 5 Dec 2020 03:44:49 +0000 (23:44 -0400)]
typo
Joey Hess [Sat, 5 Dec 2020 03:43:14 +0000 (23:43 -0400)]
clarify
Joey Hess [Sat, 5 Dec 2020 03:41:44 +0000 (23:41 -0400)]
simplify
Joey Hess [Sat, 5 Dec 2020 03:38:42 +0000 (23:38 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Sat, 5 Dec 2020 03:36:52 +0000 (23:36 -0400)]
update
eric.w@eee65cd362d995ced72640c7cfae388ae93a4234 [Sat, 5 Dec 2020 00:43:43 +0000 (00:43 +0000)]
eric.w@eee65cd362d995ced72640c7cfae388ae93a4234 [Sat, 5 Dec 2020 00:42:42 +0000 (00:42 +0000)]
kyle [Fri, 4 Dec 2020 21:05:25 +0000 (21:05 +0000)]
bug: alwayscommit=false on windows
Joey Hess [Fri, 4 Dec 2020 19:46:46 +0000 (15:46 -0400)]
reword
Joey Hess [Fri, 4 Dec 2020 19:45:37 +0000 (15:45 -0400)]
fix link
Joey Hess [Fri, 4 Dec 2020 19:43:03 +0000 (15:43 -0400)]
devblog
Joey Hess [Fri, 4 Dec 2020 19:01:12 +0000 (15:01 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Fri, 4 Dec 2020 19:00:49 +0000 (15:00 -0400)]
update
Joey Hess [Fri, 4 Dec 2020 18:54:09 +0000 (14:54 -0400)]
support prompt in message serialization
That seems to be the last thing needed for message serialization.
Although it's only used in the assistant currently, so hard to tell if I
forgot something.
At this point, it should be possible to start using transferkeys
when performing transfers, which will allow killing a transferkeys
process if a transfer times out or stalls. But that's for another day.
This commit was sponsored by Ethan Aubin.
Joey Hess [Fri, 4 Dec 2020 17:55:49 +0000 (13:55 -0400)]
Merge branch 'master' into message-serialization
Joey Hess [Fri, 4 Dec 2020 17:54:33 +0000 (13:54 -0400)]
switch back to POSIXTime
turned out not to need Read MeterState
Joey Hess [Fri, 4 Dec 2020 17:50:03 +0000 (13:50 -0400)]
finish message serialization of progress meters
Any given transfer can only display 1 progress meter at a time, or so
this code assumes. In some cases, there are progress meters for
different stages of a transfer, perhaps, and that is supported by this.
This commit was sponsored by Ethan Aubin.
Joey Hess [Fri, 4 Dec 2020 17:07:30 +0000 (13:07 -0400)]
generalize to allow running in Assistant monad
Joey Hess [Fri, 4 Dec 2020 16:20:04 +0000 (12:20 -0400)]
fix problem with last commit and assistant
liftAnnex blocks all others calls, so avoid using it with a long-duration
call to readResponse.
Joey Hess [Fri, 4 Dec 2020 04:00:40 +0000 (00:00 -0400)]
idea
Joey Hess [Thu, 3 Dec 2020 20:29:22 +0000 (16:29 -0400)]
mention new branch
Joey Hess [Thu, 3 Dec 2020 20:21:20 +0000 (16:21 -0400)]
new protocol for transferkeys, with message serialization
Necessarily threw out the old protocol, so if an old git-annex assistant
is running, and starts a transferkeys from the new git-annex, it would
fail. But, that seems unlikely; the assistant starts up transferkeys
processes and then keeps them running. Still, may need to test that
scenario.
The new protocol is simple read/show and looks like this:
TransferRequest Download (Right "origin") (Key {keyName = "
f8f8766a836fb6120abf4d5328ce8761404e437529e997aaa0363bdd4fecd7bb", keyVariety = SHA2Key (HashSize 256) (HasExt True), keySize = Just 30, keyMtime = Nothing, keyChunkSize = Nothing, keyChunkNum = Nothing}) (AssociatedFile (Just "foo"))
TransferOutput (ProgressMeter (Just 30) (MeterState {meterBytesProcessed = BytesProcessed 0, meterTimeStamp = 1.
6070268727892535e9}) (MeterState {meterBytesProcessed = BytesProcessed 30, meterTimeStamp = 1.
6070268728043e9}))
TransferOutput (OutputMessage "(checksum...) ")
TransferResult True
Granted, this is not optimally fast, but it seems good enough, and is
probably nearly as fast as the old protocol anyhow.
emitSerializedOutput for ProgressMeter is not yet implemented. It needs
to somehow start or update a progress meter. There may need to be a new
message that allocates a progress meter, and then have ProgressMeter
update it.
This commit was sponsored by Ethan Aubin
Joey Hess [Thu, 3 Dec 2020 18:57:22 +0000 (14:57 -0400)]
comments
Joey Hess [Thu, 3 Dec 2020 18:47:04 +0000 (14:47 -0400)]
when serializing messages, include json objects
This is done always, it's up to the comsumer to decide if it wants to
output the json objects or the messages.
Messages.JSON.finalize changed to not need a JSONOptions.
As far as I can see, this does not change its behavior,
since addErrorMessage appends to any list that's already there.
This commit was sponsored by Ethan Aubin.
Joey Hess [Thu, 3 Dec 2020 17:01:28 +0000 (13:01 -0400)]
start on serializing Messages
Json objects not yet handled, and some other special cases, but this is
the bulk of the messages.
For progress meters, POSIXTime does not have a Read instance (or a
suitable Show instance), so had to switch to using a Double for progress
meters.
This commit was sponsored by Ethan Aubin on Patreon.
Added a comment: Windows 10 NTFS hardlinks not working
Lukey [Thu, 3 Dec 2020 07:38:31 +0000 (07:38 +0000)]
Added a comment
removed
Added a comment
Added a comment
Joey Hess [Wed, 2 Dec 2020 18:57:43 +0000 (14:57 -0400)]
remove uses of warningIO
It's not concurrent-output safe, and doesn't support
--json-error-messages.
Using Annex.makeRunner is a bit scary, because what if it's run in a
different thread from an active annex action? Normally the same Annex
state is not used concurrently in several threads, and it's not designed
to be fully concurrency safe. (Annex.Concurrent exists to deal with
that.) I think it will be ok in these simple cases though. Eg,
when buffering a warning message to json, Annex.changeState is used,
and it modifies the MVar in a concurrency safe way.
The only warningIO remaining is not a problem.
Joey Hess [Wed, 2 Dec 2020 18:31:24 +0000 (14:31 -0400)]
design work
falsifian [Wed, 2 Dec 2020 16:52:10 +0000 (16:52 +0000)]
Added a comment
basak [Wed, 2 Dec 2020 02:12:59 +0000 (02:12 +0000)]
Added a comment
https://launchpad.net/~barthelemy [Tue, 1 Dec 2020 21:55:31 +0000 (21:55 +0000)]
Added a comment
Joey Hess [Tue, 1 Dec 2020 20:05:55 +0000 (16:05 -0400)]
improve p2p protocol handling of requested object not available
Avoid spurious "verification of content failed" message when downloading
content from a ssh or tor remote fails due to the remote no longer having a
copy of the content.
The P2P protocol already handled this case by sending DATA 0, followed by
VALID. But VALID was not really right, because the data is not the
requested data. So, send DATA 0, followed by INVALID. Old versions of
git-annex handle INVALID the same as VALID in this case. Now new versions
avoid displaying an incorrect message.
It would be better for the P2P protocol to have a different way to indicate
this, like perhaps sending INVALID without DATA. But that would be a
breaking change and need a new protocol verison. Since INVALID already is
part of the protocol and already needs to be handled, using it for this
special case too seems ok, and avoids the complication of another protocol
version.
This commit was sponsored by Jochen Bartl on Patreon.
Joey Hess [Tue, 1 Dec 2020 19:39:57 +0000 (15:39 -0400)]
add show instance
Joey Hess [Tue, 1 Dec 2020 19:39:22 +0000 (15:39 -0400)]
avoid hGetMetered 0 closing the handle
This is an edge case, which happened to be triggered by the P2P protocol
seeing DATA 0. When reading 0 bytes, getting an empty string does
not mean the handle has reached EOF.
I verified there was in fact a bug, where get of an empty file followed
by another file would get the empty file and then fail
with "handle is closed". This fixes it.
This commit was sponsored by Boyd Stephen Smith Jr. on Patreon.
Joey Hess [Tue, 1 Dec 2020 16:59:10 +0000 (12:59 -0400)]
comment
falsifian [Mon, 30 Nov 2020 20:35:21 +0000 (20:35 +0000)]
dzhu [Mon, 30 Nov 2020 19:10:54 +0000 (19:10 +0000)]
Added a comment
Joey Hess [Mon, 30 Nov 2020 17:31:02 +0000 (13:31 -0400)]
remove digression
Joey Hess [Mon, 30 Nov 2020 17:27:45 +0000 (13:27 -0400)]
thought
Joey Hess [Mon, 30 Nov 2020 17:13:56 +0000 (13:13 -0400)]
comment
Joey Hess [Mon, 30 Nov 2020 17:03:47 +0000 (13:03 -0400)]
Fix hang on shutdown of external special remote using ASYNC protocol extension.
Reversion introduced in version 8.
20201007, one release after the 1st
release with the extension.
Surprisingly, hClose can hang if another thread is reading from the
handle. This is because it uses takeMVar.
The use of cancel here does mean that, if receiveMessageAddonProcess
or Remote.External.AsyncExtension.receiveloop allocated some resource in
a non-async-exception safe way, they might not get a chance to clean it up.
They do not appear to, and anyway, this only happens when git-annex is
shutting down, so any recource that did leak would not be a problem.
This commit was sponsored by Boyd Stephen Smith Jr. on Patreon.
Joey Hess [Mon, 30 Nov 2020 16:44:40 +0000 (12:44 -0400)]
comment
Joey Hess [Mon, 30 Nov 2020 16:28:20 +0000 (12:28 -0400)]
close
kyle [Mon, 30 Nov 2020 15:18:58 +0000 (15:18 +0000)]
Added a comment
Lukey [Mon, 30 Nov 2020 07:36:41 +0000 (07:36 +0000)]
Added a comment
filipg@7e6a4a5ad3a393bcea174bf8fd6664deffc76c25 [Mon, 30 Nov 2020 07:20:35 +0000 (07:20 +0000)]
Added a comment
dzhu [Mon, 30 Nov 2020 00:11:16 +0000 (00:11 +0000)]
fix typo (CONFIGSEND -> CONFIGEND)
Lukey [Sun, 29 Nov 2020 20:57:25 +0000 (20:57 +0000)]
Added a comment
filipg@7e6a4a5ad3a393bcea174bf8fd6664deffc76c25 [Sun, 29 Nov 2020 20:13:14 +0000 (20:13 +0000)]
Lukey [Sun, 29 Nov 2020 19:06:37 +0000 (19:06 +0000)]
Lukey [Sun, 29 Nov 2020 19:04:34 +0000 (19:04 +0000)]
Lukey [Sun, 29 Nov 2020 15:37:21 +0000 (15:37 +0000)]
Added a comment
dzhu [Sun, 29 Nov 2020 02:36:23 +0000 (02:36 +0000)]
tcurdt@9d3ccb47a593bf70ac547ddae8fa634048b87ddf [Sat, 28 Nov 2020 16:49:47 +0000 (16:49 +0000)]
Added a comment
Lukey [Fri, 27 Nov 2020 18:46:04 +0000 (18:46 +0000)]
Added a comment
Joey Hess [Fri, 27 Nov 2020 17:02:43 +0000 (13:02 -0400)]
fix build
Joey Hess [Fri, 27 Nov 2020 16:57:31 +0000 (12:57 -0400)]
add news item for git-annex 8.
20201127
Joey Hess [Fri, 27 Nov 2020 16:57:02 +0000 (12:57 -0400)]
releasing package git-annex version 8.
20201127
tcurdt@9d3ccb47a593bf70ac547ddae8fa634048b87ddf [Fri, 27 Nov 2020 14:13:00 +0000 (14:13 +0000)]
Joey Hess [Thu, 26 Nov 2020 15:50:12 +0000 (11:50 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Thu, 26 Nov 2020 15:48:52 +0000 (11:48 -0400)]
fix test failure on windows
"a:" failed; this test wants a relative filename so isDrive avoids it
Note that on linux, isDrive "/foo" is true. This test also filters out
absolute paths already, so that is ok.
This commit was sponsored by Brock Spratlen on Patreon.
Ilya_Shlyakhter [Wed, 25 Nov 2020 20:31:23 +0000 (20:31 +0000)]
fix typo in git-annex command to create public S3 remote
Joey Hess [Wed, 25 Nov 2020 10:25:58 +0000 (06:25 -0400)]
close
Joey Hess [Wed, 25 Nov 2020 10:25:13 +0000 (06:25 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Wed, 25 Nov 2020 10:24:49 +0000 (06:24 -0400)]
fix build on windows
jkniiv [Wed, 25 Nov 2020 09:19:03 +0000 (09:19 +0000)]
jkniiv [Wed, 25 Nov 2020 07:38:17 +0000 (07:38 +0000)]
Joey Hess [Tue, 24 Nov 2020 21:29:19 +0000 (17:29 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Tue, 24 Nov 2020 21:17:09 +0000 (17:17 -0400)]
improve display of test failures
Display the transcript as part of the failure message for the assertion.
This avoids scrambling the tasty display.
This commit was sponsored by Ethan Aubin on Patreon.