Commit graph

158 commits

Author SHA1 Message Date
Joey Hess
703c437bd9 rename modules for data types into Types/ directory 2011-06-01 21:56:04 -04:00
Joey Hess
971ab27e78 better types allowed breaking module dep loop 2011-06-01 19:11:27 -04:00
Joey Hess
a8fb97d2ce Add --trust, --untrust, and --semitrust options. 2011-06-01 17:57:31 -04:00
Joey Hess
3d567aa64f Add --numcopies option. 2011-06-01 16:49:17 -04:00
Joey Hess
2a8efc7af1 Added filename extension preserving variant backends SHA1E, SHA256E, etc. 2011-05-16 11:46:34 -04:00
Joey Hess
5d8e0d5a1c remove unused file 2011-04-29 12:20:59 -04:00
Joey Hess
b889543507 let's use Maybe String for commands that may not be avilable 2011-04-07 21:47:56 -04:00
Fraser Tweedale
f5b2d650bb recognise differently-named shaN programs 2011-04-08 10:08:11 +10:00
Joey Hess
48418cb92b reexport RemoteClass from Remote for cleanliness 2011-03-27 17:12:32 -04:00
Joey Hess
f30320aa75 add remotes slot to Annex
This required parameterizing the type for Remote, to avoid a cycle.
2011-03-27 16:17:56 -04:00
Joey Hess
b40f253d6e start of generalizing remotes
Goal is to support multiple different types of remotes, some of which
are not git repositories. To that end, added a Remote class, and moved
git remote specific code into Remote.GitRemote.

Remotes.hs is still present as some code has not been converted to use the
new Remote class yet.
2011-03-27 16:04:25 -04:00
Joey Hess
6246b807f7 migrate: Support migrating v1 SHA keys to v2 SHA keys with size information that can be used for free space checking. 2011-03-23 17:57:10 -04:00
Joey Hess
c43e3b5c78 check key size when available, no matter the backend
Now that SHA and other backends can have size info, fsck should check it
whenever available.
2011-03-23 02:10:59 -04:00
Joey Hess
c21998722c fast mode
Add --fast flag, that can enable less expensive, but also less thurough versions of some commands.

* Add --fast flag, that can enable less expensive, but also less thurough
  versions of some commands.
* fsck: In fast mode, avoid checking checksums.
* unused: In fast mode, just show all existing temp files as unused,
  and avoid expensive scan for other unused content.
2011-03-22 17:41:06 -04:00
Joey Hess
7b5b127608 Fix dropping of files using the URL backend. 2011-03-17 11:49:21 -04:00
Joey Hess
da504f647f fromkey, and url backend download work now 2011-03-15 22:28:18 -04:00
Joey Hess
4594bd51c1 rename file 2011-03-15 22:04:50 -04:00
Joey Hess
9d49fe2c17 first pass at using new keys
It compiles. It sorta works. Several subcommands are FIXME marked and
broken, because things that used to accept separate --backend and --key
params need to be changed to accept just a --key that encodes all the key
info, now that there is metadata in keys.
2011-03-15 21:34:13 -04:00
Joey Hess
72d2684016 Rethink filename encoding handling for display. Since filename encoding may or may not match locale settings, any attempt to decode filenames will fail for some files. So instead, do all output in binary mode. 2011-03-12 15:30:17 -04:00
Joey Hess
a3daac8a8b only enable SHA backends that configure finds support for 2011-03-02 13:47:45 -04:00
Joey Hess
1b9c4477fb New backends: SHA512 SHA384 SHA256 SHA224 2011-03-01 17:07:15 -04:00
Joey Hess
b7f4801801 generic SHA size support 2011-03-01 16:50:53 -04:00
Joey Hess
4cd96ad2db rename 2011-02-28 16:25:31 -04:00
Joey Hess
fcdc4797a9 use ShellParam type
So, I have a type checked safe handling of filenames starting with dashes,
throughout the code.
2011-02-28 16:18:55 -04:00
Joey Hess
836e71297b Support filenames that start with a dash; when such a file is passed to a utility it will be escaped to avoid it being interpreted as an option. 2011-02-25 01:13:01 -04:00
Joey Hess
5a50a7cf13 update unicode FilePath handling
Based on http://hackage.haskell.org/trac/ghc/ticket/3307 ,
whether FilePath contains decoded unicode varies by OS.
So, add a configure check for it.

Also, renamed showFile to filePathToString
2011-02-11 15:37:37 -04:00
Joey Hess
fe55b4644e Fix display of unicode filenames.
Internally, the filenames are stored as un-decoded unicode.
I tried decoding them, but then haskell tries to access the wrong files.
Hmm.

