Commit graph

145 commits

Author SHA1 Message Date
Joey Hess
9db8ec210f split out two more Git modules 2011-12-13 15:24:23 -04:00
Joey Hess
13fff71f20 split out three modules from Git
Constructors and configuration make sense in separate modules.
A separate Git.Types is needed to avoid cycles.
2011-12-13 15:06:49 -04:00
Joey Hess
d64132a43a hslint 2011-12-09 01:57:13 -04:00
Joey Hess
9a67f9cb8d use Control.Exception's brackets 2011-11-26 12:08:54 -04:00
Joey Hess
63a292324d add a UUID type
Should have done this a long time ago.
2011-11-07 15:59:16 -04:00
Joey Hess
3d3e1c4c25 better command name 2011-10-31 15:18:41 -04:00
Joey Hess
380839299e The fromkey command now takes the key as its first parameter. The --key option is no longer used. 2011-10-31 12:56:07 -04:00
Joey Hess
1826b3bd67 cleanup 2011-10-27 18:01:52 -04:00
Joey Hess
ee9af605bc break out non-log stuff to separate module 2011-10-15 17:47:03 -04:00
Joey Hess
1a29b5b52e reorganize log modules
no code changes
2011-10-15 16:21:08 -04:00
Joey Hess
b505ba83e8 minor syntax changes 2011-10-11 14:43:45 -04:00
Joey Hess
3e0d2a0803 add timestamp to uuid.log
* New or changed repository descriptions in uuid.log now have a timestamp,
  which is used to ensure the newest description is used when the uuid.log
  has been merged.
* Note that older versions of git-annex will display the timestamp as part
  of the repository description, which is ugly but otherwise harmless.
2011-10-06 15:31:25 -04:00
Joey Hess
8ef2095fa0 factor out common imports
no code changes
2011-10-03 23:29:48 -04:00
Joey Hess
4050c24d7b ssh 2011-09-29 21:11:48 -04:00
Joey Hess
26bb45d12a update test suite for smarter unused 2011-09-28 17:48:11 -04:00
Joey Hess
5ae270001c fix 2011-09-28 15:17:45 -04:00
Joey Hess
984c9fc052 remove optimize subcommand; use --auto instead
get, drop: Added --auto option, which decides whether to get/drop content
as needed to work toward the configured numcopies.

The problem with bundling it up in optimize was that I then found I wanted
to run an optmize that did not drop files, only got them. Considered adding
a --only-get switch to it, but that seemed wrong. Instead, let's make
existing subcommands optionally smarter.

Note that the only actual difference between drop and drop --auto is that
the latter does not even try to drop a file if it knows of not enough
copies, and does not print any error messages about files it was unable to
drop.

