Commit graph

2833 commits

Author SHA1 Message Date
Joey Hess
bff6ca2634 refactor 2011-11-28 23:20:31 -04:00
Joey Hess
e6ef66cea3 optimize gitAnnexLocation
For non-bare it's back to doing no work.
2011-11-28 23:08:11 -04:00
Joey Hess
f4bf444ae0 store content in hashDirLower directories in bare repositories
When storing content in bare repositories, use the hashDirLower
directories. Bare repositories can be on USB drives, which might
use the FAT filesystem, and fall afoul of recent bugs in linux's handling
of mixed case on FAT. Using hashDirLower avoids that.
2011-11-28 22:55:40 -04:00
Joey Hess
da9cd315be add support for using hashDirLower in addition to hashDirMixed
Supporting multiple directory hash types will allow converting to a
different one, without a flag day.

gitAnnexLocation now checks which of the possible locations have a file.
This means more statting of files. Several places currently use
gitAnnexLocation and immediately check if the returned file exists;
those need to be optimised.
2011-11-28 22:43:51 -04:00
Joey Hess
2b3c120506 clarify extent of limit checks 2011-11-28 17:49:03 -04:00
Joey Hess
e32ab766b0 --inbackend can be used to make git-annex only operate on files whose content is stored using a specified key-value backend. 2011-11-28 17:45:47 -04:00
Joey Hess
16653132b7 Merge branch 'master' of ssh://git-annex.branchable.com 2011-11-28 16:45:04 -04:00
Joey Hess
6869e6023e support .git/annex on a different disk than the rest of the repo
The only fully supported thing is to have the main repository on one disk,
and .git/annex on another. Only commands that move data in/out of the annex
will need to copy it across devices.

There is only partial support for putting arbitrary subdirectories of
.git/annex on different devices. For one thing, but this can require more
copies to be done. For example, when .git/annex/tmp is on one device, and
.git/annex/journal on another, every journal write involves a call to
mv(1). Also, there are a few places that make hard links between various
subdirectories of .git/annex with createLink, that are not handled.

In the common case without cross-device, the new moveFile is actually
faster than renameFile, avoiding an unncessary stat to check that a file
(not a directory) is being moved. Of course if a cross-device move is
needed, it is as slow as mv(1) of the data.
2011-11-28 16:17:55 -04:00
http://cgray.myopenid.com/
d9e770a836 Added a comment 2011-11-27 22:10:45 +00:00
Joey Hess
ff2d9c8283 response 2011-11-27 17:09:29 -04:00
Joey Hess
5bc7767c21 Merge branch 'master' of ssh://git-annex.branchable.com 2011-11-27 17:01:17 -04:00
http://hcs.furuvik.net/
178a49af75 2011-11-27 20:52:15 +00:00
Joey Hess
faf55ac2b7 update 2011-11-27 13:57:56 -04:00
http://joey.kitenet.net/
a3f4ea1a69 Added a comment 2011-11-27 17:56:31 +00:00
Joey Hess
2bf3addf49 Bugfix: dropunused did not drop keys with two spaces in their name. 2011-11-27 13:50:05 -04:00
Joey Hess
9a67f9cb8d use Control.Exception's brackets 2011-11-26 12:08:54 -04:00
Joey Hess
a72f0ecc27 changelog 2011-11-26 12:06:03 -04:00
Mark Wright
041d324125 Remove haskell98 to build with ghc 7.2.2, also built with ghc 7.0.4
Signed-off-by: Joey Hess <joey@kitenet.net>
2011-11-26 12:05:08 -04:00
Joey Hess
afe9e78401 error handling cleanup
Use Control.Exception bracket_; want to catch all errors.

System.Posix.Env.getEnv doesn't fail, no need to try it.
2011-11-26 12:03:01 -04:00
Joey Hess
af239e5c33 Merge branch 'master' of ssh://git-annex.branchable.com 2011-11-25 15:32:29 -04:00
Joey Hess
12243d2279 Flush json output, avoiding a buffering problem that could result in doubled output.
The bug was that with --json, output lines were sometimes doubled. For
example, git annex init --json would output two lines, despite only running
one thing. Adding to the weirdness, this only occurred when the output
was redirected to a pipe or a file.