So, I've unhappily chosen option "B", which is to decode filenames before
they are displayed.
2011-02-10 14:21:44 -04:00
Joey Hess
1b0edc1ab2 idiomatic elem 2011-01-30 12:13:34 -04:00
Joey Hess
167523f09d better directory handling
Rename Locations functions for better consitency, and make their values
more consistent too.

Used </> rather than manually building paths. There are still more places
that manually do so, but are tricky, due to the behavior of </> when
the second FilePath is absolute. So I only changed places where
it obviously was relative.
2011-01-27 17:00:32 -04:00
Joey Hess
5e54eb79b8 less verbose 2011-01-27 15:12:38 -04:00
Joey Hess
e1d213d6e3 make filename available to fsck messages 2011-01-26 20:37:46 -04:00
Joey Hess
3cb5cb6bf6 bring back display of keys
in fsck -q, that's the only way to know what file it means
2011-01-26 20:08:37 -04:00
Joey Hess
ee2e94f087 this should be a warning 2011-01-26 20:03:12 -04:00
Joey Hess
1a11085a50 drop: suppprt untrusted repos 2011-01-26 19:35:35 -04:00
Joey Hess
6b48f740f1 rework note 2011-01-26 17:47:02 -04:00
Joey Hess
ba748a1198 fsck: handle untrusted repos 2011-01-26 17:44:40 -04:00
Joey Hess
b7903eb2d1 move partitioning out of keyPossibilities
And a bug fix in passing.
2011-01-26 16:44:14 -04:00
Joey Hess
616d1d4a20 rename TypeInternals to BackendTypes
Now that it only contains types used by the backends
2011-01-26 00:37:50 -04:00
Joey Hess
6a97b10fcb rework config storage
Moved away from a map of flags to storing config directly in the AnnexState
structure. Got rid of most accessor functions in Annex.

This allowed supporting multiple --exclude flags.
2011-01-26 00:17:38 -04:00
Joey Hess
082b022f9a successfully split Annex and AnnexState out of TypeInternals 2011-01-25 21:49:04 -04:00
Joey Hess
109a719b03 parameterize Backend type
This allows the Backend type to not depend on the Annex type, and
so the Annex type can later be moved out of TypeInternals.
2011-01-25 21:02:34 -04:00
Joey Hess
e7b557ef5d got rid of Core module
Most of it was to do with managing annexed Content, so put there
2011-01-16 16:05:05 -04:00
Joey Hess
d134da6dab tweak message 2011-01-05 20:28:50 -04:00
Joey Hess
700aed13cf git-annex-shell now exclusively used for all remote access 2010-12-31 19:09:17 -04:00
Joey Hess
e64ffc212e support trusted repositories that are not configured as remotes 2010-12-29 16:58:44 -04:00
Joey Hess
1448d8b42d improve list of remotes in error message 2010-12-29 16:41:27 -04:00
Joey Hess
885f7048d5 Fix bug in numcopies handling when a repoisitory has multiple remotes that point to the same repository. 2010-12-29 16:31:25 -04:00
Joey Hess
d475aac375 refactor 2010-12-29 16:21:38 -04:00
Joey Hess
ee5d81429d tweak 2010-12-28 17:19:01 -04:00
Joey Hess
aa4f91b2d6 Add trust and untrust subcommands, to allow configuring remotes that are trusted to retain files without explicit checking. 2010-12-28 17:17:02 -04:00
Joey Hess
904af72b82 better message 2010-12-24 19:25:59 -04:00
Joey Hess
07648e2daa remove note that looked ugly with resume message 2010-12-02 17:52:23 -04:00
Joey Hess
fe4f1aae4b include key in message 2010-11-28 17:33:01 -04:00
Joey Hess
949e4abc56 fsck: Fix warning about not enough copies of a file, when locations are known, but are not available in currently configured remotes. 2010-11-28 17:26:15 -04:00
Joey Hess
653ad35a9f In .gitattributes, the git-annex-numcopies attribute can be used to control the number of copies to retain of different types of files. 2010-11-28 15:28:20 -04:00
Joey Hess
eeae910242 finished hlinting 2010-11-22 17:51:55 -04:00
Joey Hess
0893820812 fsck: Print warnings to stderr; --quiet can now be used to only see problems. 2010-11-15 18:37:49 -04:00
Joey Hess
dd573e7010 fsck bugfixes 2010-11-13 15:40:12 -04:00
Joey Hess
abebbcfd54 fsck improvements 2010-11-13 15:24:36 -04:00
Joey Hess
5fa25a812a fsck improvements
* fsck: Check if annex.numcopies is satisfied.
* fsck: Verify the sha1 of files when the SHA1 backend is used.
* fsck: Verify the size of files when the WORM backend is used.
* fsck: Allow specifying individual files to fsk if fscking everything
  is not desired.
