Commit graph

4345 commits

Author SHA1 Message Date
Joey Hess
dda4cb372c
update 2024-01-12 13:51:59 -04:00
Joey Hess
7e69063a29
support annex.shared-sop-command for encryption=shared
This works well, and it interoperates with gpg in my testing (although some
SOP commands might choose to use a profile that does not so caveat emptor).

Note that for creating the Cipher, gpg --gen-random is still used. SOP
does not have an eqivilant, and as long as the user has gpg around,
which seems likely, it doesn't matter that it uses gpg here, it's not being
used for encryption. That seemed better than implementing a second way
to get high quality entropy, at least for now.

The need for the sop command to run in an empty directory has each call
to encrypt and decrypt creating a new temporary directory. That is some
unncessary overhead, though probably swamped by the overhead of running
the sop command. This could be improved in the future by passing an
already empty directory to them, or a sufficiently empty directory
(.git/annex/tmp would probably suffice).

Sponsored-by: Brett Eisenberg on Patreon
2024-01-12 13:31:18 -04:00
Joey Hess
654f3b7e06
comments 2024-01-09 17:04:17 -04:00
Joey Hess
a496c05995
update 2024-01-09 17:04:10 -04:00
Joey Hess
db5fa267c7
sop 2024-01-09 16:57:11 -04:00
Joey Hess
2c86651180
optimise adjustTree when adding many TreeItems
The old code traversed the list of addtreeitems once per subdirectory in
the tree, so could get quite slow. Converting to Map lookups sped it up
significantly.

In my test case, git-annex import used to take about 2 minutes, when
calling adjustTree to add back excluded files to the imported tree. This
dropped it down to 6 seconds. Of which 4 seconds are the actual
enumeration of the contents of the remote, so really only 2 seconds for
this.

The path prefix map is a bit suboptimal memory-wise, since items get
stored in the map once per subdirectory on the path to the item. It
would perhaps be better to use a tree data structure.

Also it's suboptimal memory-wise that it builds two maps, as well
as retaining a reference to addtreeitems. I could not see a way around
that though.

Sponsored-by: Luke T. Shumaker on Patreon
2024-01-03 15:07:49 -04:00
Joey Hess
a6a67f79e7
todo 2024-01-02 17:00:41 -04:00
Atemu
86d3e8d31a Added a comment 2023-12-29 17:06:37 +00:00
Joey Hess
a4a5ec6366
info: Added "annex sizes of repositories" table to the overall display
Thanks to previous work in 11cc9f1933,
this is almost entirely free, it only needs to do some additional map
lookups and math.

The strictness annotations keep the memory use from blowing up.

Sponsored-by: unqueued on Patreon
2023-12-29 12:09:30 -04:00
Joey Hess
e7a550a25b
plan 2023-12-29 10:48:12 -04:00
Joey Hess
49b50dd466
todo 2023-12-29 10:36:11 -04:00
Atemu
f58d629b95 Added a comment 2023-12-25 13:37:58 +00:00
Joey Hess
9a67ed0f10
importtree: support preferred content expressions needing keys
When importing from a special remote, support preferred content expressions
that use terms that match on keys (eg "present", "copies=1"). Such terms
are ignored when importing, since the key is not known yet.

When "standard" or "groupwanted" is used, the terms in those
expressions also get pruned accordingly.

This does allow setting preferred content to "not (copies=1)" to make a
special remote into a "source" type of repository. Importing from it will
import all files. Then exporting to it will drop all files from it.

In the case of setting preferred content to "present", it's pruned on
import, so everything gets imported from it. Then on export, it's applied,
and everything in it is left on it, and no new content is exported to it.

Since the old behavior on these preferred content expressions was for
importtree to error out, there's no backwards compatability to worry about.
Except that sync/pull/etc will now import where before it errored out.
2023-12-18 16:27:59 -04:00
Joey Hess
362a2808a5
split out todo for special remotes and close the main todo 2023-12-08 14:26:08 -04:00
Joey Hess
0bd8b17b59
log migration trees to git-annex branch
This will allow distributed migration: Start a migration in one clone of
a repo, and then update other clones.

commitMigration is a bit of a bear.. There is some inversion of control
that needs some TMVars. Also streamLogFile's finalizer does not handle
recording the trees, so an interrupt at just the wrong time can cause
migration.log to be emptied but the git-annex branch not updated.