Strace showed two processes outputting the same buffered output.
The second process was this writer process (only needed to work around
bug #624389):

                _ <- forkProcess $ do
                        hPutStr toh $ unlines paths
                        hClose toh
                        exitSuccess

The doubled output occurs when this process exits, and ghc flushes the
inherited stdout buffer. Why only when piping? I don't know, but ghc may
be behaving differently when stdout is not a terminal.

While this is quite possibly a ghc bug, there is a nice fix in git-annex.
Explicitly flushing after each chunk of json is output works around the
problem, and as a side effect, json is streamed rather than being output
all at the end when performing an expensive operaition.

However, note that this means all uses of putStr in git-annex must be
explicitly flushed. The others were, already.
2011-11-25 11:51:06 -04:00
https://www.google.com/accounts/o8/id?id=AItOawnBJ6Dv1glxzzi4qIzGFNa6F-mfHIvv9Ck
ba1ec2c60f 2011-11-25 05:56:59 +00:00
Joey Hess
566a5f4881 Merge branch 'master' of ssh://git-annex.branchable.com 2011-11-24 11:57:22 -04:00
http://cgray.myopenid.com/
709acf3f24 2011-11-24 01:59:45 +00:00
Joey Hess
3dd66fd2f0 update url 2011-11-22 22:13:11 -04:00
Joey Hess
75a590bdd8 Put a workaround in the directory special remote for strange behavior with VFAT filesystems on Linux (mounted with shortname=mixed) 2011-11-22 18:21:28 -04:00
http://joey.kitenet.net/
fd81b5047b Added a comment 2011-11-22 21:01:14 +00:00
http://joey.kitenet.net/
112399bf1a Added a comment 2011-11-22 20:59:55 +00:00
https://www.google.com/accounts/o8/id?id=AItOawnBJ6Dv1glxzzi4qIzGFNa6F-mfHIvv9Ck
6d7e990dca Added a comment 2011-11-22 20:35:03 +00:00
http://joey.kitenet.net/
eeda534e9a Added a comment 2011-11-22 19:56:55 +00:00
https://www.google.com/accounts/o8/id?id=AItOawnBJ6Dv1glxzzi4qIzGFNa6F-mfHIvv9Ck
b1c601ac8c Added a comment: Case sensitivity 2011-11-22 18:51:04 +00:00
Joey Hess
2d9099531b add news item for git-annex 3.20111122 2011-11-22 14:41:52 -04:00
Joey Hess
322d9b1cc0 releasing version 3.20111122 2011-11-22 14:40:11 -04:00
Joey Hess
7f7ae7a3b1 find: Support --print0
It would be nice if command-specific options were supported. The first
difficulty is that which command is being called is not known until after
getopt; but that could be worked around by finding the first non-dashed
parameter. Storing the settings without putting them in the annex monad is
the next difficulty; it could perhaps be handled by making the seek stage
pass applicable settings into the start stage (and from there on to perform
as needed). But that still leaves a problem, what data type to use to
represent the options between getopt and seek?
2011-11-22 14:06:31 -04:00
Joey Hess
fc2f0e8b1a response; cannot reproduce 2011-11-22 12:37:51 -04:00
Joey Hess
d1ecd381c9 Merge branch 'master' of ssh://git-annex.branchable.com 2011-11-22 12:22:28 -04:00
https://www.google.com/accounts/o8/id?id=AItOawnBJ6Dv1glxzzi4qIzGFNa6F-mfHIvv9Ck
35b4706958 2011-11-22 07:09:24 +00:00
Joey Hess
297bcf194f Merge branch 'master' of ssh://git-annex.branchable.com 2011-11-21 18:37:40 -04:00
http://cgray.myopenid.com/
6c0448d94c 2011-11-21 22:24:04 +00:00
Joey Hess
0f0169fa99 comment update 2011-11-20 22:49:53 -04:00
Joey Hess
2768be7136 response 2011-11-20 14:19:03 -04:00
Joey Hess
40828a6299 Merge branch 'master' of ssh://git-annex.branchable.com 2011-11-20 14:15:29 -04:00
Joey Hess
d675f1c82e status --json now shows most things
Left out the backend usage graph for now, and bad/temp directory sizes
are only displayed when present. Also, disk usage is returned as a string
with units, which I can see changing later.
2011-11-20 14:12:48 -04:00
Joey Hess
128b4bd015 tweaks 2011-11-19 15:57:08 -04:00
Joey Hess
0fa1d136dc tweak 2011-11-19 15:40:40 -04:00
Joey Hess
32d9813b1d tweak 2011-11-19 15:27:10 -04:00
Joey Hess
3905053a18 update comment to explain non-obvious temp file 2011-11-19 15:16:38 -04:00
Joey Hess
1b90918cec avoid error message when doing get --from on file not present on remote 2011-11-18 17:26:37 -04:00
https://www.google.com/accounts/o8/id?id=AItOawnBJ6Dv1glxzzi4qIzGFNa6F-mfHIvv9Ck
1de00df636 2011-11-18 21:12:30 +00:00
Joey Hess
c50a5fbeb4 status: Include all special remotes in the list of repositories.
Special remotes do not always have a description listed in uuid.log,
and such ones were not listed before.
2011-11-18 13:22:48 -04:00