Commit graph

102 commits

Author SHA1 Message Date
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