* fsck: Fix bug, introduced in 0.04, in detection of unused data.
2010-11-13 14:59:27 -04:00
Joey Hess
070e8530c1 refactoring, no code changes really 2010-11-08 15:15:21 -04:00
Joey Hess
bdb7ed76cf tweak 2010-11-02 02:24:19 -04:00
Joey Hess
58c89565e9 updat 2010-11-01 22:50:53 -04:00
Joey Hess
cf4c926f2e more Wall cleaning 2010-10-31 16:00:32 -04:00
Joey Hess
7c0777c60d avoid unnessary newlines before progress in quiet mode 2010-10-29 14:10:55 -04:00
Joey Hess
d92f186fc4 convert safeSystem to boolSystem
to fix ctrl-c handling
2010-10-29 14:07:26 -04:00
Joey Hess
045b051ec1 got rid of almost all 'return ()' 2010-10-28 12:40:05 -04:00
Joey Hess
833d4b342e copyright statements 2010-10-27 16:53:54 -04:00
Joey Hess
7bd7cca399 some work on the sha1 backend; still incomplete 2010-10-27 15:00:41 -04:00
Joey Hess
68e2687661 short-circuit as soon as enough remotes are verified to have a file 2010-10-25 21:15:29 -04:00
Joey Hess
eea140c90d handle better the case of a disconnected drive remote 2010-10-25 21:06:31 -04:00
Joey Hess
08236e780f reorg 2010-10-23 14:14:36 -04:00
Joey Hess
9dfbf40d1a reorg remote key presense checking code
Also, it now checks if a key is inAnnex, ie, cached in .git/annex, not if
it is present in a remote. For the File Backend, these are equivilant, not
so for other backends.
2010-10-23 13:18:47 -04:00
Joey Hess
f4e2dde8a8 fix perl refugee code 2010-10-22 20:47:14 -04:00
Joey Hess
3dbba26275 reorg 2010-10-22 15:56:57 -04:00
Joey Hess
aafb63edb1 support checking network remotes when dropping 2010-10-22 15:06:57 -04:00
Joey Hess
9ec5d90b6a avoid reading configs for URL remotes every time 2010-10-22 14:28:47 -04:00
Joey Hess
9f13f3ac5e support using scp for ssh remotes 2010-10-22 13:25:19 -04:00
Joey Hess
19fde4960d new fromkey subcommand, for registering urls, etc
had to redo Annex monad's flag storage
2010-10-21 16:30:16 -04:00
Joey Hess
d53519fade probably won't use SHA module 2010-10-19 16:30:17 -04:00
Joey Hess
4f8d28819d improved messages when a file is not available in remotes 2010-10-19 14:13:48 -04:00
Joey Hess
ed3f6653b6 better drop error messages 2010-10-19 13:39:53 -04:00
Joey Hess
470e0a2fbd use boolSystem 2010-10-19 01:46:07 -04:00
Joey Hess
c7664588f8 use safesystem 2010-10-19 01:19:56 -04:00
Joey Hess
f3dcc8489d gratuitous rename 2010-10-18 02:06:27 -04:00
Joey Hess
335c06171a commit logs at end; faster 2010-10-17 18:52:09 -04:00
Joey Hess
8398b9ab4a cleanup output 2010-10-17 13:17:34 -04:00
Joey Hess
6d4fc0ca7e command output cleanup 2010-10-17 13:13:49 -04:00
Joey Hess
b471822cfe move supportedBackends list into annex monad
This was necessary so the File backend could import Backend w/o a cycle.

Moved code that checks whether enough backends have a file into File
backend.
2010-10-17 11:47:36 -04:00
Joey Hess
a0b040524a remove checksum from WORM
with size and mtime in the key, it's redundant
2010-10-17 00:33:05 -04:00
Joey Hess
c57b1a697c add visible size and time to worm keys 2010-10-17 00:10:04 -04:00
Joey Hess
909f619c07 tweaks 2010-10-16 16:20:49 -04:00
Joey Hess
6d13ae10cf git annex describe 2010-10-16 16:15:31 -04:00
Joey Hess
5de102d5b9 rename backends more 2010-10-15 19:33:10 -04:00
Joey Hess
e67887d98b lift to IO 2010-10-15 19:32:56 -04:00
Joey Hess
44b8f7c95d better worm keys 2010-10-15 18:57:05 -04:00
Joey Hess
1f585912e2 use basename as key 2010-10-15 16:52:47 -04:00
Joey Hess
395625d0a7 rename file -> WORM 2010-10-15 16:42:50 -04:00
Joey Hess
4c3ad80f32 bugfix 2010-10-14 20:05:04 -04:00
Joey Hess
b8ba60428a changed key to include backend name 2010-10-14 19:36:11 -04:00