Commit graph

31489 commits

Author SHA1 Message Date
Joey Hess
08814327ff
use P2P protocol for checkpresent, retrieve, and store
Note that, due to not using rsync to transfer files to ssh remotes
any longer, permissions and other file metadata of annexed files
will no longer be preserved when copying them to ssh remotes.
Other remotes never supported preserving that information, so
this is not considered a regression. Added NEWS item about this.

Another significant side effect of this is that, even when rsync is run to
retrieve a file, its progress display will no longer be shown, and
instead the native git-annex progress display will appear. It would be
possible to use the rsync process display when rsync is used (old
git-annex-shell and also retrieval from a local repository), but it
would have complicated the code unncessarily, and been inconsistent
behavior.

(I'd been thinking for a while about eliminating the rsync progress
display, since it's got some annoying verbosities, including display of
the key and the "(xfr#1, to-chk=0/1)" bit and was already somewhat
inconsistent.)

retrieveKeyFileCheap still uses rsync, since that ensures that it gets
the actual file content from the remote. Using the P2P protocol would
use the local content, as long as the local and remote size are the
same.

This commit was sponsored by John Pellman on Patreon.
2018-03-09 13:25:16 -04:00
Joey Hess
26febb4e58
benchmarks 2018-03-09 12:57:23 -04:00
Joey Hess
5bc0ab3f31
going AGPL
Remote/Git.hs now contains AGPL licensed code, thus the license
of git-annex as a whole is AGPL. This was already the case when git-annex
was built with the webapp enabled.

The AGPL license will apply to all code added to Remote/Git.hs in the
future, which is going to include support for using
`git-annex-shell p2pstdio`.
2018-03-09 01:03:46 -04:00
Joey Hess
3962ca71bd
Merge branch 'master' of ssh://git-annex.branchable.com 2018-03-08 17:05:11 -04:00
Joey Hess
00fd2bc139
devblog 2018-03-08 17:04:52 -04:00
Joey Hess
6a59bc4845
use P2P protocol for drop
Not yet used for everything else, but this is enough to
verify that it works, and do some benchmarking.

Some bugfixes included, which got it working. Also fallback to old
actions has been verified to work correctly.

Benchmarked dropping one thousand files from a ssh remote on localhost.
Using the old git-annex	40.867 seconds.
With the P2P protocol	9.905 seconds!

This commit was sponsored by Jochen Bartl on Patreon.
2018-03-08 16:56:17 -04:00
Joey Hess
16af259209
refactor p2p remote action code
Make a Remote.Helper.P2P using code that was in Remote.P2P, converted to
use generic protocol runner actions.

This will allow it to be reused in Remote.Git.

This commit was sponsored by mo on Patreon.
2018-03-08 16:11:00 -04:00
Joey Hess
c036a380b2
p2p ssh connection pools
Much like Remote.P2P, there's a pool of connections to a peer, in order
to support concurrent operations.

Deals with old git-annex-ssh on the remote that does not support p2pstdio,
by only trying once to use it, and remembering if it's not supported.

Made p2pstdio send an AUTH_SUCCESS with its uuid, which serves the dual
purposes of something to detect to see that the connection is working,
and a way to verify that it's connected to the right uuid.
(There's a redundant uuid check since the uuid field is sent
by git_annex_shell, but I anticipate that being removed later when
the legacy git-annex-shell stuff gets removed.)

Not entirely happy with Remote.Git.runSsh's behavior
when the proto action fails. Running the fallback will work ok, but what
will we do when the fallbacks later get removed? It might be better to
try to reconnect, in case the connection got closed.

This commit was sponsored by Boyd Stephen Smith Jr. on Patreon.
2018-03-08 15:11:31 -04:00
hobbes@b2cacef69071743c3a831e60511062f7e014e52f
336569a995 Added a comment: Youtube-dl options per file? 2018-03-08 18:47:57 +00:00
Joey Hess
978078f0fe
fix markdown 2018-03-08 12:54:56 -04:00
davicastro
2a67c125e1 Added a comment: Adopting "git annex add" as default command in workflow 2018-03-08 11:21:55 +00:00
andrew
f7e2503410 2018-03-07 23:34:12 +00:00
andrew
34754d4ee6 Added a comment: released Finder integration 2018-03-07 23:23:47 +00:00
andrew
48555b8ee3 2018-03-07 23:19:56 +00:00
andrew
08abdbd38c 2018-03-07 23:17:54 +00:00
Joey Hess
3dd43df9c2
Better ssh connection warmup when using -J for concurrency.
Avoids ugly messages when forced ssh command is not git-annex-shell.

This commit was sponsored by Ole-Morten Duesund on Patreon.
2018-03-07 17:30:14 -04:00
Joey Hess
460ab8a181
Merge branch 'master' of ssh://git-annex.branchable.com 2018-03-07 16:22:56 -04:00
Joey Hess
164d74de0f
wording 2018-03-07 16:22:39 -04:00
https://tribut.de/
880c303fc9 Added a comment 2018-03-07 20:15:00 +00:00
https://tribut.de/
3559e641ca Added a comment 2018-03-07 20:02:07 +00:00
Joey Hess
a1a8b78b88
response 2018-03-07 15:54:07 -04:00
Joey Hess
0a294900b5
Merge branch 'master' of ssh://git-annex.branchable.com 2018-03-07 15:41:33 -04:00
Joey Hess
85724f712a
devblog 2018-03-07 15:40:17 -04:00
Joey Hess
6ddfa9807b
implemented git-annex-shell p2pstdio
Not yet used by git-annex, but this will allow faster transfers etc than
using individual ssh connections and rsync.

