Commit graph

33827 commits

Author SHA1 Message Date
Joey Hess
68198e803e
fix build with old version of optparse-applicative 2019-01-18 14:20:44 -04:00
Joey Hess
50a9a77148
fix build with old version of feed 2019-01-18 14:16:22 -04:00
Joey Hess
67c5a628eb
fix build with old ghc 2019-01-18 14:09:35 -04:00
Joey Hess
e8ff3c3e73
fix build with old ghc 2019-01-18 14:08:10 -04:00
Joey Hess
a5764c4a78
fix build with old ghc 2019-01-18 13:59:29 -04:00
Joey Hess
5a94033cfd
followup 2019-01-18 13:54:14 -04:00
Joey Hess
928e08904d
avoid two test failures with LANG=C
Log.Remote.prop_parse_show_Config failed on an input of fromList [("\28162","")]
in LANG=C, encodeBS "\28162" == "\STX=", while in UTF-8 locale,
encodeBS "\28162" == "\230\184\130". So in the C locale, the String
that's the parsed Map key ends up being encoded differently than it was
in the input Map.

Logs.Presence.Pure.prop_parse_build_log was failing in LANG=C because
the Arbitrary LogLine for some reason sometimes generated LogInfo values
containing \n or \r, despite using suchThat to prevent that. I don't
understand why at all, but switching the suchThat to filter the
ByteString instead of the String before conversion with encodeBS
somehow avoids the problem.

Both of these suggest something wonky with encodeBS in LANG=C, but
I *think* it's not a problem except for with test data generated by
Arbitrary.
2019-01-18 13:33:48 -04:00
Joey Hess
facdeea47e
response 2019-01-18 11:55:31 -04:00
Joey Hess
bcf5bf44e8
Merge branch 'master' of ssh://git-annex.branchable.com 2019-01-18 11:53:04 -04:00
zsolt
64caba7a91 2019-01-18 09:31:08 +00:00
pthomasdelaney@9b04608ad7e837fde64ab60a285a7b7254b5bb26
b329b2b4c8 Added a comment 2019-01-18 03:31:35 +00:00
Joey Hess
f8e7ea77fc
check present when testing readonly too
The object is supposed to be present on the readonly remote; have to
assume the location log is right about that, so the presence check
should succeed.
2019-01-17 16:08:25 -04:00
Joey Hess
3896ff8253
devblog 2019-01-17 16:04:43 -04:00
Joey Hess
d5f2463702
misctmp cleanup
* Switch to using .git/annex/othertmp for tmp files other than partial
  downloads, and make stale files left in that directory when git-annex
  is interrupted be cleaned up promptly by subsequent git-annex processes.
* The .git/annex/misctmp directory is no longer used and git-annex will
  delete anything lingering in there after it's 1 week old.

Also, in Annex.Ingest, made the filename it uses in the tmp dir be
prefixed with "ingest-" to avoid potentially using a filename used by
some other code.
2019-01-17 16:02:22 -04:00
Joey Hess
6de8ce8bb1
response 2019-01-17 13:22:54 -04:00
Joey Hess
a973d045ca
response 2019-01-17 13:20:34 -04:00
Joey Hess
8555169e71
testremote: Support testing readonly remotes with the --test-readonly option
This commit was sponsored by Ilya Shlyakhter on Patreon.
2019-01-17 12:44:52 -04:00
Joey Hess
8230b62e06
add todo 2019-01-17 11:49:56 -04:00
andrew
6e4e6ac148 Added a comment 2019-01-16 23:51:21 +00:00
andrew
bf16292584 Added a comment 2019-01-16 23:44:02 +00:00
Joey Hess
0cbb08b6df
Merge branch 'master' of ssh://git-annex.branchable.com 2019-01-16 16:42:06 -04:00
Joey Hess
c3afb3434d
remove recently added cache from KeyVariety
Adding that field broke the Read/Show serialization back-compat,
and also the Eq and Ord instances were not blinded to it, which broke
git annex fsck and probably more.

I think that the new approach used in formatKeyVariety will be nearly
as fast, but have not benchmarked it.
2019-01-16 16:33:08 -04:00
Joey Hess
96aba8eff7
Revert "cache the serialization of a Key"
This reverts commit 4536c93bb2.

That broke Read/Show of a Key, and unfortunately Key is read in at least
one place; the GitAnnexDistribution data type.

It would be worth bringing this optimisation back, but it would need
either a custom Read/Show instance that preserves back-compat, or
wrapping Key in a data type that contains the serialization, or changing
how GitAnnexDistribution is serialized.

