summaryrefslogtreecommitdiff
path: root/test.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-09-15 13:30:04 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-09-15 13:30:04 -0400
commit984c9fc0523bcd3bfcd7de83f4f7974daa6872bc (patch)
tree21b8ad88a6f300b98a21f6f3e4644920fa24c058 /test.hs
parent81984e60acb920fffc969818e63604060636aa09 (diff)
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.
Diffstat (limited to 'test.hs')
-rw-r--r--test.hs12
1 files changed, 0 insertions, 12 deletions
diff --git a/test.hs b/test.hs
index bd2e1e46c..4d751a707 100644
--- a/test.hs
+++ b/test.hs
@@ -93,7 +93,6 @@ blackbox = TestLabel "blackbox" $ TestList
, test_unannex
, test_drop
, test_get
- , test_optimize
, test_move
, test_copy
, test_lock
@@ -217,17 +216,6 @@ test_get = "git-annex get" ~: TestCase $ intmpclonerepo $ do
inmainrepo $ unannexed ingitfile
unannexed ingitfile
-test_optimize :: Test
-test_optimize = "git-annex optimize" ~: TestCase $ intmpclonerepo $ do
- inmainrepo $ annexed_present annexedfile
- annexed_notpresent annexedfile
- git_annex "optimize" ["-q", annexedfile, "--numcopies=2"] @? "optimize of file failed"
- inmainrepo $ annexed_present annexedfile
- annexed_present annexedfile
- git_annex "optimize" ["-q", annexedfile] @? "optimize of file failed"
- inmainrepo $ annexed_present annexedfile
- annexed_notpresent annexedfile
-
test_move :: Test
test_move = "git-annex move" ~: TestCase $ intmpclonerepo $ do
annexed_notpresent annexedfile