Lukey [Fri, 19 Feb 2021 15:43:48 +0000 (15:43 +0000)]
Added a comment
jwrauch [Fri, 19 Feb 2021 14:14:13 +0000 (14:14 +0000)]
Lukey [Fri, 19 Feb 2021 07:28:15 +0000 (07:28 +0000)]
Added a comment
Lukey [Fri, 19 Feb 2021 07:16:27 +0000 (07:16 +0000)]
Added a comment
jodumont [Fri, 19 Feb 2021 04:56:47 +0000 (04:56 +0000)]
Added a comment: how to rename/remove the [here] ??
jodumont [Fri, 19 Feb 2021 04:39:35 +0000 (04:39 +0000)]
Added a comment: Explanation for a noGUI usage
Added a comment: import from special directory remote fails due to running out of memory
Joey Hess [Mon, 15 Feb 2021 17:35:01 +0000 (13:35 -0400)]
windows build fix from jwodder
Joey Hess [Mon, 15 Feb 2021 17:31:55 +0000 (13:31 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Mon, 15 Feb 2021 17:31:13 +0000 (13:31 -0400)]
comment
Joey Hess [Mon, 15 Feb 2021 16:36:45 +0000 (12:36 -0400)]
perf note
Following up to
f44d4704c638e2fdb48dd0667809b16fac377b5b,
I tried making updateIncremental pure, avoiding the IORef overhead.
That did not improve speed though. It did complicate the interface since
thunks needed to be forced to avoid leaking memory. So am not going with
that change.
Looking at Crypto.Hash.hashUpdate, it copies a byte array on each call,
compared with hashlazy that only uses 1 copy for the whole bytestring.
That could well explain a lot of the overhead discussed in the
abovementioned commit. Don't see any way to improve that while hashing
incrementally, except using bigger chunks should reduce its overhead.
Since 10x larger chunks did not, I'm kind of puzzled if it's really
what's affecting performance.
falsifian [Fri, 12 Feb 2021 03:52:39 +0000 (03:52 +0000)]
Added a comment
jwodder [Thu, 11 Feb 2021 16:06:00 +0000 (16:06 +0000)]
jwodder [Thu, 11 Feb 2021 16:04:20 +0000 (16:04 +0000)]
Joey Hess [Thu, 11 Feb 2021 01:49:25 +0000 (21:49 -0400)]
comment
Joey Hess [Wed, 10 Feb 2021 20:40:16 +0000 (16:40 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Wed, 10 Feb 2021 20:38:33 +0000 (16:38 -0400)]
optimisation
IORef rather than MVar sped up benchmark mentioned in last commit to
13.0s.
This makes me wonder if changing the interface to not need the IORef
either would improve speed further.
Joey Hess [Wed, 10 Feb 2021 20:05:24 +0000 (16:05 -0400)]
incremental checksum for local remotes
This benchmarks only slightly faster than the old git-annex. Eg, for a 1
gb file, 14.56s vs 15.57s. (On a ram disk; there would certianly be
more of an effect if the file was written to disk and didn't stay in
cache.)
Commenting out the updateIncremental calls make the same run in 6.31s.
May be that overhead in the implementation, other than the actual
checksumming, is slowing it down. Eg, MVar access.
(I also tried using 10x larger chunks, which did not change the speed.)
Joey Hess [Wed, 10 Feb 2021 18:44:35 +0000 (14:44 -0400)]
stop using rsync in fileCopier
This is groundwork for calculating checksums while copying, rather than
in a separate pass, but that's not done yet. For now, avoid using rsync
(and cp on Windows), and instead read and write the file ourselves, with
resume handling.
Benchmarking vs old git-annex that used rsync, this is faster,
at least once the file size is larger than a couple of MB.
Joey Hess [Wed, 10 Feb 2021 17:38:45 +0000 (13:38 -0400)]
refactoring
Joey Hess [Wed, 10 Feb 2021 17:29:12 +0000 (13:29 -0400)]
Bugfix: fsck --from a ssh remote did not actually check that the content on the remote is not corrupted
Changing to the P2P protocol broke this, because preseedTmp copies
the local copy of the object to the temp file, and then the P2P transfer
sees the right length file and uses it as-is.
When git-annex-shell is too old and rsync is used, it did verify the
content, and when the local repo does not have the object it did verify the
content.
Joey Hess [Wed, 10 Feb 2021 17:15:00 +0000 (13:15 -0400)]
comment
Joey Hess [Wed, 10 Feb 2021 17:05:35 +0000 (13:05 -0400)]
fix missing call to check after hard linking
This could perhaps have caused a hard link to be made when the content
of the object was modified. I don't think that actually happened,
because the annexed file would have to be unlocked, with annex.thin, for
the object to get modified, and in that case, a hard link is not made.
However, to be sure, run the check.
Note that it seemed best to run the check only once, although the
current implementation is fast and safe to run repeatedly.
Joey Hess [Wed, 10 Feb 2021 16:42:17 +0000 (12:42 -0400)]
Merge branch 'incrementalhash'
Joey Hess [Wed, 10 Feb 2021 16:41:05 +0000 (12:41 -0400)]
incremental checksum on upload to ssh or p2p
Joey Hess [Wed, 10 Feb 2021 02:15:33 +0000 (22:15 -0400)]
deal with possibility of short read by S.hGet
It may read less than requested, and may yield an empty string if the
file was somehow shorter than expected.
yarikoptic [Tue, 9 Feb 2021 22:48:07 +0000 (22:48 +0000)]
Added a comment
Joey Hess [Tue, 9 Feb 2021 21:06:32 +0000 (17:06 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Tue, 9 Feb 2021 21:05:56 +0000 (17:05 -0400)]
comment
Joey Hess [Tue, 9 Feb 2021 21:03:27 +0000 (17:03 -0400)]
incremental checksum on download from ssh or p2p
Checksum as content is received from a remote git-annex repository, rather
than doing it in a second pass.
Not tested at all yet, but I imagine it will work!
Not implemented for any special remotes, and also not implemented for
copies from local remotes. It may be that, for local remotes, it will
suffice to use rsync, rely on its checksumming, and simply return Verified.
(It would still make a checksumming pass when cp is used for COW, I guess.)
Joey Hess [Tue, 9 Feb 2021 19:00:51 +0000 (15:00 -0400)]
add incremental hashing interface to Backend
As yet unused.
Backend.External could perhaps implement it too, although that would
involve sending chunks of data to it via a pipe or something, so likely
to be slow.
Joey Hess [Tue, 9 Feb 2021 17:42:49 +0000 (13:42 -0400)]
comment
Joey Hess [Tue, 9 Feb 2021 17:42:16 +0000 (13:42 -0400)]
Tahoe: Avoid verifying hash after download, since tahoe does sufficient verification itself
See my comment in the next commit for some details about why
Verified needs a hash with preimage resistance. As far as tahoe goes,
it's fully cryptographically secure.
I think that bup could also return Verified. However, the Retriever
interface does not currenly support that.
Added a comment
Added a comment
Joey Hess [Mon, 8 Feb 2021 22:17:59 +0000 (18:17 -0400)]
close
Joey Hess [Mon, 8 Feb 2021 21:54:29 +0000 (17:54 -0400)]
reorder
Joey Hess [Mon, 8 Feb 2021 18:32:24 +0000 (14:32 -0400)]
deal with cabal unpack not preserving execute bit
Joey Hess [Mon, 8 Feb 2021 18:19:43 +0000 (14:19 -0400)]
close as dup
Joey Hess [Mon, 8 Feb 2021 17:44:58 +0000 (13:44 -0400)]
2021
Joey Hess [Mon, 8 Feb 2021 17:18:01 +0000 (13:18 -0400)]
avoid making absolute git remote path relative
When a git remote is configured with an absolute path, use that path,
rather than making it relative. If it's configured with a relative path,
use that.
Git.Construct.fromPath changed to preserve the path as-is,
rather than making it absolute. And Annex.new changed to not
convert the path to relative. Instead, Git.CurrentRepo.get
generates a relative path.
A few things that used fromAbsPath unncessarily were changed in passing to
use fromPath instead. I'm seeing fromAbsPath as a security check,
while before it was being used in some cases when the path was
known absolute already. It may be that fromAbsPath is not really needed,
but only git-annex-shell uses it now, and I'm not 100% sure that there's
not some input that would cause a relative path to be used, opening a
security hole, without the security check. So left it as-is.
Test suite passes and strace shows the configured remote url is used
unchanged in the path into it. I can't be 100% sure there's not some code
somewhere that takes an absolute path to the repo and converts it to
relative and uses it, but it seems pretty unlikely that the code paths used
for a git remote would call such code. One place I know of is gitAnnexLink,
but I'm pretty sure that git remotes never deal with annex symlinks. If
that did get called, it generates a path relative to cwd, which would have
been wrong before this change as well, when operating on a remote.
Joey Hess [Mon, 8 Feb 2021 15:39:36 +0000 (11:39 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com
yarikoptic [Mon, 8 Feb 2021 14:47:43 +0000 (14:47 +0000)]
Added a comment: why relative path?
yarikoptic [Mon, 8 Feb 2021 14:46:11 +0000 (14:46 +0000)]
removed
yarikoptic [Mon, 8 Feb 2021 14:44:39 +0000 (14:44 +0000)]
Added a comment
Joey Hess [Fri, 5 Feb 2021 19:34:04 +0000 (15:34 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Fri, 5 Feb 2021 14:22:42 +0000 (10:22 -0400)]
update
falsifian [Fri, 5 Feb 2021 05:11:24 +0000 (05:11 +0000)]
Joey Hess [Wed, 3 Feb 2021 19:57:46 +0000 (15:57 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Wed, 3 Feb 2021 19:35:32 +0000 (15:35 -0400)]
suggest when user may want annex.stalldetection
When annex.stalldetection is not enabled, and a likely stall is detected,
display a suggestion to enable it.
Note that the progress meter display is not taken down when displaying
the message, so it will display like this:
0% 8 B 0 B/s
Transfer seems to have stalled. To handle stalling transfers, configure annex.stalldetection
0% 10 B 0 B/s
Although of course if it's really stalled, it will never update
again after the message. Taking down the progress meter and starting
a new one doesn't seem too necessary given how unusual this is,
also this does help show the state it was at when it stalled.
Use of uninterruptibleCancel here is ok, the thread it's canceling
only does STM transactions and sleeps. The annex thread that gets
forked off is separate to avoid it being canceled, so that it
can be joined back at the end.
A module cycle required moving from dupState the precaching of the
remote list. Doing it at startConcurrency should cover all the cases
where the remote list is used in concurrent actions.
This commit was sponsored by Kevin Mueller on Patreon.
Joey Hess [Wed, 3 Feb 2021 19:21:43 +0000 (15:21 -0400)]
remove accidental duplicated code
The code in Annex.WorkerStage and Annex.Concurrent was 100% identical.
Joey Hess [Wed, 3 Feb 2021 17:19:47 +0000 (13:19 -0400)]
automatic stall detection
annex.stalldetection can now be set to "true" to make git-annex do
automatic stall detection when it detects a remote is updating its transfer
progress consistently enough.
This commit was sponsored by Luke Shumaker on Patreon.
gueux [Wed, 3 Feb 2021 17:20:24 +0000 (17:20 +0000)]
Added a comment
gueux [Wed, 3 Feb 2021 17:06:24 +0000 (17:06 +0000)]
Added a comment
Joey Hess [Tue, 2 Feb 2021 23:39:24 +0000 (19:39 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Tue, 2 Feb 2021 23:06:33 +0000 (19:06 -0400)]
support fuzzy matching of addon commands
Note this does find things in PATH that are not executable.
Like searchPath use, the executable bit is not checked. Thing is,
there does not seem to be a binding for access(), which would be the
right way to check that the right execute bit is set. Anyway, if it's in
PATH and it's a file, it's probably fine to treat it as something that
was intended to be executable.
This commit was sponsored by Brock Spratlen on Patreon.
Joey Hess [Tue, 2 Feb 2021 23:01:45 +0000 (19:01 -0400)]
add searchPathContents
And rename related functions for consistency.
guardcat [Tue, 2 Feb 2021 21:04:21 +0000 (21:04 +0000)]
Joey Hess [Tue, 2 Feb 2021 20:32:25 +0000 (16:32 -0400)]
addon commands
Seems only fair, that, like git runs git-annex, git-annex runs
git-annex-foo.
Implementation relies on O.forwardOptions, so that any options are passed
through to the addon program. Note that this includes options before the
subcommand, eg: git-annex -cx=y foo
Unfortunately, git-annex eats the --help/-h options.
This is because it uses O.hsubparser, which injects that option into each
subcommand. Seems like this should be possible to avoid somehow, to let
commands display their own --help, instead of the dummy one git-annex
displays.
The two step searching mirrors how git works, it makes finding
git-annex-foo fast when "git annex foo" is run, but will also support fuzzy
matching, once findAllAddonCommands gets implemented.
This commit was sponsored by Dr. Land Raider on Patreon.
Joey Hess [Tue, 2 Feb 2021 19:55:45 +0000 (15:55 -0400)]
move global options handling closer to Command definitions
Joey Hess [Tue, 2 Feb 2021 18:27:42 +0000 (14:27 -0400)]
refactor
jrollins [Tue, 2 Feb 2021 17:43:19 +0000 (17:43 +0000)]
Added a comment
Joey Hess [Tue, 2 Feb 2021 17:25:58 +0000 (13:25 -0400)]
close old todo
Joey Hess [Tue, 2 Feb 2021 17:21:34 +0000 (13:21 -0400)]
close
Joey Hess [Tue, 2 Feb 2021 17:19:28 +0000 (13:19 -0400)]
reject
Joey Hess [Tue, 2 Feb 2021 17:15:32 +0000 (13:15 -0400)]
remove no longer relevant part
Joey Hess [Tue, 2 Feb 2021 17:12:47 +0000 (13:12 -0400)]
meant to close this earlier
Joey Hess [Tue, 2 Feb 2021 17:10:07 +0000 (13:10 -0400)]
comment
Joey Hess [Tue, 2 Feb 2021 17:01:31 +0000 (13:01 -0400)]
fix syntax
Joey Hess [Tue, 2 Feb 2021 16:52:00 +0000 (12:52 -0400)]
close
Joey Hess [Tue, 2 Feb 2021 16:42:20 +0000 (12:42 -0400)]
remove priority tag (unused)
Joey Hess [Tue, 2 Feb 2021 16:33:01 +0000 (12:33 -0400)]
comment
Joey Hess [Tue, 2 Feb 2021 16:26:37 +0000 (12:26 -0400)]
update tutorial to work with 6 year old version of git-annex-shell
jrollins [Mon, 1 Feb 2021 19:30:54 +0000 (19:30 +0000)]
Added a comment
jrollins [Mon, 1 Feb 2021 19:07:29 +0000 (19:07 +0000)]
Added a comment
jrollins [Mon, 1 Feb 2021 19:04:42 +0000 (19:04 +0000)]
Added a comment
jrollins [Mon, 1 Feb 2021 18:42:24 +0000 (18:42 +0000)]
Added a comment
gueux [Mon, 1 Feb 2021 18:33:52 +0000 (18:33 +0000)]
Added a comment
jrollins [Mon, 1 Feb 2021 18:25:09 +0000 (18:25 +0000)]
Added a comment
gueux [Mon, 1 Feb 2021 18:11:41 +0000 (18:11 +0000)]
Added a comment
jrollins [Mon, 1 Feb 2021 17:45:16 +0000 (17:45 +0000)]
Added a comment
Joey Hess [Mon, 1 Feb 2021 16:42:30 +0000 (12:42 -0400)]
comment
Joey Hess [Mon, 1 Feb 2021 16:40:30 +0000 (12:40 -0400)]
comment
Joey Hess [Mon, 1 Feb 2021 16:27:24 +0000 (12:27 -0400)]
comment
Joey Hess [Mon, 1 Feb 2021 16:24:48 +0000 (12:24 -0400)]
comment
Joey Hess [Mon, 1 Feb 2021 16:16:26 +0000 (12:16 -0400)]
comment
Joey Hess [Mon, 1 Feb 2021 16:07:22 +0000 (12:07 -0400)]
response
Joey Hess [Mon, 1 Feb 2021 16:01:33 +0000 (12:01 -0400)]
remove spam
Joey Hess [Mon, 1 Feb 2021 16:00:56 +0000 (12:00 -0400)]
Include libkqueue.h file needed to build the assistant on BSDs
I suspect this is a bug in cabal sdist, because with
Includes: Utility/libkqueue.h
the file is not included, but putting it in extra-files does
get it into the tarball.
Joey Hess [Mon, 1 Feb 2021 15:56:17 +0000 (11:56 -0400)]
Fix build on openbsd. Thanks, James Cook for the patch.
James Cook [Mon, 1 Feb 2021 15:53:31 +0000 (11:53 -0400)]
fix build on openbsd
arnoldbarclay [Mon, 1 Feb 2021 07:57:04 +0000 (07:57 +0000)]
Added a comment: App Development
jrollins [Sun, 31 Jan 2021 20:34:32 +0000 (20:34 +0000)]
Added a comment: problems with init after clone
jrollins [Sun, 31 Jan 2021 20:32:11 +0000 (20:32 +0000)]
removed
jrollins [Sun, 31 Jan 2021 20:31:36 +0000 (20:31 +0000)]
Added a comment: problems with annex init in cloned repo
jrollins [Sun, 31 Jan 2021 20:28:23 +0000 (20:28 +0000)]
Added a comment
jrollins [Sun, 31 Jan 2021 20:22:50 +0000 (20:22 +0000)]
jrollins [Sun, 31 Jan 2021 20:17:19 +0000 (20:17 +0000)]