Sponsored-by: Graham Spencer on Patreon
2023-12-06 15:40:03 -04:00
Joey Hess
10964f91bc
further thoughts 2023-12-05 15:00:22 -04:00
Joey Hess
edf31a2ebc
update 2023-12-01 15:01:45 -04:00
Joey Hess
5c4ce1353e
comment 2023-12-01 14:42:55 -04:00
Joey Hess
1d020df896
git-annex branch size when storing migration information
Sponsored-by: Jack Hill on Patreon
2023-12-01 13:09:52 -04:00
Joey Hess
3e8618fed3
comment 2023-11-30 16:49:48 -04:00
NewUser
3a4883cabb Added a comment: Is annex.tune.objecthashlower=true recommended for interop with windows? 2023-11-20 04:24:35 +00:00
Joey Hess
1ddec09f7c
close 2023-11-13 17:45:37 -04:00
Joey Hess
6a8672d756
todo 2023-11-08 14:14:35 -04:00
Joey Hess
1ec3c3e541
update 2023-10-31 14:06:46 -04:00
nobodyinperson
af6ecc9be5 Added a comment 2023-10-26 17:46:28 +00:00
Joey Hess
985dd38847
add 2023-10-25 14:44:57 -04:00
Joey Hess
626622da1b
comment 2023-10-25 14:07:16 -04:00
Joey Hess
97403a4b4b
comment 2023-10-25 13:30:19 -04:00
Joey Hess
9a1e8fbabc
Merge branch 'master' of ssh://git-annex.branchable.com 2023-10-25 13:21:12 -04:00
nobodyinperson
1d1864ee5e Brainstorm (semi)automatic description updating 2023-10-25 11:27:17 +00:00
Joey Hess
aaeadc422a
comment 2023-10-24 13:54:31 -04:00
Joey Hess
0da1d40cd4
Improve memory use of --all when using annex.private
This does not improve Annex.Branch.files at all, since it still uses ++ to
combine the lists, so forcing all but the last one.

But when there are a lot of files in the private journal, it does avoid
--all (or a bare repo) from buffering the filenames in memory.

See commit 653b719472 for prior discussion of
this buffering.

Sponsored-by: Graham Spencer on Patreon
2023-10-24 13:20:55 -04:00
Joey Hess
8bde6101e3
sqlite datbase for importfeed
importfeed: Use caching database to avoid needing to list urls on every
run, and avoid using too much memory.

Benchmarking in my podcasts repo, importfeed got 1.42 seconds faster,
and memory use dropped from 203000k to 59408k.

Database.ImportFeed is Database.ContentIdentifier with the serial number
filed off. There is a bit of code duplication I would like to avoid,
particularly recordAnnexBranchTree, and getAnnexBranchTree. But these use
the persistent sqlite tables, so despite the code being the same, they
cannot be factored out.

Since this database includes the contentidentifier metadata, it will be
slightly redundant if a sqlite database is ever added for metadata. I
did consider making such a generic database and using it for this. But,
that would then need importfeed to update both the url database and the
metadata database, which is twice as much work diffing the git-annex
branch trees. Or would entagle updating two databases in a complex way.
So instead it seems better to optimise the database that
importfeed needs, and if the metadata database is used by another command,
use a little more disk space and do a little bit of redundant work to
update it.

Sponsored-by: unqueued on Patreon
2023-10-23 16:46:22 -04:00
Joey Hess
892d87efa4
comment 2023-10-14 14:33:38 -04:00
Joey Hess
4ec1694f89
comment 2023-10-09 14:47:19 -04:00
Atemu
44a7b4c973 2023-10-01 09:38:29 +00:00
Joey Hess
bda0db6f65
todo 2023-09-14 20:29:12 -04:00
anarcat
22bf65b875 Added a comment: just show start time? 2023-09-12 15:51:22 +00:00
Joey Hess
32cb2bd3fa
Fix linker optimisation in linux standalone tarballs
Was only symlinking when there is a usr/ directory, but with usr/ merge,
there are none.

Sponsored-by: Dartmouth College's Datalad project
2023-09-07 12:59:27 -04:00
Joey Hess
9563830529
tag datalad 2023-09-07 12:57:38 -04:00
yarikoptic
70e766c95b Added a comment 2023-08-31 16:48:34 +00:00
yarikoptic
07abfc3075 Added a comment 2023-08-31 13:57:21 +00:00
yarikoptic
c6f6b993bc reporting on increased number of looksup 2023-08-31 13:54:20 +00:00
Joey Hess
1e580a30be
comment (and a new example) 2023-08-22 15:10:04 -04:00
Joey Hess
47f92409f2
Merge branch 'master' of ssh://git-annex.branchable.com 2023-08-22 15:01:43 -04:00
Joey Hess
cf8b30c914
oldkeys: New command that lists the keys used by old versions of a file
The tricky thing about this turned out to be handling renames and reverts.
For that, it has to make two passes over the git log, and to avoid
buffering a possibly huge amount of logs in memory (ie the whole git log of
an entire repository!), runs git log twice.

(It might be possible to speed this up by asking git log to show a diff,
and so avoid needing to use catKey.)

Sponsored-By: Brock Spratlen on Patreon
2023-08-22 14:51:06 -04:00
nobodyinperson
1afa7dcf44 Added a comment 2023-08-22 17:57:45 +00:00
nobodyinperson
42683457d0 Added a comment: Oh yes please 🤩 2023-08-22 16:48:58 +00:00
Joey Hess
6115bced71
comment, todo 2023-08-22 12:38:00 -04:00
Joey Hess
d4ca85fd23
comment 2023-08-22 12:10:46 -04:00