git-annex.git
5 years agoadd USE_SYSTEM_LIBS=1 for osxapp build
Joey Hess [Mon, 14 Dec 2020 19:34:27 +0000 (15:34 -0400)]
add USE_SYSTEM_LIBS=1 for osxapp build

5 years agoMerge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Mon, 14 Dec 2020 18:59:03 +0000 (14:59 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com

5 years agoimprove some edge cases around partial initialization
Joey Hess [Mon, 14 Dec 2020 17:17:43 +0000 (13:17 -0400)]
improve some edge cases around partial initialization

* Guard against running in a repo where annex.uuid is set but
  annex.version is set, or vice-versa.
* Avoid autoinit when a repo does not have annex.version or annex.uuid
  set, but has a git-annex objects directory, suggesting it was used
  by git-annex before.

5 years agoimprove display
Joey Hess [Mon, 14 Dec 2020 17:13:53 +0000 (13:13 -0400)]
improve display

5 years agorename and refactor
Joey Hess [Mon, 14 Dec 2020 16:32:21 +0000 (12:32 -0400)]
rename and refactor

5 years agoAdded a comment
yarikoptic [Mon, 14 Dec 2020 14:07:47 +0000 (14:07 +0000)]
Added a comment

5 years ago(no commit message)
jkniiv [Mon, 14 Dec 2020 05:07:20 +0000 (05:07 +0000)]

5 years agoadd
Joey Hess [Sun, 13 Dec 2020 22:50:35 +0000 (18:50 -0400)]
add

5 years agoAdded a comment
adina.wagner@2a4cac6443aada2bd2a329b8a33f4a7b87cc8eff [Sat, 12 Dec 2020 20:32:05 +0000 (20:32 +0000)]
Added a comment

5 years agoAdded a comment
muks@6bded6d879d80c43cdf4893fabb785876eea0a7b [Sat, 12 Dec 2020 10:35:07 +0000 (10:35 +0000)]
Added a comment

5 years agoMerge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Fri, 11 Dec 2020 22:31:09 +0000 (18:31 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com

5 years agofix stall detection to actually work when fully stalled
Joey Hess [Fri, 11 Dec 2020 22:26:30 +0000 (18:26 -0400)]
fix stall detection to actually work when fully stalled

When fully stalled, the progress bar doesn't update, so waiting on a
MVar would block forever. There's no need to wait anyway, just wake up
after sleeping the configured period and check the current value.

Luckily Viasat makes it really easy for me to notice this kind of
mistake, by stalling long TCP connections frequently.

5 years agomention annex.stalldetection and don't recommend too infrequent progress updates
Joey Hess [Fri, 11 Dec 2020 22:24:21 +0000 (18:24 -0400)]
mention annex.stalldetection and don't recommend too infrequent progress updates

5 years agoAdded a comment
kyle [Fri, 11 Dec 2020 20:56:04 +0000 (20:56 +0000)]
Added a comment

5 years agoresponse and related todo
Joey Hess [Fri, 11 Dec 2020 20:21:16 +0000 (16:21 -0400)]
response and related todo

5 years agoavoid transferrer committing the git-annex branch on shutdown
Joey Hess [Fri, 11 Dec 2020 20:16:07 +0000 (16:16 -0400)]
avoid transferrer committing the git-annex branch on shutdown

The parent is will do it when it shuts down, and having both of them
trying to do it at the same time seems like something good to avoid.

5 years agoremove
Joey Hess [Fri, 11 Dec 2020 19:49:39 +0000 (15:49 -0400)]
remove

I need to think about this some more, not clear if it's a todo
item specific to stalldetection at all. Remotes with this behavior
also show no progress when run with -J. And some other remotes don't
update any progress meters at all, eg adb is that way and so are hook
remotes and of course external remotes don't have to send progress info.

5 years agonote
Joey Hess [Fri, 11 Dec 2020 19:48:03 +0000 (15:48 -0400)]
note

5 years agoclose
Joey Hess [Fri, 11 Dec 2020 19:45:55 +0000 (15:45 -0400)]
close

5 years agopropagate signals to the transferrer process group
Joey Hess [Fri, 11 Dec 2020 19:28:58 +0000 (15:28 -0400)]
propagate signals to the transferrer process group

Done on unix, could not implement it on windows quite.

The signal library gets part of the way needed for windows.
But I had to open https://github.com/pmlodawski/signal/issues/1 because
it lacks raiseSignal.

Also, I don't know what the equivilant of getProcessGroupIDOf is on
windows. And System.Process does not provide a way to send any signal to
a process group except for SIGINT.

This commit was sponsored by Boyd Stephen Smith Jr. on Patreon.

5 years agomeant to close this earlier
Joey Hess [Fri, 11 Dec 2020 18:25:54 +0000 (14:25 -0400)]
meant to close this earlier

5 years agoMerge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Fri, 11 Dec 2020 16:53:14 +0000 (12:53 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com

5 years agosimplify transferr protocol
Joey Hess [Fri, 11 Dec 2020 16:52:22 +0000 (12:52 -0400)]
simplify transferr protocol

5 years agoextend transferrer protocol to send progress bar total size updates
Joey Hess [Fri, 11 Dec 2020 16:39:00 +0000 (12:39 -0400)]
extend transferrer protocol to send progress bar total size updates

New protocol is not back-compat with old one, but it's never been
released so that's ok.

5 years agouse TotalSize more extensively
Joey Hess [Fri, 11 Dec 2020 16:03:40 +0000 (12:03 -0400)]
use TotalSize more extensively

5 years agough
Joey Hess [Fri, 11 Dec 2020 15:51:46 +0000 (11:51 -0400)]
ugh

5 years agomake getViaTmpFrom no longer update location log
Joey Hess [Fri, 11 Dec 2020 15:33:10 +0000 (11:33 -0400)]
make getViaTmpFrom no longer update location log

All callers adjusted to update it themselves.

In Command.ReKey, and Command.SetKey, the cleanup action already did,
so it was updating the log twice before.

This fixes a bug when annex.stalldetection is set, as now
Command.Transferrer can skip updating the location log, and let it be
updated by the calling process.

5 years agoAdded a comment
kyle [Fri, 11 Dec 2020 15:29:26 +0000 (15:29 +0000)]
Added a comment

5 years agotodo
Joey Hess [Fri, 11 Dec 2020 15:09:19 +0000 (11:09 -0400)]
todo

5 years agoAdded a comment
muks@6bded6d879d80c43cdf4893fabb785876eea0a7b [Fri, 11 Dec 2020 02:18:30 +0000 (02:18 +0000)]
Added a comment

5 years ago(no commit message)
muks@6bded6d879d80c43cdf4893fabb785876eea0a7b [Fri, 11 Dec 2020 01:56:38 +0000 (01:56 +0000)]

5 years agoAdded a comment
yarikoptic [Thu, 10 Dec 2020 21:55:20 +0000 (21:55 +0000)]
Added a comment

5 years agocomment
Joey Hess [Thu, 10 Dec 2020 21:52:26 +0000 (17:52 -0400)]
comment

5 years agoMerge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Thu, 10 Dec 2020 21:47:22 +0000 (17:47 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com

5 years ago2 bugs involving new stalldetection feature
Joey Hess [Thu, 10 Dec 2020 21:46:58 +0000 (17:46 -0400)]
2 bugs involving new stalldetection feature

5 years agoInitial report on export -J6 to S3 failing due to "transfer already in progress"
yarikoptic [Thu, 10 Dec 2020 21:16:56 +0000 (21:16 +0000)]
Initial report on export -J6 to S3 failing due to  "transfer already in progress"

5 years agorefactor
Joey Hess [Thu, 10 Dec 2020 20:33:52 +0000 (16:33 -0400)]
refactor

5 years agoSupport special remotes that are configured with importtree=yes but without exporttre...
Joey Hess [Thu, 10 Dec 2020 17:17:40 +0000 (13:17 -0400)]
Support special remotes that are configured with importtree=yes but without exporttree=yes

There was no particular reason not to support this, other than maybe a lack
of a use case. One use case would of course be a remote that you want to
avoid overwriting content on. A new use case is the idea of importing from
backups, eg borg, where exporting is not necessarily supported at all.

This commit was sponsored by Brock Spratlen on Patreon.

5 years agobug
Joey Hess [Thu, 10 Dec 2020 17:09:57 +0000 (13:09 -0400)]
bug

5 years ago(no commit message)
anarcat [Thu, 10 Dec 2020 15:53:37 +0000 (15:53 +0000)]

5 years agoreorg
Joey Hess [Thu, 10 Dec 2020 15:25:02 +0000 (11:25 -0400)]
reorg

5 years agodevblog
Joey Hess [Wed, 9 Dec 2020 20:20:57 +0000 (16:20 -0400)]
devblog

5 years agocustom protocol for transferrer
Joey Hess [Wed, 9 Dec 2020 19:44:00 +0000 (15:44 -0400)]
custom protocol for transferrer

Rather than using Read/Show, which would force me to preserve data types
into the future.

I considered just deriving json and sending that, but I don't much like
deriving json with data types that have named constructors (like Key
does) because again it locks in data type details.

So instead, used SimpleProtocol, with a fairly complex and unreadable
protocol. But it is as efficient as the p2p protocol at least, and as
future proof.

(Writing my own custom json instances would have worked but I thought
of it too late and don't want to do all the work twice. The only real
benefit might be that aeson could be faster.)

Note that, when a new protocol request type is added later, git-annex
trying to use it will cause the git-annex transferrer to display a
protocol error message. That seems ok; it would only happen if a new
git-annex found an old version of itself in PATH or the program
file. So it's unlikely, and all it can do anyway is display an error.
(The error message could perhaps be improved..)

This commit was sponsored by Jack Hill on Patreon.

5 years agoexport encode_c'
Joey Hess [Wed, 9 Dec 2020 19:28:45 +0000 (15:28 -0400)]
export encode_c'

5 years agominor improvements
Joey Hess [Wed, 9 Dec 2020 19:28:11 +0000 (15:28 -0400)]
minor improvements

Adding new instance for Integer, and some parsers for more parameters.

The conversion of readish to readMaybe is done because a serialized
exit code cannot contain additional text after the number.

5 years agoavoid P2P.Protocol defining instance Proto.Serializable AssociatedFile
Joey Hess [Wed, 9 Dec 2020 17:46:42 +0000 (13:46 -0400)]
avoid P2P.Protocol defining instance Proto.Serializable AssociatedFile

It's got its own specific hacks, so it needs it own specific data type.

5 years agofactor out Types.Transferrer
Joey Hess [Wed, 9 Dec 2020 17:28:16 +0000 (13:28 -0400)]
factor out Types.Transferrer

5 years agorename helper
Joey Hess [Wed, 9 Dec 2020 17:21:20 +0000 (13:21 -0400)]
rename helper

More consistent name with TransferrerPool

5 years agorename back, there were links to this
Joey Hess [Wed, 9 Dec 2020 17:14:54 +0000 (13:14 -0400)]
rename back, there were links to this

5 years agoclean up transferrer pool
Joey Hess [Wed, 9 Dec 2020 17:10:35 +0000 (13:10 -0400)]
clean up transferrer pool

Doing this at shutdown is not very important at all, but I do like to
make sure that when git-annex allocates a resource, it later cleans it
up.

More importantly, stopCoProcesses is used in eg, Remote.Git in a
situation where it needs to stop long-running processes like these.

5 years agofix build failure by avoiding refutable pattern match
Joey Hess [Wed, 9 Dec 2020 16:43:38 +0000 (12:43 -0400)]
fix build failure by avoiding refutable pattern match

5 years agoMerge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Wed, 9 Dec 2020 16:35:17 +0000 (12:35 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com

5 years agomove new interface to git-annex transfer
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.

5 years agoCorrect author
jwodder [Wed, 9 Dec 2020 14:11:07 +0000 (14:11 +0000)]
Correct author

5 years ago(no commit message)
jwodder [Wed, 9 Dec 2020 14:09:47 +0000 (14:09 +0000)]

5 years agoreword
Joey Hess [Tue, 8 Dec 2020 19:55:00 +0000 (15:55 -0400)]
reword

5 years agoupdate
Joey Hess [Tue, 8 Dec 2020 19:46:09 +0000 (15:46 -0400)]
update

5 years agoMerge branch 'message-serialization'
Joey Hess [Tue, 8 Dec 2020 19:23:43 +0000 (15:23 -0400)]
Merge branch 'message-serialization'

5 years agostall detection is working
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.

5 years agoreminder for later
Joey Hess [Tue, 8 Dec 2020 19:20:05 +0000 (15:20 -0400)]
reminder for later

5 years agoadd todo
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.

5 years agoavoid parseDuration succeeding on empty string
Joey Hess [Tue, 8 Dec 2020 16:51:56 +0000 (12:51 -0400)]
avoid parseDuration succeeding on empty string

5 years agoadd killTransferrer
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).

5 years agorename
Joey Hess [Tue, 8 Dec 2020 14:53:07 +0000 (10:53 -0400)]
rename

5 years agoMerge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Mon, 7 Dec 2020 20:56:41 +0000 (16:56 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com

5 years agoannex.stalldetection docs
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.

5 years agodevblog
Joey Hess [Mon, 7 Dec 2020 20:54:57 +0000 (16:54 -0400)]
devblog

5 years agofinally using transferkeys
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.

5 years agorefactoring
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.

5 years agoadded datalad project tag
yarikoptic [Mon, 7 Dec 2020 18:23:28 +0000 (18:23 +0000)]
added datalad project tag

5 years ago(no commit message)
jwodder [Mon, 7 Dec 2020 17:36:34 +0000 (17:36 +0000)]

5 years agoMerge branch 'master' into message-serialization
Joey Hess [Mon, 7 Dec 2020 17:33:14 +0000 (13:33 -0400)]
Merge branch 'master' into message-serialization

5 years agomove TransferrerPool from Assistant state to Annex state
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.

5 years agomove TransferrerPool from assistant
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.

5 years agoAdded a comment
Lukey [Sat, 5 Dec 2020 13:07:31 +0000 (13:07 +0000)]
Added a comment

5 years agoreword
Joey Hess [Sat, 5 Dec 2020 03:52:33 +0000 (23:52 -0400)]
reword

5 years agocorrection
Joey Hess [Sat, 5 Dec 2020 03:49:23 +0000 (23:49 -0400)]
correction

5 years agotypo
Joey Hess [Sat, 5 Dec 2020 03:44:49 +0000 (23:44 -0400)]
typo

5 years agoclarify
Joey Hess [Sat, 5 Dec 2020 03:43:14 +0000 (23:43 -0400)]
clarify

5 years agosimplify
Joey Hess [Sat, 5 Dec 2020 03:41:44 +0000 (23:41 -0400)]
simplify

5 years agoMerge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Sat, 5 Dec 2020 03:38:42 +0000 (23:38 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com

5 years agoupdate
Joey Hess [Sat, 5 Dec 2020 03:36:52 +0000 (23:36 -0400)]
update

5 years ago(no commit message)
eric.w@eee65cd362d995ced72640c7cfae388ae93a4234 [Sat, 5 Dec 2020 00:43:43 +0000 (00:43 +0000)]

5 years ago(no commit message)
eric.w@eee65cd362d995ced72640c7cfae388ae93a4234 [Sat, 5 Dec 2020 00:42:42 +0000 (00:42 +0000)]

5 years agobug: alwayscommit=false on windows
kyle [Fri, 4 Dec 2020 21:05:25 +0000 (21:05 +0000)]
bug: alwayscommit=false on windows

5 years agoreword
Joey Hess [Fri, 4 Dec 2020 19:46:46 +0000 (15:46 -0400)]
reword

5 years agofix link
Joey Hess [Fri, 4 Dec 2020 19:45:37 +0000 (15:45 -0400)]
fix link

5 years agodevblog
Joey Hess [Fri, 4 Dec 2020 19:43:03 +0000 (15:43 -0400)]
devblog

5 years agoMerge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Fri, 4 Dec 2020 19:01:12 +0000 (15:01 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com

5 years agoupdate
Joey Hess [Fri, 4 Dec 2020 19:00:49 +0000 (15:00 -0400)]
update

5 years agosupport prompt in message serialization
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.

5 years agoMerge branch 'master' into message-serialization
Joey Hess [Fri, 4 Dec 2020 17:55:49 +0000 (13:55 -0400)]
Merge branch 'master' into message-serialization

5 years agoswitch back to POSIXTime
Joey Hess [Fri, 4 Dec 2020 17:54:33 +0000 (13:54 -0400)]
switch back to POSIXTime

turned out not to need Read MeterState

5 years agofinish message serialization of progress meters
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.

5 years agogeneralize to allow running in Assistant monad
Joey Hess [Fri, 4 Dec 2020 17:07:30 +0000 (13:07 -0400)]
generalize to allow running in Assistant monad

5 years agofix problem with last commit and assistant
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.

5 years agoidea
Joey Hess [Fri, 4 Dec 2020 04:00:40 +0000 (00:00 -0400)]
idea

5 years agomention new branch
Joey Hess [Thu, 3 Dec 2020 20:29:22 +0000 (16:29 -0400)]
mention new branch

5 years agonew protocol for transferkeys, with message serialization
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

5 years agocomments
Joey Hess [Thu, 3 Dec 2020 18:57:22 +0000 (14:57 -0400)]
comments