Not called git-annex-shell p2p, because git-annex p2p does something
else and I don't want two subcommands with the same name between the two
for sanity reasons.

This commit was sponsored by Øyvind Andersen Holm.
2018-03-07 15:38:01 -04:00
Joey Hess
fa5b19f0ff
add formal description of the P2P protocol
This commit was sponsored by Fernando Jimenez on Patreon.
2018-03-07 15:14:16 -04:00
Joey Hess
f4103744c3
make sure that lockContentShared is always paired with an inAnnex check
lockContentShared had a screwy caveat that it didn't verify that the content
was present when locking it, but in the most common case, eg indirect mode,
it failed to lock when the content is not present.

That led to a few callers forgetting to check inAnnex when using it,
but the potential data loss was unlikely to be noticed because it only
affected direct mode I think.

Fix data loss bug when the local repository uses direct mode, and a
locally modified file is dropped from a remote repsitory. The bug
caused the modified file to be counted as a copy of the original file.
(This is not a severe bug because in such a situation, dropping
from the remote and then modifying the file is allowed and has the same
end result.)

And, in content locking over tor, when the remote repository is
in direct mode, it neglected to check that the content was actually
present when locking it. This could cause git annex drop to remove
the only copy of a file when it thought the tor remote had a copy.

So, make lockContentShared do its own inAnnex check. This could perhaps
be optimised for direct mode, to avoid the check then, since locking
the content necessarily verifies it exists there, but I have not bothered
with that.

This commit was sponsored by Jeff Goeke-Smith on Patreon.
2018-03-07 14:23:52 -04:00
Joey Hess
572a45ae00
add readonly mode to serve P2P protocol
This will be used by git-annex-shell when configured to be readonly.

This commit was sponsored by Nick Daly on Patreon.
2018-03-07 13:15:55 -04:00
https://tribut.de/
79f2b0b50d 2018-03-07 16:37:31 +00:00
Joey Hess
bd8c13e75b
update 2018-03-06 17:33:11 -04:00
yarikoptic
6023d82a43 Added a comment 2018-03-06 20:33:44 +00:00
Joey Hess
6f6146a3f7
Merge branch 'master' of ssh://git-annex.branchable.com 2018-03-06 15:34:07 -04:00
Joey Hess
d8a900a33d
devblog 2018-03-06 15:26:57 -04:00
Joey Hess
ba53f60801
refactor 2018-03-06 15:14:53 -04:00
yarikoptic
635b6a0959 Added a comment 2018-03-06 19:07:37 +00:00
Joey Hess
73704b22a9
comment typo 2018-03-06 14:58:24 -04:00
Joey Hess
9b8f6c9cb9
followup 2018-03-06 14:51:27 -04:00
Joey Hess
f42baedd4c
designing new git-annex-shell multi
This commit was supported by the NSF-funded DataLad project.
2018-03-06 14:48:44 -04:00
Joey Hess
dd63b4e744
followup 2018-03-06 13:51:06 -04:00
Joey Hess
4a45c34dc2
response 2018-03-06 13:40:00 -04:00
Joey Hess
bf98afb91a
comment 2018-03-06 13:38:55 -04:00
Joey Hess
a7dd4490f0
followup 2018-03-06 13:05:37 -04:00
Joey Hess
f668510754
comment 2018-03-06 12:22:50 -04:00
davi.castro@13c06889d1a1aef6321227888bd7d6b73d5692ea
ea0501e868 Added a comment: Is git annex config still supported? 2018-03-06 03:03:45 +00:00
yarikoptic
31be21289c new line was swallowed while copy pasting -- fixed 2018-03-05 19:48:29 +00:00
yarikoptic
2467f6f52b forgot to add my own meta 2018-03-05 19:47:48 +00:00
yarikoptic
24d379106b intial question about special remotes which do not support parallel mode downloads 2018-03-05 19:31:34 +00:00
i@f4fc1d4ed8c7cc91fc284462cb631c270a5195e9
7b75103e32 Added a comment: opened github issue with glacier-cli 2018-03-05 17:28:53 +00:00
i@f4fc1d4ed8c7cc91fc284462cb631c270a5195e9
f4095f7db8 Added a comment: thanks for the quick response! 2018-03-05 17:19:19 +00:00
Joey Hess
f71dc6aa05
Merge branch 'master' of ssh://git-annex.branchable.com 2018-03-05 11:30:59 -04:00
Joey Hess
07e253b1fb
Improve SHA*E extension extraction code
Do not treat parts of the filename that contain punctuation or other
non-alphanumeric characters as extensions. Before, such characters were
filtered out.

Note that in 45308ec78b "foo.ba__________r"
was munged to ".bar" and so incorrectly treated as an extension. That was
fixed by changing the filter order, but not allowing punctuation seems a
better fix.

This assumes that extensions containing punctuation are rare. "_" seems the
most likely character; I used it in ikiwiki "._comment" files. But I can't
recall seeing it anywhere else. It certianly seems that no commonly used
extensions contain punctuation. If git-annex doesn't treat "._comment"
as an extension, it's not likely to break software that expects to see that
extension like some software expects to see .epub or .mp3.

This commit was sponsored by Jack Hill on Patreon.
2018-03-05 11:25:01 -04:00