rename option
This commit is contained in:
parent
7d2d600a11
commit
84d431a679
3 changed files with 13 additions and 13 deletions
|
@ -46,16 +46,16 @@ startIncrementalOption = Option.flag ['S'] "incremental" "start an incremental f
|
|||
moreIncrementalOption :: Option
|
||||
moreIncrementalOption = Option.flag ['m'] "more" "continue an incremental fsck"
|
||||
|
||||
incrementalRestartOption :: Option
|
||||
incrementalRestartOption = Option.field [] "incremental-restart" paramTime
|
||||
"schedule an incremental fsck"
|
||||
incrementalScheduleOption :: Option
|
||||
incrementalScheduleOption = Option.field [] "incremental-schedule" paramTime
|
||||
"schedule incremental fscking"
|
||||
|
||||
options :: [Option]
|
||||
options =
|
||||
[ fromOption
|
||||
, startIncrementalOption
|
||||
, moreIncrementalOption
|
||||
, incrementalRestartOption
|
||||
, incrementalScheduleOption
|
||||
]
|
||||
|
||||
seek :: [CommandSeek]
|
||||
|
@ -67,8 +67,8 @@ seek =
|
|||
|
||||
withIncremental :: (Incremental -> CommandSeek) -> CommandSeek
|
||||
withIncremental = withValue $ do
|
||||
i <- maybe (return False) (checkrestart . parseDuration)
|
||||
=<< Annex.getField (Option.name incrementalRestartOption)
|
||||
i <- maybe (return False) (checkschedule . parseDuration)
|
||||
=<< Annex.getField (Option.name incrementalScheduleOption)
|
||||
starti <- Annex.getFlag (Option.name startIncrementalOption)
|
||||
morei <- Annex.getFlag (Option.name moreIncrementalOption)
|
||||
case (i, starti, morei) of
|
||||
|
@ -83,8 +83,8 @@ withIncremental = withValue $ do
|
|||
recordStartTime
|
||||
return StartIncremental
|
||||
|
||||
checkrestart Nothing = error "bad --incremental-restart value"
|
||||
checkrestart (Just delta) = do
|
||||
checkschedule Nothing = error "bad --incremental-schedule value"
|
||||
checkschedule (Just delta) = do
|
||||
Annex.addCleanup "" $ do
|
||||
v <- getStartTime
|
||||
case v of
|
||||
|
|
2
debian/changelog
vendored
2
debian/changelog
vendored
|
@ -8,7 +8,7 @@ git-annex (3.20120925) UNRELEASED; urgency=low
|
|||
Thanks, Justin Azoff
|
||||
* New --time-limit option, makes long git-annex commands stop after
|
||||
a specified amount of time.
|
||||
* fsck: New --incremental-restart option which is nice for scheduling
|
||||
* fsck: New --incremental-schedule option which is nice for scheduling
|
||||
eg, monthly incremental fsck runs in cron jobs.
|
||||
|
||||
-- Joey Hess <joeyh@debian.org> Mon, 24 Sep 2012 19:58:07 -0400
|
||||
|
|
|
@ -266,17 +266,17 @@ subdirectories).
|
|||
the next time you fsck, you can specify --more to skip over
|
||||
files that have already been checked, and continue where it left off.
|
||||
|
||||
The --incremental-restart option makes a new incremental fsck be
|
||||
The --incremental-schedule option makes a new incremental fsck be
|
||||
started a configurable time after the last incremental fsck was started.
|
||||
Note that the current incremental fsck has to completely finish
|
||||
before the restart happens.
|
||||
Once the current incremental fsck has completely finished, it causes
|
||||
a new one to start.
|
||||
|
||||
Maybe you'd like to run a fsck for 5 hours at night, picking up each
|
||||
night where it left off. You'd like this to continue until all files
|
||||
have been fscked. And once it's done, you'd like a new fsck pass to start,
|
||||
but no more often than once a month. Then put this in a nightly cron job:
|
||||
|
||||
git annex fsck --incremental-restart 30d --time-limit 5h
|
||||
git annex fsck --incremental-schedule 30d --time-limit 5h
|
||||
|
||||
* unused
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue