Commit graph

79 commits

Author SHA1 Message Date
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
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
4594bd51c1 rename file 2011-03-15 22:04:50 -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
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
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
cf4c926f2e more Wall cleaning 2010-10-31 16:00:32 -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
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