Joey Hess [Thu, 17 Dec 2020 20:49:17 +0000 (16:49 -0400)]
avoid redundant set of a S3 verison ID that is already recorded
I think this could cause unnecessary changes to the git-annex branch,
and retrieveExportWithContentIdentifier is now also used for getting
content from importtree=yes remotes, so it would happen more frequently
so let's avoid.
Joey Hess [Thu, 17 Dec 2020 20:35:10 +0000 (16:35 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Thu, 17 Dec 2020 20:29:51 +0000 (16:29 -0400)]
todo
Joey Hess [Thu, 17 Dec 2020 20:25:46 +0000 (16:25 -0400)]
update warnExportImportConflict for import-only remotes
Joey Hess [Thu, 17 Dec 2020 20:25:02 +0000 (16:25 -0400)]
fix call to warnExportImportConflict
That needs a Remote that has the right export/import set up, not the input
Remote, which does not yet.
Joey Hess [Thu, 17 Dec 2020 19:58:14 +0000 (15:58 -0400)]
add missing space
Joey Hess [Thu, 17 Dec 2020 19:52:12 +0000 (15:52 -0400)]
import remotes use ContentIdentifier for getting and checking content
This is better than using the equivilant actions for export remotes,
especially for getting content, since the ContentIdentifier checking
means we can be sure (enough) that the content is valid to not force
verification of content. Which allows getting keys of types that cannot
be verified.
Also, reorganized the internals of adjustExportImport which was becoming
very hard to follow. Now it's clear what each method does in each case.
Joey Hess [Thu, 17 Dec 2020 19:31:22 +0000 (15:31 -0400)]
force verification after getting file from export remote
This way, if annex.verify is disabled, it's still checked, since this is
not a key/value store, it has to be checked.
kyle [Thu, 17 Dec 2020 19:05:13 +0000 (19:05 +0000)]
Added a comment
Joey Hess [Thu, 17 Dec 2020 18:01:42 +0000 (14:01 -0400)]
refactor common code
Added a comment
Joey Hess [Thu, 17 Dec 2020 17:46:34 +0000 (13:46 -0400)]
provide missing remote actions for importree only remote
Ah, it seemed too easy before when I was implementing importrree only,
and it was because all the key-based actions needed to be handled too.
Mostly copied from isexport, and this works. It does seem that
an import remote could use retrieveExportWithContentIdentifier
rather than retrieveExport, and checkPresentExportWithContentIdentifier
rather than checkPresentExport, which would both be more accurate.
Joey Hess [Thu, 17 Dec 2020 17:45:07 +0000 (13:45 -0400)]
importtree only remotes are untrusted, same as exporttree remotes
Importtree only remotes are new; importtree remotes used to always also be
exporttree, so were untrusted.
Since an import remote is one that can be edited by something other than
git-annex, it's clearly not trustworthy at all.
kyle [Thu, 17 Dec 2020 17:41:36 +0000 (17:41 +0000)]
Added a comment
Joey Hess [Thu, 17 Dec 2020 17:12:52 +0000 (13:12 -0400)]
improve comment
Joey Hess [Thu, 17 Dec 2020 16:53:47 +0000 (12:53 -0400)]
typo
Joey Hess [Thu, 17 Dec 2020 16:51:49 +0000 (12:51 -0400)]
improve synopsis
Joey Hess [Thu, 17 Dec 2020 16:47:07 +0000 (12:47 -0400)]
response
Joey Hess [Thu, 17 Dec 2020 16:45:07 +0000 (12:45 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Thu, 17 Dec 2020 16:29:44 +0000 (12:29 -0400)]
improve docs
Joey Hess [Thu, 17 Dec 2020 16:17:58 +0000 (12:17 -0400)]
man page improvement
Joey Hess [Thu, 17 Dec 2020 16:09:49 +0000 (12:09 -0400)]
simplify
As the only blocking operation now is threadDelaySeconds, no need to
calculate actual time and actual expected minimum size.
kyle [Thu, 17 Dec 2020 16:06:44 +0000 (16:06 +0000)]
Added a comment
Added a comment: How do I `man` annex config options?
Added a comment: Duplicate content creates frustrating cycles
jwodder [Wed, 16 Dec 2020 16:03:55 +0000 (16:03 +0000)]
Add post metadata
jwodder [Wed, 16 Dec 2020 16:03:04 +0000 (16:03 +0000)]
Joey Hess [Tue, 15 Dec 2020 20:35:06 +0000 (16:35 -0400)]
update
Joey Hess [Tue, 15 Dec 2020 20:34:16 +0000 (16:34 -0400)]
comment
Joey Hess [Tue, 15 Dec 2020 18:44:00 +0000 (14:44 -0400)]
check Remote.hasKeyCheap again
In
cd1676d604, it stopped using that to avoid surprising behavior
when the location log and remote content were out of sync.
But, it seems that may have changed some behavior users relied on as
well, and also Remote.hasKeyCheap should be faster than checking then
location log.
So, try Remote.hasKeyCheap first, and only if it does not have the key,
fall back to checking the location log. If the location log still thinks
it's present, go ahead and try to get it, so the user will see a failure
rather than silently skipping a file what whereis says is on the remote.
This does make slightly slower the case where the remote does not have
the key, and location log and Remote.hasKeyCheap agree, since it now
checks both. But only 1 stat slower.
Joey Hess [Tue, 15 Dec 2020 18:05:54 +0000 (14:05 -0400)]
followup
Joey Hess [Tue, 15 Dec 2020 17:21:15 +0000 (13:21 -0400)]
comment
Joey Hess [Tue, 15 Dec 2020 17:17:31 +0000 (13:17 -0400)]
comment
Joey Hess [Tue, 15 Dec 2020 17:03:06 +0000 (13:03 -0400)]
response
Joey Hess [Tue, 15 Dec 2020 16:47:24 +0000 (12:47 -0400)]
OSXMkLibs: skip @loader_path
This may or may not make the OSX build work on a newer version of OSX
than the one that's currently being used for release builds. I have not
been able to find good docs about how exactly to get back from such a
value to the actual path to the library that the linker would use.
Joey Hess [Tue, 15 Dec 2020 16:40:07 +0000 (12:40 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Tue, 15 Dec 2020 16:39:34 +0000 (12:39 -0400)]
Windows: include= and exclude= containing '/' will also match filenames that are written using '\'
And vice-versa, but it's better to use '/' for portability.
Notably, standardPreferredContent contains "archive/*" and that might not
match if the filename ends up coming in with the slashes the other way
around.
yarikoptic [Tue, 15 Dec 2020 16:18:39 +0000 (16:18 +0000)]
Added a comment
Joey Hess [Tue, 15 Dec 2020 16:12:29 +0000 (12:12 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Tue, 15 Dec 2020 16:12:03 +0000 (12:12 -0400)]
reorg
Joey Hess [Tue, 15 Dec 2020 16:09:27 +0000 (12:09 -0400)]
clarify
Joey Hess [Tue, 15 Dec 2020 16:08:08 +0000 (12:08 -0400)]
initremote: Prevent enabling encryption with exporttree=yes/importtree=yes
I do think this was a reversion, but I have not tracked back to what
version. While involving the remote config, it's not the same class of
problems that I kept having to chase down for a while after the remote
config parser reworking.
Joey Hess [Tue, 15 Dec 2020 15:36:25 +0000 (11:36 -0400)]
propagate git-annex -c on to transferrer child process
git -c was already propagated via environment, but need this for
consistency.
Also, notice it does not use gitAnnexChildProcess to run the
transferrer. So nothing is done about avoid it taking the
pid lock. It's possible that the caller is already doing something that
took the pid lock, and if so, the transferrer will certianly fail,
since it needs to take the pid lock too. This may prevent combining
annex.stalldetection with annex.pidlock, but I have not verified it's
really a problem. If it was, it seems git-annex would have to take
the pid lock when starting a transferrer, and hold it until shutdown,
or would need to take pid lock when starting to use a transferrer,
and hold it until done with a transfer and then drop it. The latter
would require starting the transferrer with pid locking disabled for the
child process, so assumes that the transferrer does not do anyting that
needs locking when not running a transfer.
Joey Hess [Tue, 15 Dec 2020 14:44:36 +0000 (10:44 -0400)]
pass along -c options to child git-annex processes
Joey Hess [Tue, 15 Dec 2020 14:37:07 +0000 (10:37 -0400)]
populate new field
Editing files in tag / view branch
Joey Hess [Tue, 15 Dec 2020 05:13:21 +0000 (01:13 -0400)]
importfeed: Avoid using youtube-dl when a feed does not contain an enclosure, but only a link to an url which youtube-dl does not support
This is common in some feeds, which might mix some items with enclosures,
with others that link to posts or whatever. Before this, it would try to
use youtube-dl and fail, or if youtube-dl was not allowed, it would
incorrectly complain that an url was supported by youtube-dl.
jkniiv [Tue, 15 Dec 2020 04:46:38 +0000 (04:46 +0000)]
Added a comment: yay, it's working now! :)
Joey Hess [Tue, 15 Dec 2020 01:35:31 +0000 (21:35 -0400)]
typo
Joey Hess [Mon, 14 Dec 2020 21:54:25 +0000 (17:54 -0400)]
avoid using MatchingKey where MatchingFile can be used now
This is actually matching worktree files, and now that a Key can be
provided along with the file when doing that, using MatchingFile
reflects that.
Joey Hess [Mon, 14 Dec 2020 21:48:30 +0000 (17:48 -0400)]
improve readability and fix a warning
Joey Hess [Mon, 14 Dec 2020 21:43:48 +0000 (17:43 -0400)]
comment
Joey Hess [Mon, 14 Dec 2020 21:42:25 +0000 (17:42 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Mon, 14 Dec 2020 21:42:02 +0000 (17:42 -0400)]
add key to FileInfo
MatchingKey is not the thing to use when matching on actual worktreee
files.
Fix reversion in 8.
20201116 that made include= and exclude= in
preferred/required content expressions match a path relative to the current
directory, rather than the path from the top of the repository.
yarikoptic [Mon, 14 Dec 2020 20:59:06 +0000 (20:59 +0000)]
Added a comment
Joey Hess [Mon, 14 Dec 2020 20:52:53 +0000 (16:52 -0400)]
clarify comment
Joey Hess [Mon, 14 Dec 2020 19:34:27 +0000 (15:34 -0400)]
add USE_SYSTEM_LIBS=1 for osxapp build
Joey Hess [Mon, 14 Dec 2020 18:59:03 +0000 (14:59 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com
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.
Joey Hess [Mon, 14 Dec 2020 17:13:53 +0000 (13:13 -0400)]
improve display
Joey Hess [Mon, 14 Dec 2020 16:32:21 +0000 (12:32 -0400)]
rename and refactor
yarikoptic [Mon, 14 Dec 2020 14:07:47 +0000 (14:07 +0000)]
Added a comment
jkniiv [Mon, 14 Dec 2020 05:07:20 +0000 (05:07 +0000)]
Joey Hess [Sun, 13 Dec 2020 22:50:35 +0000 (18:50 -0400)]
add
Added a comment
muks@6bded6d879d80c43cdf4893fabb785876eea0a7b [Sat, 12 Dec 2020 10:35:07 +0000 (10:35 +0000)]
Added a comment
Joey Hess [Fri, 11 Dec 2020 22:31:09 +0000 (18:31 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com
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.
Joey Hess [Fri, 11 Dec 2020 22:24:21 +0000 (18:24 -0400)]
mention annex.stalldetection and don't recommend too infrequent progress updates
kyle [Fri, 11 Dec 2020 20:56:04 +0000 (20:56 +0000)]
Added a comment
Joey Hess [Fri, 11 Dec 2020 20:21:16 +0000 (16:21 -0400)]
response and related todo
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.
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.
Joey Hess [Fri, 11 Dec 2020 19:48:03 +0000 (15:48 -0400)]
note
Joey Hess [Fri, 11 Dec 2020 19:45:55 +0000 (15:45 -0400)]
close
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.
Joey Hess [Fri, 11 Dec 2020 18:25:54 +0000 (14:25 -0400)]
meant to close this earlier
Joey Hess [Fri, 11 Dec 2020 16:53:14 +0000 (12:53 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Fri, 11 Dec 2020 16:52:22 +0000 (12:52 -0400)]
simplify transferr protocol
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.
Joey Hess [Fri, 11 Dec 2020 16:03:40 +0000 (12:03 -0400)]
use TotalSize more extensively
Joey Hess [Fri, 11 Dec 2020 15:51:46 +0000 (11:51 -0400)]
ugh
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.
kyle [Fri, 11 Dec 2020 15:29:26 +0000 (15:29 +0000)]
Added a comment
Joey Hess [Fri, 11 Dec 2020 15:09:19 +0000 (11:09 -0400)]
todo
muks@6bded6d879d80c43cdf4893fabb785876eea0a7b [Fri, 11 Dec 2020 02:18:30 +0000 (02:18 +0000)]
Added a comment
muks@6bded6d879d80c43cdf4893fabb785876eea0a7b [Fri, 11 Dec 2020 01:56:38 +0000 (01:56 +0000)]
yarikoptic [Thu, 10 Dec 2020 21:55:20 +0000 (21:55 +0000)]
Added a comment
Joey Hess [Thu, 10 Dec 2020 21:52:26 +0000 (17:52 -0400)]
comment
Joey Hess [Thu, 10 Dec 2020 21:47:22 +0000 (17:47 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Thu, 10 Dec 2020 21:46:58 +0000 (17:46 -0400)]
2 bugs involving new stalldetection feature
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"
Joey Hess [Thu, 10 Dec 2020 20:33:52 +0000 (16:33 -0400)]
refactor
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.
Joey Hess [Thu, 10 Dec 2020 17:09:57 +0000 (13:09 -0400)]
bug
anarcat [Thu, 10 Dec 2020 15:53:37 +0000 (15:53 +0000)]
Joey Hess [Thu, 10 Dec 2020 15:25:02 +0000 (11:25 -0400)]
reorg
Joey Hess [Wed, 9 Dec 2020 20:20:57 +0000 (16:20 -0400)]
devblog
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.