aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Utility/Scheduled.hs12
-rw-r--r--debian/changelog6
-rw-r--r--doc/news/version_5.20140227.mdwn32
-rw-r--r--doc/news/version_5.20140411.mdwn13
-rw-r--r--git-annex.cabal2
5 files changed, 29 insertions, 36 deletions
diff --git a/Utility/Scheduled.hs b/Utility/Scheduled.hs
index 2b7cae2b6..1b25cb4c7 100644
--- a/Utility/Scheduled.hs
+++ b/Utility/Scheduled.hs
@@ -86,7 +86,7 @@ nextTime schedule lasttime = do
{- Calculate the next time that fits a Schedule, based on the
- last time it occurred, and the current time. -}
calcNextTime :: Schedule -> Maybe LocalTime -> LocalTime -> Maybe NextTime
-calcNextTime (Schedule recurrance scheduledtime) lasttime currenttime
+calcNextTime schedule@(Schedule recurrance scheduledtime) lasttime currenttime
| scheduledtime == AnyTime = do
next <- findfromtoday True
return $ case next of
@@ -108,7 +108,13 @@ calcNextTime (Schedule recurrance scheduledtime) lasttime currenttime
window startd endd = NextTimeWindow
(LocalTime startd nexttime)
(LocalTime endd (TimeOfDay 23 59 0))
- findfrom r afterday candidate = case r of
+ findfrom r afterday candidate
+ | ynum candidate > (ynum (localDay currenttime)) + 100 =
+ -- avoid possible infinite recusion
+ error $ "bug: calcNextTime did not find a time within 100 years to run " ++
+ show (schedule, lasttime, currenttime)
+ | otherwise = findfromChecked r afterday candidate
+ findfromChecked r afterday candidate = case r of
Daily
| afterday -> Just $ exactly $ addDays 1 candidate
| otherwise -> Just $ exactly candidate
@@ -121,7 +127,7 @@ calcNextTime (Schedule recurrance scheduledtime) lasttime currenttime
| otherwise -> skip 1
Monthly Nothing
| afterday -> skip 1
- | maybe True (\old -> mnum candidate > mnum old && mday candidate >= (mday old `mod` minmday)) lastday ->
+ | maybe True (\old -> mday candidate > mday old && mday candidate >= (mday old `mod` minmday)) lastday ->
-- Window only covers current month,
-- in case there is a Divisible requirement.
Just $ window candidate (endOfMonth candidate)
diff --git a/debian/changelog b/debian/changelog
index 0c0bfafdb..a883ddda9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+git-annex (5.20140412) unstable; urgency=high
+
+ * Last release didn't quite fix the high cpu issue in all cases, this should.
+
+ -- Joey Hess <joeyh@debian.org> Fri, 11 Apr 2014 17:14:38 -0400
+
git-annex (5.20140411) unstable; urgency=high
* importfeed: Filename template can now contain an itempubdate variable.
diff --git a/doc/news/version_5.20140227.mdwn b/doc/news/version_5.20140227.mdwn
deleted file mode 100644
index 57f0c9a53..000000000
--- a/doc/news/version_5.20140227.mdwn
+++ /dev/null
@@ -1,32 +0,0 @@
-git-annex 5.20140227 released with [[!toggle text="these changes"]]
-[[!toggleable text="""
- * metadata: Field names limited to alphanumerics and a few whitelisted
- punctuation characters to avoid issues with views, etc.
- * metadata: Field names are now case insensative.
- * When constructing views, metadata is available about the location of the
- file in the view's reference branch. Allows incorporating parts of the
- directory hierarchy in a view.
- For example `git annex view tag=* podcasts/=*` makes a view in the form
- tag/showname.
- * --metadata field=value can now use globs to match, and matches
- case insensatively, the same as git annex view field=value does.
- * annex.genmetadata can be set to make git-annex automatically set
- metadata (year and month) when adding files.
- * Make annex.web-options be used in several places that call curl.
- * Fix handling of rsync remote urls containing a username,
- including rsync.net.
- * Preserve metadata when staging a new version of an annexed file.
- * metadata: Support --json
- * webapp: Fix creation of box.com and Amazon S3 and Glacier
- repositories, broken in 5.20140221.
- * webdav: When built with DAV 0.6.0, use the new DAV monad to avoid
- locking files, which is not needed by git-annex's use of webdav, and
- does not work on Box.com.
- * webdav: Fix path separator bug when used on Windows.
- * repair: Optimise unpacking of pack files, and avoid repeated error
- messages about corrupt pack files.
- * Add build dep on regex-compat to fix build on mipsel, which lacks
- regex-tdfa.
- * Disable test suite on sparc, which is missing optparse-applicative.
- * Put non-object tmp files in .git/annex/misctmp, leaving .git/annex/tmp
- for only partially transferred objects."""]] \ No newline at end of file
diff --git a/doc/news/version_5.20140411.mdwn b/doc/news/version_5.20140411.mdwn
new file mode 100644
index 000000000..8e4bb2121
--- /dev/null
+++ b/doc/news/version_5.20140411.mdwn
@@ -0,0 +1,13 @@
+git-annex 5.20140411 released with [[!toggle text="these changes"]]
+[[!toggleable text="""
+ * importfeed: Filename template can now contain an itempubdate variable.
+ Needs feed 0.3.9.2.
+ * Fix rsync progress parsing in locales that use comma in number display.
+ Closes: #[744148](http://bugs.debian.org/744148)
+ * assistant: Fix high CPU usage triggered when a monthly fsck is scheduled,
+ and the last time the job ran was a day of the month &gt; 12. This caused a
+ runaway loop. Thanks to Anarcat for his assistance, and to Maximiliano
+ Curia for identifying the cause of this bug.
+ * Remove wget from OSX dmg, due to issues with cert paths that broke
+ git-annex automatic upgrading. Instead, curl is used, unless the
+ OSX system has wget installed, which will then be used."""]] \ No newline at end of file
diff --git a/git-annex.cabal b/git-annex.cabal
index ccbd14724..855fecd5a 100644
--- a/git-annex.cabal
+++ b/git-annex.cabal
@@ -1,5 +1,5 @@
Name: git-annex
-Version: 5.20140411
+Version: 5.20140412
Cabal-Version: >= 1.8
License: GPL-3
Maintainer: Joey Hess <joey@kitenet.net>