Commit graph

175 commits

Author SHA1 Message Date
Joey Hess
6c396a256c finished hlint pass 2011-07-15 12:47:14 -04:00
Joey Hess
cab4ac247c rename 2011-07-05 20:36:43 -04:00
Joey Hess
f6063a094e renamed GitRepo to Git
It was always imported qualified as Git anyway
2011-06-30 13:21:39 -04:00
Joey Hess
703c437bd9 rename modules for data types into Types/ directory 2011-06-01 21:56:04 -04:00
Joey Hess
21d9c84e72 more standard names for whenM and unlessM operators
These are defined in ifelse, but it's not currently available and I don't
want to pull in a library for 6 lines of code anyhow.

Also, ifelse sets the fixity to 1, which does not allow >>? error $ ...
2011-05-17 11:45:24 -04:00
Joey Hess
c91929f693 add whenM and unlessM
Just more golfing.. I am pretty sure something in a library somewhere can
do this, but I have been unable to find it.
2011-05-17 03:13:11 -04:00
Joey Hess
cad0e1c8b7 simplified a bunch of Maybe handling 2011-05-15 03:38:08 -04:00
Joey Hess
d7b330b33b Fix hasKeyCheap setting for bup and rsync special remotes. 2011-04-28 14:39:51 -04:00
Joey Hess
5985acdfad bup: Avoid memory leak when transferring encrypted data.
This was a most surprising leak. It occurred in the process that is forked
off to feed data to gpg. That process was passed a lazy ByteString of
input, and ghc seemed to not GC the ByteString as it was lazily read
and consumed, so memory slowly leaked as the file was read and passed
through gpg to bup.

To fix it, I simply changed the feeder to take an IO action that returns
the lazy bytestring, and fed the result directly to hPut.

AFAICS, this should change nothing WRT buffering. But somehow it makes
ghc's GC do the right thing. Probably I triggered some weakness in ghc's
GC (version 6.12.1).

(Note that S3 still has this leak, and others too. Fixing it will involve
another dance with the type system.)

Update: One theory I have is that this has something to do with
the forking of the feeder process. Perhaps, when the ByteString
is produced before the fork, ghc decides it need to hold a pointer
to the start of it, for some reason -- maybe it doesn't realize that
it is only used in the forked process.
2011-04-19 15:27:03 -04:00
Joey Hess
d9690a9b5d cleanup 2011-04-17 13:11:38 -04:00
Joey Hess
9606409b9d bup encryption support 100% working 2011-04-17 00:57:11 -04:00
Joey Hess
b6b04642c8 rename 2011-04-17 00:40:23 -04:00
Joey Hess
d996637fd6 fix stall while storing encrypted data in bup
Forking a new process rather than relying on a thread to feed gpg.
The feeder thread was stalling, probably when the main thread got
to the point it was wait()ing on the gpg to exit.
2011-04-17 00:34:38 -04:00
Joey Hess
480cc353c4 incomplete and buggy encryption support for bup
Some kind of laziness issue that I don't want to debug right now,
and decryption is not implemented.
2011-04-16 23:01:29 -04:00
Joey Hess
7fdf20f577 encryption key management working
Encrypted remotes don't yet encrypt data, but git annex initremote can
be used to generate a cipher and add additional gpg keys that can use it.
2011-04-16 13:25:27 -04:00
Joey Hess
1e84dab4c8 RemoteConfig type 2011-04-15 15:09:36 -04:00
Joey Hess
66950189fc actually check that bup has keys
I don't trust the location log, even for bup. Too many things could go
wrong.
2011-04-09 15:41:16 -04:00
Joey Hess
54286c993d support bup repositories on removable media 2011-04-09 12:59:18 -04:00
Joey Hess
f808a83350 more buprepo fixes 2011-04-09 12:45:30 -04:00
Joey Hess
c739c7d787 change name of buprepo
Instead of remote=, use buprepo=

Anyone already using bup will need to re-run git annex initremote.
2011-04-09 12:41:17 -04:00
Joey Hess
141e55ff11 store annex.uuid in bup repos 2011-04-09 12:34:49 -04:00
Joey Hess
c5174f0cb8 make local bup repos a bit more expensive than local git repos
does have to run bup and reassemble files, after all
2011-04-08 23:08:21 -04:00
Joey Hess
1bfd3922c0 set cost for local bup repos to cheap 2011-04-08 21:37:59 -04:00
Joey Hess
c253d07a82 minor 2011-04-08 20:55:22 -04:00
Joey Hess
44c65f40b7 bup is now supported as a special type of remote. 2011-04-08 16:44:43 -04:00