It might be nice to make get avoid asking git for attributes when not in
auto mode. For now it always asks for attributes.
2011-09-15 13:30:04 -04:00
Joey Hess
949b3f69d0 optimize: A new subcommand that either gets or drops file content as needed to work toward meeting the configured numcopies setting.
This is currently rather simplistic, though still useful.
In the future, it could become smarter about what content is stored where,
etc.
2011-09-14 13:47:22 -04:00
Joey Hess
20259c2955 Set EMAIL when running test suite so that git does not need to be configured first. Closes: #638998 2011-08-23 13:41:32 -04:00
Joey Hess
203148363f split groups of related functions out of Utility 2011-08-22 16:14:12 -04:00
Joey Hess
e784757376 hlint tweaks
Did all sources except Remotes/* and Command/*
2011-07-15 03:12:05 -04:00
Joey Hess
7919de73af Bugfix: Make add ../ work.
The complication of check-attr returning absolute paths that have to be
converted back to relative paths..
2011-07-10 13:52:53 -04:00
Joey Hess
6040d8aed1 factor out RemoteLog 2011-07-05 20:16:57 -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
f6063a094e renamed GitRepo to Git
It was always imported qualified as Git anyway
2011-06-30 13:21:39 -04:00
Joey Hess
4c8770c646 reove 2 tests that no longer make sense (state is not autocommitted) 2011-06-22 19:52:13 -04:00
Joey Hess
d70e9a945b remove some tests that no longer make sense 2011-06-22 17:15:33 -04:00
Joey Hess
d3f0106f2e move LocationLog into Annex monad from IO
It will need to run in Annex so it can use Branch
2011-06-22 14:27:50 -04:00
Joey Hess
66f5b390fe fix test suite 2011-06-13 21:51:52 -04:00
Joey Hess
703c437bd9 rename modules for data types into Types/ directory 2011-06-01 21:56:04 -04:00
Joey Hess
93c5fb5da7 support remote config values with spaces and other characters 2011-05-16 13:07:56 -04:00
Joey Hess
b400984ddf fixup 2011-05-15 01:33:25 -04:00
Joey Hess
dbdcb67f79 fix test suite when run by root 2011-04-26 20:26:25 -04:00
Joey Hess
948691e893 exit nonzero when there were failure, not just errors
ya, I need a test suite for my test suite
2011-04-26 20:26:19 -04:00
Joey Hess
3d3abab679 move quickcheck Arbitrary declaration into test suite
So git-annex can build w/o quickcheck installed.
2011-04-25 15:28:41 -04:00
Joey Hess
e433c6f0bb generalized relPathDirTo functions 2011-04-25 13:36:39 -04:00
Joey Hess
b72de39ba4 add test to ensure hmac remains stable 2011-04-21 16:56:24 -04:00
Joey Hess
50cfcdf54b make encrypted remotes have slightly higher costs 2011-04-17 01:13:21 -04:00
Joey Hess
688e94fd30 convert test to Remote 2011-03-27 16:58:28 -04:00
Joey Hess
30f427700f converted several commands to use Remote
only move and map still to convert
2011-03-27 16:55:43 -04:00
Joey Hess
49b7f59183 test suite passes again
doesn't test remote functionality.. but that may be working too now
2011-03-15 22:53:14 -04:00
Joey Hess
4594bd51c1 rename file 2011-03-15 22:04:50 -04:00
Joey Hess
fe09c2b723 a new Key data type with metadata 2011-03-15 17:53:39 -04:00
Joey Hess
bc2df77642 Bugfix: When fsck detected and moved away corrupt file content, it did not update the location log. 2011-03-03 21:34:30 -04:00
Joey Hess
d25a854085 remove redundant imports 2011-03-03 14:59:45 -04:00
Joey Hess
a3daac8a8b only enable SHA backends that configure finds support for 2011-03-02 13:47:45 -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
3390183400 Make test suite not rely on a working cp -pr.
(The Unix wars are still ON!)
2011-02-13 14:19:14 -04:00
Joey Hess
cf27ae2753 regression test for multi-file unannex 2011-02-09 11:19:19 -04:00
Joey Hess
82bc10d5ea test: Set git user name and email in case git can't guess values. 2011-02-09 11:17:26 -04:00
Joey Hess
62ebeb00d9 simpler approach 2011-02-09 01:01:06 -04:00
Joey Hess
7a0826293e test: Don't rely on chmod -R working.
Sometimes I wish I could give all my users a real OS.
2011-02-09 00:12:45 -04:00
Joey Hess
1b0edc1ab2 idiomatic elem 2011-01-30 12:13:34 -04:00
Joey Hess
4f9336bb60 idiom 2011-01-27 17:58:30 -04:00
Joey Hess
9d3ba00a15 add test of adding a second file with the same sha1 2011-01-27 14:01:30 -04:00
Joey Hess
15d27232bd test untrusted repo handling 2011-01-26 20:03:03 -04:00
Joey Hess
7f6af79232 trust setting improvements 2011-01-26 16:20:28 -04:00
Joey Hess
268cb35e64 implement 3 level trust storage in trust.log 2011-01-26 15:37:16 -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
082b022f9a successfully split Annex and AnnexState out of TypeInternals 2011-01-25 21:49:04 -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
59c9eda962 on second thought, unlock should fail if content is not present 2011-01-14 00:02:33 -04:00
Joey Hess
c1839fdccb unlock: Fix behavior when file content is not present. 2011-01-13 23:46:02 -04:00
Joey Hess
5869e7ccd5 test unused et al 2011-01-12 01:58:23 -04:00
Joey Hess
611018e4bd I thought that reversion a migration might fail. It didn't. :) 2011-01-11 23:02:59 -04:00
Joey Hess
e18a4d566b migrate: Fix support for --backend option. 2011-01-11 21:32:38 -04:00
Joey Hess
b557a2ccf4 test migrate; 75% 2011-01-11 21:11:32 -04:00
Joey Hess
b13039d62e test precommit; 74% 2011-01-11 20:48:58 -04:00
Joey Hess
098168559d more fsck checks
72% coverage
2011-01-11 20:06:15 -04:00
Joey Hess
485dbdd1a9 add tests of setkey/fromkey 2011-01-11 19:59:11 -04:00
Joey Hess
cc7db6f058 test fsck 2011-01-11 19:34:28 -04:00
Joey Hess
cebee37401 add tests for trust/untrust 2011-01-11 18:50:18 -04:00
Joey Hess
a8ce30401d add checks that location log files are committed
currently failing for move --to
2011-01-11 16:00:40 -04:00
Joey Hess
3a844b1f3c test locationlog contents too 2011-01-11 15:43:29 -04:00
Joey Hess
9de982eab7 copyright years 2011-01-08 16:09:17 -04:00
Joey Hess
32b0e10390 unannex: Now skips files whose content is not present, rather than it being an error. This allows gradual conversion from one backend to another by running unannex followed by add in each repository. 2011-01-08 15:14:41 -04:00
Joey Hess
82fe151f87 add another test and improve error handling 2011-01-08 15:00:04 -04:00
Joey Hess
d31e61a90d add news item for git-annex 0.16 2011-01-07 14:36:52 -04:00
Joey Hess
a14c881f02 more 2011-01-07 14:08:43 -04:00
Joey Hess
f3472d3a5d Test suite improvements. Current top-level test coverage: 65% 2011-01-07 14:06:32 -04:00
Joey Hess
7d15a5795a more tests 2011-01-07 02:18:39 -04:00
Joey Hess
3fad3e527e various test fixes 2011-01-07 02:14:48 -04:00
Joey Hess
e29d237693 more tests 2011-01-07 01:02:06 -04:00
Joey Hess
f4a26f01ea more tests 2011-01-06 22:22:09 -04:00
Joey Hess
87f424eca7 more tests 2011-01-06 21:39:26 -04:00
Joey Hess
2533d826fc make test suite link in git-annex's commands and run directly
this way, test coverage works
2011-01-06 20:26:57 -04:00
Joey Hess
901cdbde78 added some toplevel git-annex subcommand tests
note that test coverage doesn't work for those yet
2011-01-06 20:09:49 -04:00
Joey Hess
a323463726 add more tests 2011-01-04 21:27:08 -04:00
Joey Hess
759e860e4b add testcoverage target using hpc
added a test for key read and show
2011-01-04 21:05:31 -04:00
Joey Hess
5c29bb3b7c git-annex-shell can now be used as a login shell 2010-12-31 20:33:43 -04:00
Joey Hess
b6ecfc916e tweak 2010-11-18 14:08:46 -04:00
Joey Hess
515d6b6c7d Avoid using runghc to run test suite as it is not available on all architectures. Closes: #603006 2010-11-10 10:49:35 -04:00
Joey Hess
6395b790ce Reorganised the layout of .git/annex/ 2010-11-08 17:00:34 -04:00
Joey Hess
606ed6bb35 better test framework 2010-11-02 17:08:16 -04:00
Joey Hess
d93a372894 add a stupid test harness 2010-11-02 16:49:35 -04:00