Commit graph

112 commits

Author SHA1 Message Date
Joey Hess
4bf1a5ef59 refactor 2011-09-23 18:13:24 -04:00
Joey Hess
9f6b7935dd go go gadget hlint 2011-09-20 23:24:48 -04:00
Joey Hess
dd463a3100 rework annex-ignore handling
Only one place need to filter the list of remotes for ignored remotes:
keyPossibilities. Make the full list available to everything else.

This allows getting rid of the special case handing for --from and --to
to make ignored remotes not be ignored with those options.
2011-09-18 20:11:39 -04:00
Joey Hess
999d5df90b factor out firstM and anyM
Control.Monad.Loops has these, but has no Debian package yet.
2011-08-28 15:46:49 -04:00
Joey Hess
f82da1d9dc show a message if asked to get something from the web that is not there 2011-08-27 07:08:15 -04:00
Joey Hess
203148363f split groups of related functions out of Utility 2011-08-22 16:14:12 -04:00
Joey Hess
737b5d14c9 moved files around 2011-08-20 16:11:42 -04:00
Joey Hess
ec746c511f note about why curl -# is used
I'd rather use wget really, but as git-annex uses libcurl elsewhere, it
seems best to stick with curl. And making this configurable seems
overboard.
2011-08-20 12:52:29 -04:00
Joey Hess
b7a4ff1c31 optimise initialized check
Avoid running external command if annex.version is set.
2011-08-17 18:38:26 -04:00
Joey Hess
32f27cc3e8 when reading configs of local repos, first initializeSafe
This auto-generates a uuid if the local repo does not already have one.
2011-08-17 14:44:31 -04:00
Joey Hess
f5449aae16 error out when dropping from http repo 2011-08-16 21:20:14 -04:00
Joey Hess
5ccb926b51 support for getting files from http git remotes 2011-08-16 21:04:23 -04:00
Joey Hess
a55faff08f reorg Remote/* 2011-08-16 20:49:54 -04:00
Joey Hess
4545a0e78c split out generic url stuff into a helper library from Remote.Web 2011-08-16 20:49:44 -04:00
Joey Hess
07f2e7ee72 support reading git config from http remotes
The config file is downloaded to a temp file, and git-config run on that
to parse it.
2011-08-16 20:48:11 -04:00
Joey Hess
dd8e649f49 fix file name for web remote log files
The key name was not being sufficiently escaped, although it didn't break
anything due to luck. Switch to properly escaped key names for the log
filename, with a fallback to the buggy old name.
2011-08-06 14:45:58 -04:00
Joey Hess
45bbf210a1 Fix shell escaping in rsync special remote. 2011-07-29 15:28:21 +02:00
Joey Hess
00153eed48 unify elipsis handling
And add a simple dots-based progress display, currently only used in v2
upgrade.
2011-07-19 14:07:23 -04:00
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
c98b5cf36e rename 2011-07-05 20:24:10 -04:00
Joey Hess
9f1577f746 remove unused backend machinery
The only remaining vestiage of backends is different types of keys. These
are still called "backends", mostly to avoid needing to change user interface
and configuration. But everything to do with storing keys in different
backends was gone; instead different types of remotes are used.

In the refactoring, lots of code was moved out of odd corners like
Backend.File, to closer to where it's used, like Command.Drop and
Command.Fsck. Quite a lot of dead code was removed. Several data structures
became simpler, which may result in better runtime efficiency. There should
be no user-visible changes.
2011-07-05 19:57:46 -04:00
Joey Hess
5c69ac14eb Drop the dependency on the haskell curl bindings, use regular haskell HTTP. 2011-07-04 19:33:11 -04:00
Joey Hess
e6b9539a65 make curl follow redirs 2011-07-01 21:52:27 -04:00
Joey Hess
ace9de37e8 download urls via tmp file, and support resuming 2011-07-01 18:59:40 -04:00
Joey Hess
79016c197c add hashing to web log files 2011-07-01 17:23:01 -04:00
Joey Hess
6bddebdb79 add the addurl command 2011-07-01 17:15:46 -04:00
Joey Hess
cdbcd6f495 add web special remote
Generalized LocationLog to PresenceLog, and use a presence log to record
urls for the web special remote.
2011-07-01 15:30:42 -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
c4e6730042 commit git-annex branch when copying to a remote (locally)
Otherwise, the location log changes are only staged in its index,
and this can confuse matters if pulling or cloning from the remote.

The test suite was failing because this wasn't done.
2011-06-22 21:21:09 -04:00
Joey Hess
d0482d4154 bigfix: stat parent dirs 2011-06-13 21:46:28 -04:00
Joey Hess
30d7cce7ec rsync is now used when copying files from repos on other filesystems
cp is still used when copying file from repos on the same filesystem, since
--reflink=auto can make it significantly faster on filesystems such as
btrfs.

Directory special remotes still use cp, not rsync. It's not clear what
tmp file should be used when rsyncing to such a remote.
2011-06-13 20:33:52 -04:00
Joey Hess
19428ea2f4 fix building with S3 stub 2011-06-10 12:11:34 -04:00
Joey Hess
703c437bd9 rename modules for data types into Types/ directory 2011-06-01 21:56:04 -04:00
Joey Hess
93a4f3d4e6 Add --debug option. Closes: #627499
This takes advantage of the debug logging done by missingh, and I added
my own debug messages for executeFile calls. There are still some other
low-level ways git-annex runs stuff that are not shown by debugging,
but this gets most of it easily.
2011-05-21 11:52:13 -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
760cde28b6 more pointless monadic golfing 2011-05-16 14:49:28 -04:00
Joey Hess
0a7bcd47ae IA: do not create bucket at initremote time
This way, the metadata sent when uploading a file is applied to the bucket
then.
2011-05-16 13:10:26 -04:00
Joey Hess
1d2984441c add a few tweaks to make it easy to use the Internet Archive's variant of S3
In particular, munge key filenames to comply with the IA's filename limits,
disable encryption, support their nonstandard way of creating buckets, and
allow x-amz-* headers to be specified in initremote to set item metadata.

Still TODO: initremote does not handle multiword metadata headers right.
2011-05-16 11:20:35 -04:00
Joey Hess
79c74bf27d refactor 2011-05-16 09:42:54 -04:00
Joey Hess
3e15a8a791 Maybe reduction pass 2 2011-05-15 12:25:58 -04:00
Joey Hess
cad0e1c8b7 simplified a bunch of Maybe handling 2011-05-15 03:38:08 -04:00
Joey Hess
3c319cd844 avoid always decrypting cipher
Last change moved cipher decryption to remote setup time.
Fixed this with a bit of a hack.
2011-05-01 15:13:54 -04:00
Joey Hess
2ddade8132 factor out base64 code 2011-05-01 14:27:40 -04:00
Joey Hess
1f84c7a964 S3: When encryption is enabled, the Amazon S3 login credentials are stored, encrypted, in .git-annex/remotes.log, so environment variables need not be set after the remote is initialized. 2011-05-01 14:05:10 -04:00
Joey Hess
cf501d3b9b set ANNEX_HASH_* always 2011-04-29 14:04:20 -04:00
Joey Hess
3ab3f41aea hook special remote implemented, and tested 2011-04-28 17:21:45 -04:00
Joey Hess
d7b330b33b Fix hasKeyCheap setting for bup and rsync special remotes. 2011-04-28 14:39:51 -04:00
Joey Hess
39966ba4ee filter out --delete rsync option
rsync does not have a --no-delete, so do it this way instead
2011-04-27 20:31:56 -04:00