Also, the Eq instance would need to compare keys with and without a
cached seralization the same.
2019-01-16 16:21:59 -04:00
Joey Hess
863ed51ae0
comment 2019-01-16 15:22:45 -04:00
Joey Hess
63069a9bd7
close 2019-01-16 15:08:35 -04:00
Joey Hess
3003e74a9d
inconclusive thoughts 2019-01-16 15:05:37 -04:00
Joey Hess
f0a57825e2
shorten some too-long descriptions 2019-01-16 14:16:32 -04:00
Joey Hess
293cf4b554
Merge branch 'master' of ssh://git-annex.branchable.com 2019-01-16 14:15:56 -04:00
Ilya_Shlyakhter
8c0a2a1155 added comments about testing addurl-related functions in testremote 2019-01-15 21:24:29 +00:00
Ilya_Shlyakhter
a1be80635f git-annex-testremote for read-only external special remotes 2019-01-15 16:00:45 +00:00
lykos@d125a37d89b1cfac20829f12911656c40cb70018
ab1a78115a removed 2019-01-15 15:47:58 +00:00
lykos@d125a37d89b1cfac20829f12911656c40cb70018
91c7936ca7 Added a comment: PREPARE-LOCAL 2019-01-15 15:47:39 +00:00
lykos@d125a37d89b1cfac20829f12911656c40cb70018
59269fdd59 Added a comment: PREPARE-LOCAL 2019-01-15 15:46:07 +00:00
CandyAngel
699f23ee2c Added a comment 2019-01-15 08:30:11 +00:00
Joey Hess
2be6130053
better function name 2019-01-14 20:59:09 -04:00
Joey Hess
1b6319a2c8
double speed of keyFile
Optimising for the common case of nothing needing to be escaped, from 5.434 μs
to 1.727 μs.

In the uncommon case, it only runs around 70 ns slower.
2019-01-14 20:52:54 -04:00
Joey Hess
901fba3173
fix validKeyName to account unicode again
It used to, but that was lost in the bytestring conversion recently.

20 * 4 = 80, but I only increased it to 64, which would be up to 16
4-byte unicode characters.
2019-01-14 19:03:25 -04:00
Joey Hess
745ecccd0e
Merge branch 'master' of ssh://git-annex.branchable.com 2019-01-14 19:00:56 -04:00
Joey Hess
d79ac08532
devblog 2019-01-14 19:00:38 -04:00
Joey Hess
f289663611
correct benchmark
I think I ran the original benchmark in some subdir of my big repo,
which is not a good test case. Updated with value from newly created
repo of 1000 files.
2019-01-14 18:48:03 -04:00
Joey Hess
d9a33d98cf
remove unused import 2019-01-14 18:29:10 -04:00
Joey Hess
0e44985210
remove duplicate import 2019-01-14 18:26:38 -04:00
Joey Hess
43ec130c03
new comment (and rename for consistency) 2019-01-14 18:01:02 -04:00
Joey Hess
d5bbf123fd
bugfix
The first item in the list from split '&' did not start with a '&'
2019-01-14 17:42:18 -04:00
Joey Hess
e0c4ac99b5
convert serializeKey' to strict ByteString
The builder produces a lazy ByteString, and L.toStrict has to copy it,
but needing to use the builder is no longer to common case; the
serialization will normally be cached already as a strict ByteString,
and this avoids keyFile' needing to use L.toStrict . serializeKey'
2019-01-14 17:03:46 -04:00
Joey Hess
4536c93bb2
cache the serialization of a Key
This will speed up the common case where a Key is deserialized from
disk, but is then serialized to build eg, the path to the annex object.

It means that every place a Key has any of its fields changed, the cache
has to be dropped. I've grepped and found them all. But, it would be
better to avoid that gotcha somehow..
2019-01-14 16:37:28 -04:00
Ilya_Shlyakhter
27cf71e7e4 added suggestion for RecentChanges page 2019-01-14 20:18:37 +00:00
Joey Hess
918868915c
rename page 2019-01-14 15:57:04 -04:00
Joey Hess
5d98cba923
use ByteStrings when reading annex symlinks and pointers
Now there's a ByteString used all the way from disk to Key.

The main complication in this conversion was the use of fromInternalGitPath
in several places to munge things on Windows. The things that used that
were changed to parse the ByteString using either path separator.

Also some code that had read from files to a String lazily was changed
to read a minimal strict ByteString.
2019-01-14 15:37:08 -04:00
Joey Hess
0a8d93cb8a
convert to ByteString 2019-01-14 14:02:47 -04:00