From 63d0c9cc115fdb7cc1e3814a536a287baac464ab Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 5 Apr 2014 18:36:44 -0400 Subject: cleanup --- .../comment_2_bcbf2e982397a20821fbc163fd8faa18._comment | 8 -------- 1 file changed, 8 deletions(-) delete mode 100644 doc/forum/A_tiny_filesystem__63__/comment_2_bcbf2e982397a20821fbc163fd8faa18._comment diff --git a/doc/forum/A_tiny_filesystem__63__/comment_2_bcbf2e982397a20821fbc163fd8faa18._comment b/doc/forum/A_tiny_filesystem__63__/comment_2_bcbf2e982397a20821fbc163fd8faa18._comment deleted file mode 100644 index 849cb139d..000000000 --- a/doc/forum/A_tiny_filesystem__63__/comment_2_bcbf2e982397a20821fbc163fd8faa18._comment +++ /dev/null @@ -1,8 +0,0 @@ -[[!comment format=mdwn - username="http://joeyh.name/" - ip="209.250.56.244" - subject="comment 2" - date="2014-04-05T22:35:40Z" - content=""" -git-annex can indeed be sped up by preventing modification of files in the tree. you can do this by running \"git annex indirect\" -"""]] -- cgit v1.2.3 From 2b1bc5725dc1e85d4e3343eb9751a5223960f4f0 Mon Sep 17 00:00:00 2001 From: "https://openid.stackexchange.com/user/e65e6d0e-58ba-41de-84cc-1f2ba54cf574" Date: Tue, 8 Apr 2014 03:47:26 +0000 Subject: Added a comment: Encrypt with pub or sub? --- ...ent_2_0bd22cec899dd5d1e4d090b34c5ec1eb._comment | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 doc/encryption/comment_2_0bd22cec899dd5d1e4d090b34c5ec1eb._comment diff --git a/doc/encryption/comment_2_0bd22cec899dd5d1e4d090b34c5ec1eb._comment b/doc/encryption/comment_2_0bd22cec899dd5d1e4d090b34c5ec1eb._comment new file mode 100644 index 000000000..4436ccc14 --- /dev/null +++ b/doc/encryption/comment_2_0bd22cec899dd5d1e4d090b34c5ec1eb._comment @@ -0,0 +1,22 @@ +[[!comment format=mdwn + username="https://openid.stackexchange.com/user/e65e6d0e-58ba-41de-84cc-1f2ba54cf574" + nickname="Mica Semrick" + subject="Encrypt with pub or sub?" + date="2014-04-08T03:47:25Z" + content=""" +Forgive me, I'm a bit new to PGP. + + I do: +``` +$ gpg --list-keys +/home/users/.gnupg/pubring.gpg +------------------------------ +pub 2048R/3339656A 2014-04-03 +uid Me (git-annex key) +sub 2048R/774B0ET4 2014-04-03 + +``` +and see the `pub` and the `sub` key. + +When I `init` a new special remote and want encryption, should I give the `init` command the `pub` or the `sub` key? Or does git annex sort that out itself? +"""]] -- cgit v1.2.3 From 117b7d861feb9842ce53df48f0812de09eb47e9c Mon Sep 17 00:00:00 2001 From: "https://openid.stackexchange.com/user/e65e6d0e-58ba-41de-84cc-1f2ba54cf574" Date: Tue, 8 Apr 2014 03:50:55 +0000 Subject: removed --- ...ent_2_0bd22cec899dd5d1e4d090b34c5ec1eb._comment | 22 ---------------------- 1 file changed, 22 deletions(-) delete mode 100644 doc/encryption/comment_2_0bd22cec899dd5d1e4d090b34c5ec1eb._comment diff --git a/doc/encryption/comment_2_0bd22cec899dd5d1e4d090b34c5ec1eb._comment b/doc/encryption/comment_2_0bd22cec899dd5d1e4d090b34c5ec1eb._comment deleted file mode 100644 index 4436ccc14..000000000 --- a/doc/encryption/comment_2_0bd22cec899dd5d1e4d090b34c5ec1eb._comment +++ /dev/null @@ -1,22 +0,0 @@ -[[!comment format=mdwn - username="https://openid.stackexchange.com/user/e65e6d0e-58ba-41de-84cc-1f2ba54cf574" - nickname="Mica Semrick" - subject="Encrypt with pub or sub?" - date="2014-04-08T03:47:25Z" - content=""" -Forgive me, I'm a bit new to PGP. - - I do: -``` -$ gpg --list-keys -/home/users/.gnupg/pubring.gpg ------------------------------- -pub 2048R/3339656A 2014-04-03 -uid Me (git-annex key) -sub 2048R/774B0ET4 2014-04-03 - -``` -and see the `pub` and the `sub` key. - -When I `init` a new special remote and want encryption, should I give the `init` command the `pub` or the `sub` key? Or does git annex sort that out itself? -"""]] -- cgit v1.2.3 From 53d3fa89afbf3239c904f73d5e611e112b5816c6 Mon Sep 17 00:00:00 2001 From: "https://openid.stackexchange.com/user/e65e6d0e-58ba-41de-84cc-1f2ba54cf574" Date: Tue, 8 Apr 2014 03:56:37 +0000 Subject: Added a comment: Encrypt with pub or sub? --- ...ent_2_f19c9bb519a7017f0731fd0e8780ed74._comment | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 doc/encryption/comment_2_f19c9bb519a7017f0731fd0e8780ed74._comment diff --git a/doc/encryption/comment_2_f19c9bb519a7017f0731fd0e8780ed74._comment b/doc/encryption/comment_2_f19c9bb519a7017f0731fd0e8780ed74._comment new file mode 100644 index 000000000..bf4330383 --- /dev/null +++ b/doc/encryption/comment_2_f19c9bb519a7017f0731fd0e8780ed74._comment @@ -0,0 +1,22 @@ +[[!comment format=mdwn + username="https://openid.stackexchange.com/user/e65e6d0e-58ba-41de-84cc-1f2ba54cf574" + nickname="Mica Semrick" + subject="Encrypt with pub or sub?" + date="2014-04-08T03:56:36Z" + content=""" +Forgive me, I'm a bit new to PGP. + +I do: + + $ gpg --list-keys + /home/user/.gnupg/pubring.gpg + ------------------------------ + pub 2048R/41363A6A 2014-04-03 + uid A Guy (git-annex key) + sub 2048R/77998J8TDY 2014-04-03 + +and see the pub and the sub key. + +When I init a new special remote and want encryption, should I give the init command the pub or the sub key? Or does git annex sort that out itself? + +"""]] -- cgit v1.2.3 From f47646dc36e9e97aa70af88a17c3c56a109ca601 Mon Sep 17 00:00:00 2001 From: Fraser Tweedale Date: Tue, 8 Apr 2014 19:49:43 +1000 Subject: fix build failure with flags -Webapp -Quvi --- Annex.hs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Annex.hs b/Annex.hs index f00276e2f..8233e18b9 100644 --- a/Annex.hs +++ b/Annex.hs @@ -5,7 +5,7 @@ - Licensed under the GNU GPL version 3 or higher. -} -{-# LANGUAGE GeneralizedNewtypeDeriving, PackageImports #-} +{-# LANGUAGE CPP, GeneralizedNewtypeDeriving, PackageImports #-} module Annex ( Annex, @@ -63,7 +63,9 @@ import Types.DesktopNotify import Types.CleanupActions import qualified Data.Map as M import qualified Data.Set as S +#ifdef WITH_QUVI import Utility.Quvi (QuviVersion) +#endif {- git-annex's monad is a ReaderT around an AnnexState stored in a MVar. - This allows modifying the state in an exception-safe fashion. @@ -117,7 +119,9 @@ data AnnexState = AnnexState , useragent :: Maybe String , errcounter :: Integer , unusedkeys :: Maybe (S.Set Key) +#ifdef WITH_QUVI , quviversion :: Maybe QuviVersion +#endif , existinghooks :: M.Map Git.Hook.Hook Bool , desktopnotify :: DesktopNotify } @@ -160,7 +164,9 @@ newState c r = AnnexState , useragent = Nothing , errcounter = 0 , unusedkeys = Nothing +#ifdef WITH_QUVI , quviversion = Nothing +#endif , existinghooks = M.empty , desktopnotify = mempty } -- cgit v1.2.3 From 086b62d5fb96c32d6b5cf2516bb450fea14d92da Mon Sep 17 00:00:00 2001 From: Fraser Tweedale Date: Tue, 8 Apr 2014 23:37:04 +1000 Subject: .gitignore: add cabal sandbox dir and config files --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index b842cc93c..624675d27 100644 --- a/.gitignore +++ b/.gitignore @@ -23,6 +23,9 @@ html dist # Sandboxed builds cabal-dev +.cabal-sandbox +cabal.sandbox.config +cabal.config # Project-local emacs configuration .dir-locals.el # OSX related -- cgit v1.2.3 From 3aea3c99adeb380e3f10c47f39308a54a9192b11 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 8 Apr 2014 15:37:22 -0400 Subject: add contribute page, mention haskell on front page --- doc/contribute.mdwn | 12 ++++++++++++ doc/index.mdwn | 3 ++- 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 doc/contribute.mdwn diff --git a/doc/contribute.mdwn b/doc/contribute.mdwn new file mode 100644 index 000000000..5dc3eb5ed --- /dev/null +++ b/doc/contribute.mdwn @@ -0,0 +1,12 @@ +Help make git-annex better! + +* This website is a wiki, so you can edit and improve any page. +* Write a [[new_tip|tips]] explaining how to accomplish something with + git-annex. +* [[download]] the source code and send patches! +* If you know Haskell, git-annex has lots of Haskell code that + could be improved. See the [[coding_style]] and have at it. +* If you don't know Haskell, git-annex has many other coding opportunities. + You could work to improve the Android port (Java etc) or improve the + Javascript and CSS of the git-annex webapp, or work on porting libraries + needed by the Windows port. diff --git a/doc/index.mdwn b/doc/index.mdwn index 57bfe2408..9536ee148 100644 --- a/doc/index.mdwn +++ b/doc/index.mdwn @@ -39,7 +39,8 @@ files with git. ---- -git-annex is [[Free Software|license]] +git-annex is [[Free Software|license]], written in Haskell. +You can [[contribute]]! git-annex's wiki is powered by [Ikiwiki](http://ikiwiki.info/) and hosted by [Branchable](http://branchable.com/). -- cgit v1.2.3 From cf7f34c3789f3b0b02de068dcb3d390b4abb44cd Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 8 Apr 2014 18:27:08 -0400 Subject: devblog --- doc/devblog/day_149__remote_control_working.mdwn | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 doc/devblog/day_149__remote_control_working.mdwn diff --git a/doc/devblog/day_149__remote_control_working.mdwn b/doc/devblog/day_149__remote_control_working.mdwn new file mode 100644 index 000000000..9f92d96b1 --- /dev/null +++ b/doc/devblog/day_149__remote_control_working.mdwn @@ -0,0 +1,13 @@ +[[design/git-remote-daemon]] is tied into the assistant, and working! +Since it's not really ready yet, this is in the `remotecontrol` branch. + +My test case for this is two client repositories, both running +the assistant. Both have a bare git repository, accessed over ssh, +set up as their only remote, and no other way to keep in touch with +one-another. When I change a file in one repository, +the other one instantly notices the change and syncs. + +This is gonna be *awesome*. Much less need for XMPP. Windows will be fully +usable even without XMPP. Also, most of the work I did today will be fully +reused when the telehash backend gets built. The telehash-c developer is +making noises about it being almost ready for use, too! -- cgit v1.2.3 From 5abf9811d5d96032e6f6f90f66de280f84d7cb04 Mon Sep 17 00:00:00 2001 From: "https://id.koumbit.net/anarcat" Date: Tue, 8 Apr 2014 22:44:28 +0000 Subject: link to the haskell page, which has many teaching resources about it --- doc/index.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/index.mdwn b/doc/index.mdwn index 9536ee148..fd166212e 100644 --- a/doc/index.mdwn +++ b/doc/index.mdwn @@ -39,7 +39,7 @@ files with git. ---- -git-annex is [[Free Software|license]], written in Haskell. +git-annex is [[Free Software|license]], written in [Haskell](http://www.haskell.org/). You can [[contribute]]! git-annex's wiki is powered by [Ikiwiki](http://ikiwiki.info/) and -- cgit v1.2.3 From 7bbe6c9eec0716f90ad3dbccd558e4ee78aef080 Mon Sep 17 00:00:00 2001 From: "https://www.google.com/accounts/o8/id?id=AItOawl-xMSPoRHcT5d2nAc1K8pWVi-AexKkYik" Date: Tue, 8 Apr 2014 22:45:28 +0000 Subject: --- doc/forum/Walkthrough_for_direct_mode__63__.mdwn | 1 + 1 file changed, 1 insertion(+) create mode 100644 doc/forum/Walkthrough_for_direct_mode__63__.mdwn diff --git a/doc/forum/Walkthrough_for_direct_mode__63__.mdwn b/doc/forum/Walkthrough_for_direct_mode__63__.mdwn new file mode 100644 index 000000000..b3fae2944 --- /dev/null +++ b/doc/forum/Walkthrough_for_direct_mode__63__.mdwn @@ -0,0 +1 @@ +Hello Joey, I would be very much interested in a walkthrough for direct mode, as detailed as the one currently published. I see the comments in the current walkthrough on some differences to direct mode, but to me it is not obvious what best practices for git-annex use would be in direct mode, with and without the assistant. For a mix of Linux, OS X and Windows installations in the homes, it may also be interesting to see how to best set up the individual machines. Many thanks - -- cgit v1.2.3 From 264795c584811cf842f04f0eff1de77dcad2d2d2 Mon Sep 17 00:00:00 2001 From: augusto Date: Tue, 8 Apr 2014 22:46:18 +0000 Subject: Added a comment --- .../comment_3_3869c0472b50d7cf5e29ac0720f4f20f._comment | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 doc/forum/A_tiny_filesystem__63__/comment_3_3869c0472b50d7cf5e29ac0720f4f20f._comment diff --git a/doc/forum/A_tiny_filesystem__63__/comment_3_3869c0472b50d7cf5e29ac0720f4f20f._comment b/doc/forum/A_tiny_filesystem__63__/comment_3_3869c0472b50d7cf5e29ac0720f4f20f._comment new file mode 100644 index 000000000..9c1613ca7 --- /dev/null +++ b/doc/forum/A_tiny_filesystem__63__/comment_3_3869c0472b50d7cf5e29ac0720f4f20f._comment @@ -0,0 +1,10 @@ +[[!comment format=mdwn + username="augusto" + ip="177.98.104.136" + subject="comment 3" + date="2014-04-08T22:46:18Z" + content=""" +When I saw Sharebox's page on Github I had the impression it was vaporware. It has a section named \"Planned Interface\" and there are no updates for quite a while. + +Is it working? How to install/use it? +"""]] -- cgit v1.2.3 From 48f769db3946a4554283134c28152f55c86808ff Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 8 Apr 2014 18:52:35 -0400 Subject: how to send patches --- doc/contribute.mdwn | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/contribute.mdwn b/doc/contribute.mdwn index 5dc3eb5ed..540c1c4b1 100644 --- a/doc/contribute.mdwn +++ b/doc/contribute.mdwn @@ -10,3 +10,6 @@ Help make git-annex better! You could work to improve the Android port (Java etc) or improve the Javascript and CSS of the git-annex webapp, or work on porting libraries needed by the Windows port. + +To send patches, either include the patch in a bug report (small patch) +or put up a branch in a git repository containing your changes. -- cgit v1.2.3 From ef36052ffad69ee15c8d33d6d77a6f4d4c3170b1 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 8 Apr 2014 19:00:21 -0400 Subject: add day's sponsor --- doc/devblog/day_149__remote_control_working.mdwn | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/devblog/day_149__remote_control_working.mdwn b/doc/devblog/day_149__remote_control_working.mdwn index 9f92d96b1..56c108b7b 100644 --- a/doc/devblog/day_149__remote_control_working.mdwn +++ b/doc/devblog/day_149__remote_control_working.mdwn @@ -11,3 +11,5 @@ This is gonna be *awesome*. Much less need for XMPP. Windows will be fully usable even without XMPP. Also, most of the work I did today will be fully reused when the telehash backend gets built. The telehash-c developer is making noises about it being almost ready for use, too! + +Today's work was sponsored by Frédéric Schütz. -- cgit v1.2.3 From 0e6bcba43f778979f8e3534087690d3556cad2ba Mon Sep 17 00:00:00 2001 From: EvanDeaubl Date: Wed, 9 Apr 2014 03:28:25 +0000 Subject: Added a comment --- .../comment_5_cb98789c50c58f01055183dbaf7b4eba._comment | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 doc/bugs/git_annex_sync_in_direct_mode_does_not_honor_skip-worktree/comment_5_cb98789c50c58f01055183dbaf7b4eba._comment diff --git a/doc/bugs/git_annex_sync_in_direct_mode_does_not_honor_skip-worktree/comment_5_cb98789c50c58f01055183dbaf7b4eba._comment b/doc/bugs/git_annex_sync_in_direct_mode_does_not_honor_skip-worktree/comment_5_cb98789c50c58f01055183dbaf7b4eba._comment new file mode 100644 index 000000000..d40d2d789 --- /dev/null +++ b/doc/bugs/git_annex_sync_in_direct_mode_does_not_honor_skip-worktree/comment_5_cb98789c50c58f01055183dbaf7b4eba._comment @@ -0,0 +1,11 @@ +[[!comment format=mdwn + username="EvanDeaubl" + ip="24.251.129.149" + subject="comment 5" + date="2014-04-09T03:28:24Z" + content=""" +I'm afraid I abandoned this patch. It worked, but was still fidgety for being able to ignore parts of the tree. I found another way to do what I wanted by loading an indirect repo into /data and taking advantage of a surprise side effect in how the /sdcard filesystem translated the symlinks from the ext4 filesystem. + +I can probably scare it up from my archives, but it hasn't been kept up to date. The good news is (as I recall) the patch was pretty small. + +"""]] -- cgit v1.2.3 From 1e1da13d6b500b1b90b9a9620056ab16a0da48c1 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 9 Apr 2014 00:28:30 -0400 Subject: merge from propellor --- Utility/Scheduled.hs | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/Utility/Scheduled.hs b/Utility/Scheduled.hs index acbee70ff..11e3b569b 100644 --- a/Utility/Scheduled.hs +++ b/Utility/Scheduled.hs @@ -10,7 +10,11 @@ module Utility.Scheduled ( Recurrance(..), ScheduledTime(..), NextTime(..), + WeekDay, + MonthDay, + YearDay, nextTime, + startTime, fromSchedule, fromScheduledTime, toScheduledTime, @@ -21,9 +25,13 @@ module Utility.Scheduled ( prop_schedule_roundtrips ) where -import Common +import Utility.Data import Utility.QuickCheck +import Utility.PartialPrelude +import Utility.Misc +import Control.Applicative +import Data.List import Data.Time.Clock import Data.Time.LocalTime import Data.Time.Calendar @@ -41,9 +49,9 @@ data Recurrance | Weekly (Maybe WeekDay) | Monthly (Maybe MonthDay) | Yearly (Maybe YearDay) - -- Days, Weeks, or Months of the year evenly divisible by a number. - -- (Divisible Year is years evenly divisible by a number.) | Divisible Int Recurrance + -- ^ Days, Weeks, or Months of the year evenly divisible by a number. + -- (Divisible Year is years evenly divisible by a number.) deriving (Eq, Read, Show, Ord) type WeekDay = Int -- cgit v1.2.3 From 8ce27d1c6f4f5a197c3f263bd2fd7d6db39ec7a6 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 9 Apr 2014 16:33:10 -0400 Subject: devblog --- doc/assistant/connection.png | Bin 0 -> 3181 bytes doc/devblog/day_149__signal.mdwn | 14 ++++++++++++++ 2 files changed, 14 insertions(+) create mode 100644 doc/assistant/connection.png create mode 100644 doc/devblog/day_149__signal.mdwn diff --git a/doc/assistant/connection.png b/doc/assistant/connection.png new file mode 100644 index 000000000..3cd6bef86 Binary files /dev/null and b/doc/assistant/connection.png differ diff --git a/doc/devblog/day_149__signal.mdwn b/doc/devblog/day_149__signal.mdwn new file mode 100644 index 000000000..6a085b1e0 --- /dev/null +++ b/doc/devblog/day_149__signal.mdwn @@ -0,0 +1,14 @@ +The git-remote-daemon now robustly handles loss of signal, with +reconnection backoffs. And it detects if the remote ssh server has a too +old version of git-annex-shell and the webapp will display a warning +message. + +[[!img /assistant/connection.png]] + +Also, made the webapp show a network signal bars icon next to both +ssh and xmpp remotes that it's currently connected with. And, updated the +webapp's nudging to set up XMPP to now suggest either an XMPP or a ssh remote. + +I think that the `remotecontrol` branch is nearly ready for merging! + +Today's work was sponsored by Paul Tagliamonte. -- cgit v1.2.3 From a0b887e2fa0d8bc5cd664aff22f47734f229a926 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 9 Apr 2014 16:43:43 -0400 Subject: update --- doc/design/roadmap.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/design/roadmap.mdwn b/doc/design/roadmap.mdwn index 3fa261e6f..b7c48830d 100644 --- a/doc/design/roadmap.mdwn +++ b/doc/design/roadmap.mdwn @@ -11,7 +11,7 @@ Now in the * Month 5 user-driven features and polishing * Month 6 get Windows out of beta, [[!traillink design/metadata text="metadata and views"]] * Month 7 user-driven features and polishing -* **Month 8 [[!traillink assistant/telehash]]** +* **Month 8 [[!traillink git-remote-daemon]] [[!traillink assistant/telehash]]** * Month 9 [[!traillink assistant/gpgkeys]] [[!traillink assistant/sshpassword]] * Month 10 get [[assistant/Android]] out of beta * Month 11 [[!traillink assistant/chunks]] [[!traillink assistant/deltas]] -- cgit v1.2.3 From cfdc5b33a551eeb91317420ba4808858b6a60550 Mon Sep 17 00:00:00 2001 From: "https://www.google.com/accounts/o8/id?id=AItOawl64jV2rE8GMogJ6XuqESSkz78RVBgVdGw" Date: Thu, 10 Apr 2014 07:50:40 +0000 Subject: Added a comment: I can't add special remotes --- ...ent_2_6d6cc9cb7d03f6779d4bdc52ddcfab86._comment | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 doc/tips/googledriveannex/comment_2_6d6cc9cb7d03f6779d4bdc52ddcfab86._comment diff --git a/doc/tips/googledriveannex/comment_2_6d6cc9cb7d03f6779d4bdc52ddcfab86._comment b/doc/tips/googledriveannex/comment_2_6d6cc9cb7d03f6779d4bdc52ddcfab86._comment new file mode 100644 index 000000000..0574d3778 --- /dev/null +++ b/doc/tips/googledriveannex/comment_2_6d6cc9cb7d03f6779d4bdc52ddcfab86._comment @@ -0,0 +1,23 @@ +[[!comment format=mdwn + username="https://www.google.com/accounts/o8/id?id=AItOawl64jV2rE8GMogJ6XuqESSkz78RVBgVdGw" + nickname="Mesut" + subject="I can't add special remotes" + date="2014-04-10T07:50:39Z" + content=""" +Hi, + +I am new to git-annex and I want to use google drive as remote but I can't. + +I create syslink to `googledriveannex` in `/usr/local/bin`. + +When I execute below command, command waiting but not make anything: + +````` +$ git annex initremote googledrive type=external externaltype=googledrive encryption=shared folder=gitannex +initremote googledrive (encryption setup) # Waiting but does not do anything. +````` + +What I am doing wrong? + +Thanks for helps +"""]] -- cgit v1.2.3 From 3962386765a25fe46d360c0c813380593d26c302 Mon Sep 17 00:00:00 2001 From: "https://www.google.com/accounts/o8/id?id=AItOawl64jV2rE8GMogJ6XuqESSkz78RVBgVdGw" Date: Thu, 10 Apr 2014 07:52:05 +0000 Subject: removed --- ...ent_2_6d6cc9cb7d03f6779d4bdc52ddcfab86._comment | 23 ---------------------- 1 file changed, 23 deletions(-) delete mode 100644 doc/tips/googledriveannex/comment_2_6d6cc9cb7d03f6779d4bdc52ddcfab86._comment diff --git a/doc/tips/googledriveannex/comment_2_6d6cc9cb7d03f6779d4bdc52ddcfab86._comment b/doc/tips/googledriveannex/comment_2_6d6cc9cb7d03f6779d4bdc52ddcfab86._comment deleted file mode 100644 index 0574d3778..000000000 --- a/doc/tips/googledriveannex/comment_2_6d6cc9cb7d03f6779d4bdc52ddcfab86._comment +++ /dev/null @@ -1,23 +0,0 @@ -[[!comment format=mdwn - username="https://www.google.com/accounts/o8/id?id=AItOawl64jV2rE8GMogJ6XuqESSkz78RVBgVdGw" - nickname="Mesut" - subject="I can't add special remotes" - date="2014-04-10T07:50:39Z" - content=""" -Hi, - -I am new to git-annex and I want to use google drive as remote but I can't. - -I create syslink to `googledriveannex` in `/usr/local/bin`. - -When I execute below command, command waiting but not make anything: - -````` -$ git annex initremote googledrive type=external externaltype=googledrive encryption=shared folder=gitannex -initremote googledrive (encryption setup) # Waiting but does not do anything. -````` - -What I am doing wrong? - -Thanks for helps -"""]] -- cgit v1.2.3 From a2463425185352eb39ff7433cf2668c716006f94 Mon Sep 17 00:00:00 2001 From: ayutheos Date: Thu, 10 Apr 2014 07:52:37 +0000 Subject: Added a comment --- ...ent_2_b9a3a0104bc56f9110fc58c9df140f12._comment | 34 ++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 doc/bugs/git-annex_fails_to_initialize_under_Windows/comment_2_b9a3a0104bc56f9110fc58c9df140f12._comment diff --git a/doc/bugs/git-annex_fails_to_initialize_under_Windows/comment_2_b9a3a0104bc56f9110fc58c9df140f12._comment b/doc/bugs/git-annex_fails_to_initialize_under_Windows/comment_2_b9a3a0104bc56f9110fc58c9df140f12._comment new file mode 100644 index 000000000..1fcfc5a51 --- /dev/null +++ b/doc/bugs/git-annex_fails_to_initialize_under_Windows/comment_2_b9a3a0104bc56f9110fc58c9df140f12._comment @@ -0,0 +1,34 @@ +[[!comment format=mdwn + username="ayutheos" + ip="49.124.177.13" + subject="comment 2" + date="2014-04-10T07:52:36Z" + content=""" +I'm getting this error too. + + user@NOTEBOOK /d/pictures + $ git annex init \"photos\" + init photos + Detected a filesystem without fifo support. + + Disabling ssh connection caching. + + Detected a crippled filesystem. + + Enabling direct mode. + fatal: index file open failed: Invalid argument + git-annex: git [Param \"checkout\",Param \"-q\",Param \"-B\",Param \"annex/direct/master\"] failed + +git-annex version: + + user@NOTEBOOK /d/pictures + $ git annex version + git-annex version: 5.20140403-gdfa17fc + build flags: Assistant Webapp Webapp-secure Pairing Testsuite S3 WebDAV DNS Feeds Quvi TDFA CryptoHash + key/value backends: SHA256E SHA1E SHA512E SHA224E SHA384E SKEIN256E SKEIN512E SHA256 SHA1 SHA512 SHA224 SHA384 SKEIN256 SKEIN512 WORM URL + remote types: git gcrypt S3 bup directory rsync web webdav tahoe glacier hook external + local repository version: 5 + supported repository version: 5 + upgrade supported from repository versions: 2 3 4 + +"""]] -- cgit v1.2.3 From ce53e2221f0ac4f0ae3f8aa48b5bd8f2242bd682 Mon Sep 17 00:00:00 2001 From: "https://www.google.com/accounts/o8/id?id=AItOawl64jV2rE8GMogJ6XuqESSkz78RVBgVdGw" Date: Thu, 10 Apr 2014 07:55:56 +0000 Subject: Added a comment: I can't add google drive as remote --- ...ent_2_c98c00e87bc921158c9c3698fd9f89c9._comment | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 doc/tips/googledriveannex/comment_2_c98c00e87bc921158c9c3698fd9f89c9._comment diff --git a/doc/tips/googledriveannex/comment_2_c98c00e87bc921158c9c3698fd9f89c9._comment b/doc/tips/googledriveannex/comment_2_c98c00e87bc921158c9c3698fd9f89c9._comment new file mode 100644 index 000000000..e90903b19 --- /dev/null +++ b/doc/tips/googledriveannex/comment_2_c98c00e87bc921158c9c3698fd9f89c9._comment @@ -0,0 +1,23 @@ +[[!comment format=mdwn + username="https://www.google.com/accounts/o8/id?id=AItOawl64jV2rE8GMogJ6XuqESSkz78RVBgVdGw" + nickname="Mesut" + subject="I can't add google drive as remote" + date="2014-04-10T07:55:56Z" + content=""" +Hi, + +I am new to git-annex and I want to use google drive as remote but I can't. + +I create syslink to `googledriveannex` in `/usr/local/bin`. + +When I execute below command, command waiting but not make anything: + +`$ git annex initremote googledrive type=external externaltype=googledrive encryption=shared folder=gitannex` + +`initremote googledrive (encryption setup)` # Waiting but does not do anything. + +What I am doing wrong? + +Thanks for helps + +"""]] -- cgit v1.2.3 From 24c8e0161ab828068cab51c1a6b53127649cff67 Mon Sep 17 00:00:00 2001 From: "https://me.yahoo.com/a/FHnTlSBo1eCGJRwueeKeB6.RCaPbGMPr5jxx8A--#ce0d8" Date: Thu, 10 Apr 2014 09:23:25 +0000 Subject: --- doc/todo/LIst_of_Available_Remotes_in_Webapp.mdwn | 1 + 1 file changed, 1 insertion(+) create mode 100644 doc/todo/LIst_of_Available_Remotes_in_Webapp.mdwn diff --git a/doc/todo/LIst_of_Available_Remotes_in_Webapp.mdwn b/doc/todo/LIst_of_Available_Remotes_in_Webapp.mdwn new file mode 100644 index 000000000..89274bb8d --- /dev/null +++ b/doc/todo/LIst_of_Available_Remotes_in_Webapp.mdwn @@ -0,0 +1 @@ +When using git-annex in a distributed fashion (lots of repos everywhere) It is easy to lose track of which remotes has a particular repo and enable it. Currently I have to run `git annex info` and see which remotes are available then add them through the webapp. Would it be possible to make webapp show all repos not just the ones it is syncing give an option to enable it. -- cgit v1.2.3 From 208414fc2946aed32787b4639e3e315c4697bbf4 Mon Sep 17 00:00:00 2001 From: "https://me.yahoo.com/a/FHnTlSBo1eCGJRwueeKeB6.RCaPbGMPr5jxx8A--#ce0d8" Date: Thu, 10 Apr 2014 09:34:36 +0000 Subject: --- doc/todo/Time_Stamping_of_Events_in_Webapp.mdwn | 1 + 1 file changed, 1 insertion(+) create mode 100644 doc/todo/Time_Stamping_of_Events_in_Webapp.mdwn diff --git a/doc/todo/Time_Stamping_of_Events_in_Webapp.mdwn b/doc/todo/Time_Stamping_of_Events_in_Webapp.mdwn new file mode 100644 index 000000000..a1f3fe6ea --- /dev/null +++ b/doc/todo/Time_Stamping_of_Events_in_Webapp.mdwn @@ -0,0 +1 @@ +Currently events happening in the webapp (sync upload etc. on the right) has no time stamp thus user has no way to tell when was the last sync happened. Which is problematic when not using XMPP and repos lag behind. -- cgit v1.2.3 From 65a66392e91dba09e3621dcdbd109ebf4cdb725e Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 10 Apr 2014 11:27:21 -0400 Subject: fix title (#150) --- doc/devblog/day_149__signal.mdwn | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/devblog/day_149__signal.mdwn b/doc/devblog/day_149__signal.mdwn index 6a085b1e0..7327c679c 100644 --- a/doc/devblog/day_149__signal.mdwn +++ b/doc/devblog/day_149__signal.mdwn @@ -1,3 +1,5 @@ +[[!meta title="day 150 signal"]] + The git-remote-daemon now robustly handles loss of signal, with reconnection backoffs. And it detects if the remote ssh server has a too old version of git-annex-shell and the webapp will display a warning -- cgit v1.2.3 From 9646083316973e935b177aa7c44c220d427e34ce Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 10 Apr 2014 12:54:58 -0400 Subject: 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. --- Build/BundledPrograms.hs | 5 +++++ debian/changelog | 3 +++ 2 files changed, 8 insertions(+) diff --git a/Build/BundledPrograms.hs b/Build/BundledPrograms.hs index d1f8cfd4a..dd78994b0 100644 --- a/Build/BundledPrograms.hs +++ b/Build/BundledPrograms.hs @@ -45,7 +45,12 @@ bundledPrograms = catMaybes #endif , SysConfig.gpg , ifset SysConfig.curl "curl" +#ifndef darwin_HOST_OS + -- wget on OSX has been problimatic, looking for certs in the wrong + -- places. Don't ship it, use curl or the OSX's own wget if it has + -- one. , ifset SysConfig.wget "wget" +#endif , ifset SysConfig.bup "bup" , SysConfig.lsof , SysConfig.gcrypt diff --git a/debian/changelog b/debian/changelog index 996f0ef04..f5cfb995e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,9 @@ git-annex (5.20140406) UNRELEASED; urgency=medium * importfeed: Filename template can now contain an itempubdate variable. Needs feed 0.3.9.2. + * 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. -- Joey Hess Mon, 07 Apr 2014 16:22:02 -0400 -- cgit v1.2.3 From d3e249b8ad7eaec5859e89715efe2c73b82ae883 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 10 Apr 2014 13:05:11 -0400 Subject: note automatic upgrade issue --- doc/assistant/release_notes.mdwn | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/doc/assistant/release_notes.mdwn b/doc/assistant/release_notes.mdwn index 13b7c62ab..f9de09e9e 100644 --- a/doc/assistant/release_notes.mdwn +++ b/doc/assistant/release_notes.mdwn @@ -1,3 +1,9 @@ +## version 5.20140406 + +Automatic upgrading was broken on OSX for previous versions. This has been +fixed, but you'll need to manually upgrade to this version to get it going +again. + ## version 5.20140221 The Windows port of the assistant and webapp is now considered to be beta -- cgit v1.2.3 From 2557e7d81b6814d66c0faab81fde840fe1a155c5 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 10 Apr 2014 13:08:07 -0400 Subject: nuke tmp dir so things don't linger between builds --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 45b9a578b..5c474e9ca 100644 --- a/Makefile +++ b/Makefile @@ -140,7 +140,7 @@ OSXAPP_BASE=$(OSXAPP_DEST)/Contents/MacOS/bundle osxapp: Build/Standalone Build/OSXMkLibs $(MAKE) git-annex - rm -rf "$(OSXAPP_DEST)" + rm -rf "$(OSXAPP_DEST)" "$(OSXAPP_BASE)" install -d tmp/build-dmg cp -R standalone/osx/git-annex.app "$(OSXAPP_DEST)" -- cgit v1.2.3 From e5b6f5b5f69ed5a76802e664c74870bc99f065e8 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 10 Apr 2014 13:27:47 -0400 Subject: update --- doc/assistant/release_notes.mdwn | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/assistant/release_notes.mdwn b/doc/assistant/release_notes.mdwn index f9de09e9e..7f13ce9e1 100644 --- a/doc/assistant/release_notes.mdwn +++ b/doc/assistant/release_notes.mdwn @@ -2,7 +2,9 @@ Automatic upgrading was broken on OSX for previous versions. This has been fixed, but you'll need to manually upgrade to this version to get it going -again. +again. (Note that the fix is currently only available in the daily builds, +not a released version.) Workaround: Remove the wget bundled inside the +git-annex dmg. ## version 5.20140221 -- cgit v1.2.3 From 1bdf98e0eecc93973e6bc064643edd5993138f24 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 10 Apr 2014 15:36:51 -0400 Subject: Fix rsync progress parsing in locales that use comma in number display. Closes: #744148 --- Utility/Rsync.hs | 5 ++++- debian/changelog | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Utility/Rsync.hs b/Utility/Rsync.hs index 2c5e39b6e..82166f645 100644 --- a/Utility/Rsync.hs +++ b/Utility/Rsync.hs @@ -124,6 +124,9 @@ rsyncUrlIsPath s - after the \r is the number of bytes processed. After the number, - there must appear some whitespace, or we didn't get the whole number, - and return the \r and part we did get, for later processing. + - + - In some locales, the number will have one or more commas in the middle + - of it. -} parseRsyncProgress :: String -> (Maybe Integer, String) parseRsyncProgress = go [] . reverse . progresschunks @@ -142,7 +145,7 @@ parseRsyncProgress = go [] . reverse . progresschunks parsebytes s = case break isSpace s of ([], _) -> Nothing (_, []) -> Nothing - (b, _) -> readish b + (b, _) -> readish $ filter (/= ',') b {- Filters options to those that are safe to pass to rsync in server mode, - without causing it to eg, expose files. -} diff --git a/debian/changelog b/debian/changelog index f5cfb995e..00ac22c20 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,6 +5,8 @@ git-annex (5.20140406) UNRELEASED; urgency=medium * 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. + * Fix rsync progress parsing in locales that use comma in number display. + Closes: #744148 -- Joey Hess Mon, 07 Apr 2014 16:22:02 -0400 -- cgit v1.2.3 From 8553ff8ef5a4f6662f7ed3556e6cb31703bb1a32 Mon Sep 17 00:00:00 2001 From: "https://www.google.com/accounts/o8/id?id=AItOawn6-8_3tbusU0Myh97-GGuGUY9bBoBP3bQ" Date: Fri, 11 Apr 2014 13:43:55 +0000 Subject: --- doc/forum/git_annex_assistant_-_Changing_repository_information.mdwn | 1 + 1 file changed, 1 insertion(+) create mode 100644 doc/forum/git_annex_assistant_-_Changing_repository_information.mdwn diff --git a/doc/forum/git_annex_assistant_-_Changing_repository_information.mdwn b/doc/forum/git_annex_assistant_-_Changing_repository_information.mdwn new file mode 100644 index 000000000..c4ef39a8f --- /dev/null +++ b/doc/forum/git_annex_assistant_-_Changing_repository_information.mdwn @@ -0,0 +1 @@ +Here's one thing I don't fully understand yet. If I add a remote repository, like an archive repository on Box—or if I want to change a transfer repository to an archive repository—do I need to add it or change it separately on each of my computers? Or just one? -- cgit v1.2.3 From cd5db2a5f926f48be8e4d77b3a0978c3594b472f Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 11 Apr 2014 12:03:40 -0400 Subject: update for g3 --- doc/tips/using_gitolite_with_git-annex.mdwn | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/doc/tips/using_gitolite_with_git-annex.mdwn b/doc/tips/using_gitolite_with_git-annex.mdwn index fcc3f96c3..746b6b17f 100644 --- a/doc/tips/using_gitolite_with_git-annex.mdwn +++ b/doc/tips/using_gitolite_with_git-annex.mdwn @@ -3,8 +3,6 @@ manager. Here's how to add git-annex support to gitolite, so you can `git annex copy` files to a gitolite repository, and `git annex get` files from it. -Warning : The method described here works with gitolite version g2, avaible in the g2 branch on github. There is an experimental support for g3 in the git-annex branch, if you tested it please add some feedback. - A nice feature of using gitolite with git-annex is that users can be given read-only access to a repository, and this allows them to `git annex get` file contents, but not change anything. @@ -12,7 +10,8 @@ file contents, but not change anything. First, you need new enough versions: * gitolite 2.2 is needed -- this version contains a git-annex-shell ADC - and supports "ua" ADCs. + and supports "ua" ADCs. Alternatively, gitoline g3 also recently added + support for git-annex. * git-annex 3.20111016 or newer needs to be installed on the gitolite server. Don't install an older version, it wouldn't be secure! @@ -39,6 +38,13 @@ cd /usr/local/lib/gitolite/adc/ua/ cp gitolite/contrib/adc/git-annex-shell . +If using gitolite g3, an additional setup step is needed: +In the ENABLE list in the rc file, add an entry like this: + +
+	'git-annex-shell ua',
+
+ Now all gitolite repositories can be used with git-annex just as any ssh remote normally would be used. For example: -- cgit v1.2.3 From e3260722fad082352ebcf13bdaf521efd78675d1 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 11 Apr 2014 12:08:31 -0400 Subject: note that GIT_ANNEX_SHELL_READONLY does not imply GIT_ANNEX_SHELL_LIMITED --- doc/git-annex-shell.mdwn | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/git-annex-shell.mdwn b/doc/git-annex-shell.mdwn index c6e8c05c0..eafb16468 100644 --- a/doc/git-annex-shell.mdwn +++ b/doc/git-annex-shell.mdwn @@ -106,6 +106,9 @@ changed. If set, disallows any command that could modify the repository. + Note that this does not prevent passing commands on to git-shell. + For that, you also need ... + * GIT_ANNEX_SHELL_LIMITED If set, disallows running git-shell to handle unknown commands. -- cgit v1.2.3 From 803d6ad2c41db8a3852702b94d2505ab30eb5626 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 11 Apr 2014 12:12:34 -0400 Subject: typo --- doc/git-annex-shell.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/git-annex-shell.mdwn b/doc/git-annex-shell.mdwn index eafb16468..26ccb9a40 100644 --- a/doc/git-annex-shell.mdwn +++ b/doc/git-annex-shell.mdwn @@ -67,7 +67,7 @@ first "/~/" or "/~user/" is expanded to the specified home directory. * notifychanges - This is used by `git-annex remote-daemon` to be notified when + This is used by `git-annex remotedaemon` to be notified when refs in the remote repository are changed. * gcryptsetup gcryptid -- cgit v1.2.3 From 12f57823be9706dd4756589c4d30c7bf24521def Mon Sep 17 00:00:00 2001 From: "http://joeyh.name/" Date: Fri, 11 Apr 2014 16:32:51 +0000 Subject: Added a comment --- .../comment_23_48a4c8d9dcc6cec243c6072090f26b6d._comment | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 doc/bugs/assistant_eats_all_CPU/comment_23_48a4c8d9dcc6cec243c6072090f26b6d._comment diff --git a/doc/bugs/assistant_eats_all_CPU/comment_23_48a4c8d9dcc6cec243c6072090f26b6d._comment b/doc/bugs/assistant_eats_all_CPU/comment_23_48a4c8d9dcc6cec243c6072090f26b6d._comment new file mode 100644 index 000000000..b6d2dec76 --- /dev/null +++ b/doc/bugs/assistant_eats_all_CPU/comment_23_48a4c8d9dcc6cec243c6072090f26b6d._comment @@ -0,0 +1,12 @@ +[[!comment format=mdwn + username="http://joeyh.name/" + ip="209.250.56.191" + subject="comment 23" + date="2014-04-11T16:32:47Z" + content=""" + the clock_gettime(0x2 and clock_gettime(0x3 are consistent with getCurrentTime and getTimeZone of nextTime + +So, that strongly points to the Cronner thread, and I doubt this is specific to stable at all. + +Please run git-annex vicfg, and paste all the \"schedule\" lines, from a repository that has the problem. That should allow me to reproduce and fix this bug. +"""]] -- cgit v1.2.3 From 1da5429a3356a93b2628232ebf442a735b20f2af Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 11 Apr 2014 14:34:09 -0400 Subject: 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 > 12. This caused a runaway loop. Thanks to Anarcat for his assistance, and to Maximiliano Curia for identifying the cause of this bug. --- Utility/Scheduled.hs | 2 +- debian/changelog | 4 ++++ doc/bugs/assistant_eats_all_CPU.mdwn | 7 +++++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/Utility/Scheduled.hs b/Utility/Scheduled.hs index 11e3b569b..e4b03aac4 100644 --- a/Utility/Scheduled.hs +++ b/Utility/Scheduled.hs @@ -121,7 +121,7 @@ calcNextTime (Schedule recurrance scheduledtime) lasttime currenttime | otherwise -> skip 1 Monthly Nothing | afterday -> skip 1 - | maybe True (\old -> mnum day > mday old && mday day >= (mday old `mod` minmday)) lastday -> + | maybe True (\old -> mnum day > mnum old && mday day >= (mday old `mod` minmday)) lastday -> -- Window only covers current month, -- in case there is a Divisible requirement. Just $ window day (endOfMonth day) diff --git a/debian/changelog b/debian/changelog index 00ac22c20..55c1ba396 100644 --- a/debian/changelog +++ b/debian/changelog @@ -7,6 +7,10 @@ git-annex (5.20140406) UNRELEASED; urgency=medium OSX system has wget installed, which will then be used. * Fix rsync progress parsing in locales that use comma in number display. Closes: #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 > 12. This caused a + runaway loop. Thanks to Anarcat for his assistance, and to Maximiliano + Curia for identifying the cause of this bug. -- Joey Hess Mon, 07 Apr 2014 16:22:02 -0400 diff --git a/doc/bugs/assistant_eats_all_CPU.mdwn b/doc/bugs/assistant_eats_all_CPU.mdwn index 4939bf456..719fca425 100644 --- a/doc/bugs/assistant_eats_all_CPU.mdwn +++ b/doc/bugs/assistant_eats_all_CPU.mdwn @@ -520,3 +520,10 @@ $ ps -O start xf | grep git-annex 13761 23:56:38 Z ? 00:00:00 \_ [git] 6252 12:56:59 S ? 00:01:09 /usr/bin/emacs23 """]] + +#### This bug is fixed + +> [[fixed|done]]. This was a Cronner bug, triggered when you had a +> scheduled fsck job that runs monthly at any time, and the last time it ran was on a day of a +> month > 12. Workaround: Disable scheduled fsck jobs, or change them to +> run on a specific day of the month. Or upgrade. --[[Joey]] -- cgit v1.2.3 From 9ea0f1feec4ec9d944e332b2656f5c9de75719ea Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 11 Apr 2014 14:38:23 -0400 Subject: rename confusingly named "day" --- Utility/Scheduled.hs | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/Utility/Scheduled.hs b/Utility/Scheduled.hs index e4b03aac4..2b7cae2b6 100644 --- a/Utility/Scheduled.hs +++ b/Utility/Scheduled.hs @@ -108,65 +108,65 @@ calcNextTime (Schedule recurrance scheduledtime) lasttime currenttime window startd endd = NextTimeWindow (LocalTime startd nexttime) (LocalTime endd (TimeOfDay 23 59 0)) - findfrom r afterday day = case r of + findfrom r afterday candidate = case r of Daily - | afterday -> Just $ exactly $ addDays 1 day - | otherwise -> Just $ exactly day + | afterday -> Just $ exactly $ addDays 1 candidate + | otherwise -> Just $ exactly candidate Weekly Nothing | afterday -> skip 1 - | otherwise -> case (wday <$> lastday, wday day) of - (Nothing, _) -> Just $ window day (addDays 6 day) + | otherwise -> case (wday <$> lastday, wday candidate) of + (Nothing, _) -> Just $ window candidate (addDays 6 candidate) (Just old, curr) - | old == curr -> Just $ window day (addDays 6 day) + | old == curr -> Just $ window candidate (addDays 6 candidate) | otherwise -> skip 1 Monthly Nothing | afterday -> skip 1 - | maybe True (\old -> mnum day > mnum old && mday day >= (mday old `mod` minmday)) lastday -> + | maybe True (\old -> mnum candidate > mnum old && mday candidate >= (mday old `mod` minmday)) lastday -> -- Window only covers current month, -- in case there is a Divisible requirement. - Just $ window day (endOfMonth day) + Just $ window candidate (endOfMonth candidate) | otherwise -> skip 1 Yearly Nothing | afterday -> skip 1 - | maybe True (\old -> ynum day > ynum old && yday day >= (yday old `mod` minyday)) lastday -> - Just $ window day (endOfYear day) + | maybe True (\old -> ynum candidate > ynum old && yday candidate >= (yday old `mod` minyday)) lastday -> + Just $ window candidate (endOfYear candidate) | otherwise -> skip 1 Weekly (Just w) | w < 0 || w > maxwday -> Nothing - | w == wday day -> if afterday - then Just $ exactly $ addDays 7 day - else Just $ exactly day + | w == wday candidate -> if afterday + then Just $ exactly $ addDays 7 candidate + else Just $ exactly candidate | otherwise -> Just $ exactly $ - addDays (fromIntegral $ (w - wday day) `mod` 7) day + addDays (fromIntegral $ (w - wday candidate) `mod` 7) candidate Monthly (Just m) | m < 0 || m > maxmday -> Nothing -- TODO can be done more efficiently than recursing - | m == mday day -> if afterday + | m == mday candidate -> if afterday then skip 1 - else Just $ exactly day + else Just $ exactly candidate | otherwise -> skip 1 Yearly (Just y) | y < 0 || y > maxyday -> Nothing - | y == yday day -> if afterday + | y == yday candidate -> if afterday then skip 365 - else Just $ exactly day + else Just $ exactly candidate | otherwise -> skip 1 Divisible n r'@Daily -> handlediv n r' yday (Just maxyday) Divisible n r'@(Weekly _) -> handlediv n r' wnum (Just maxwnum) Divisible n r'@(Monthly _) -> handlediv n r' mnum (Just maxmnum) Divisible n r'@(Yearly _) -> handlediv n r' ynum Nothing - Divisible _ r'@(Divisible _ _) -> findfrom r' afterday day + Divisible _ r'@(Divisible _ _) -> findfrom r' afterday candidate where - skip n = findfrom r False (addDays n day) + skip n = findfrom r False (addDays n candidate) handlediv n r' getval mmax | n > 0 && maybe True (n <=) mmax = - findfromwhere r' (divisible n . getval) afterday day + findfromwhere r' (divisible n . getval) afterday candidate | otherwise = Nothing - findfromwhere r p afterday day + findfromwhere r p afterday candidate | maybe True (p . getday) next = next | otherwise = maybe Nothing (findfromwhere r p True . getday) next where - next = findfrom r afterday day + next = findfrom r afterday candidate getday = localDay . startTime divisible n v = v `rem` n == 0 -- cgit v1.2.3 From 76c065c03bb13d4f12b33bf7c03577cfaa124211 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 11 Apr 2014 15:01:10 -0400 Subject: prep release --- debian/changelog | 4 ++-- doc/assistant/release_notes.mdwn | 5 ++++- git-annex.cabal | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/debian/changelog b/debian/changelog index 55c1ba396..bd8273213 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -git-annex (5.20140406) UNRELEASED; urgency=medium +git-annex (5.20140411) unstable; urgency=medium * importfeed: Filename template can now contain an itempubdate variable. Needs feed 0.3.9.2. @@ -12,7 +12,7 @@ git-annex (5.20140406) UNRELEASED; urgency=medium runaway loop. Thanks to Anarcat for his assistance, and to Maximiliano Curia for identifying the cause of this bug. - -- Joey Hess Mon, 07 Apr 2014 16:22:02 -0400 + -- Joey Hess Fri, 11 Apr 2014 14:59:49 -0400 git-annex (5.20140405) unstable; urgency=medium diff --git a/doc/assistant/release_notes.mdwn b/doc/assistant/release_notes.mdwn index 7f13ce9e1..1ed622ba3 100644 --- a/doc/assistant/release_notes.mdwn +++ b/doc/assistant/release_notes.mdwn @@ -1,4 +1,7 @@ -## version 5.20140406 +## version 5.20140411 + +This release fixes a bug that could cause the assistant to use a *lot* of +CPU, when monthly fscking was set up. Automatic upgrading was broken on OSX for previous versions. This has been fixed, but you'll need to manually upgrade to this version to get it going diff --git a/git-annex.cabal b/git-annex.cabal index 59b7b3a59..ccbd14724 100644 --- a/git-annex.cabal +++ b/git-annex.cabal @@ -1,5 +1,5 @@ Name: git-annex -Version: 5.20140405 +Version: 5.20140411 Cabal-Version: >= 1.8 License: GPL-3 Maintainer: Joey Hess -- cgit v1.2.3 From 7c6b927ed18df89fcc1047c9a772cdf8bf6283eb Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 11 Apr 2014 15:10:19 -0400 Subject: more prep --- debian/changelog | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/debian/changelog b/debian/changelog index bd8273213..0c0bfafdb 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,16 +1,16 @@ -git-annex (5.20140411) unstable; urgency=medium +git-annex (5.20140411) unstable; urgency=high * importfeed: Filename template can now contain an itempubdate variable. Needs feed 0.3.9.2. - * 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. * Fix rsync progress parsing in locales that use comma in number display. Closes: #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 > 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. -- Joey Hess Fri, 11 Apr 2014 14:59:49 -0400 -- cgit v1.2.3 From 314ec5d56de69ca6bbd0468d0f4b3b456feeb9b3 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 11 Apr 2014 15:45:44 -0400 Subject: add news item for git-annex 5.20140411 --- doc/news/version_5.20140227.mdwn | 32 -------------------------------- doc/news/version_5.20140411.mdwn | 13 +++++++++++++ 2 files changed, 13 insertions(+), 32 deletions(-) delete mode 100644 doc/news/version_5.20140227.mdwn create mode 100644 doc/news/version_5.20140411.mdwn 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 > 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 -- cgit v1.2.3 From 8da8ec730dc0df29dd97be861938deeb2488dda0 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 11 Apr 2014 17:14:19 -0400 Subject: Last release didn't quite fix the high cpu issue in all cases, this should. This is supposed to look for a day past the last day it ran, not a month past. Seems to work, at least in anarcat's test case. --- Utility/Scheduled.hs | 2 +- debian/changelog | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Utility/Scheduled.hs b/Utility/Scheduled.hs index 2b7cae2b6..45914aada 100644 --- a/Utility/Scheduled.hs +++ b/Utility/Scheduled.hs @@ -121,7 +121,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..c3952f28f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +git-annex (5.20140412) UNRELEASED; urgency=high + + * Last release didn't quite fix the high cpu issue in all cases, this should. + + -- Joey Hess Fri, 11 Apr 2014 17:13:07 -0400 + git-annex (5.20140411) unstable; urgency=high * importfeed: Filename template can now contain an itempubdate variable. -- cgit v1.2.3 From d6df4fc3da982c7699f4d8acb3a0959ad4e5eb97 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 11 Apr 2014 18:08:46 -0400 Subject: guard against any remaining infinite recursion bugs; throw error if no candidate cn be found in next hundred years Note that the exception thrown is not visible in the webapp currently because it crashes one of Cronner's 2 worker threads, which is never checked. --- Utility/Scheduled.hs | 10 ++++++++-- debian/changelog | 4 ++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/Utility/Scheduled.hs b/Utility/Scheduled.hs index 45914aada..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 diff --git a/debian/changelog b/debian/changelog index c3952f28f..a883ddda9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,8 @@ -git-annex (5.20140412) UNRELEASED; urgency=high +git-annex (5.20140412) unstable; urgency=high * Last release didn't quite fix the high cpu issue in all cases, this should. - -- Joey Hess Fri, 11 Apr 2014 17:13:07 -0400 + -- Joey Hess Fri, 11 Apr 2014 17:14:38 -0400 git-annex (5.20140411) unstable; urgency=high -- cgit v1.2.3 From 14ecb57a9e3748fbb7a7d1aecb5bc07726343798 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 11 Apr 2014 18:10:10 -0400 Subject: prep release --- git-annex.cabal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.3 From 42dcfa8cf5c17974049b773acadca568e89a09d6 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 11 Apr 2014 18:29:48 -0400 Subject: add news item for git-annex 5.20140412 --- doc/news/version_5.20140306.mdwn | 34 ---------------------------------- doc/news/version_5.20140412.mdwn | 3 +++ 2 files changed, 3 insertions(+), 34 deletions(-) delete mode 100644 doc/news/version_5.20140306.mdwn create mode 100644 doc/news/version_5.20140412.mdwn diff --git a/doc/news/version_5.20140306.mdwn b/doc/news/version_5.20140306.mdwn deleted file mode 100644 index ef302495b..000000000 --- a/doc/news/version_5.20140306.mdwn +++ /dev/null @@ -1,34 +0,0 @@ -git-annex 5.20140306 released with [[!toggle text="these changes"]] -[[!toggleable text=""" - * sync: Fix bug in direct mode that caused a file that was not - checked into git to be deleted when there was a conflicting - merge with a remote. - * webapp: Now supports HTTPS. - * webapp: No longer supports a port specified after --listen, since - it was buggy, and that use case is better supported by setting up HTTPS. - * annex.listen can be configured, instead of using --listen - * annex.startupscan can be set to false to disable the assistant's startup - scan. - * Probe for quvi version at run time. - * webapp: Filter out from Switch Repository list any - repositories listed in autostart file that don't have a - git directory anymore. (Or are bare) - * webapp: Refuse to start in a bare git repository. - * assistant --autostart: Refuse to start in a bare git repository. - * webapp: Don't list the public repository group when editing a - git repository; it only makes sense for special remotes. - * view, vfilter: Add support for filtering tags and values out of a view, - using !tag and field!=value. - * vadd: Allow listing multiple desired values for a field. - * view: Refuse to enter a view when no branch is currently checked out. - * metadata: To only set a field when it's not already got a value, use - -s field?=value - * Run .git/hooks/pre-commit-annex whenever a commit is made. - * sync: Automatically resolve merge conflict between and annexed file - and a regular git file. - * glacier: Pass --region to glacier checkpresent. - * webdav: When built with a new enough haskell DAV (0.6), disable - the http response timeout, which was only 5 seconds. - * webapp: Include no-pty in ssh authorized\_keys lines. - * assistant: Smarter log file rotation, which takes free disk space - into account."""]] \ No newline at end of file diff --git a/doc/news/version_5.20140412.mdwn b/doc/news/version_5.20140412.mdwn new file mode 100644 index 000000000..7e9267a61 --- /dev/null +++ b/doc/news/version_5.20140412.mdwn @@ -0,0 +1,3 @@ +git-annex 5.20140412 released with [[!toggle text="these changes"]] +[[!toggleable text=""" + * Last release didn't quite fix the high cpu issue in all cases, this should."""]] \ No newline at end of file -- cgit v1.2.3 From 79ff4071c1b852d86e5323a9f5b71d8d7bd6c76e Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 11 Apr 2014 18:45:46 -0400 Subject: use ustar format and omit filnames with colons. new hackage requirements The tarball on hackage will no longer correspond to the git tag. Oh well. --- Build/make-sdist.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Build/make-sdist.sh b/Build/make-sdist.sh index 950334532..6e1ddae62 100755 --- a/Build/make-sdist.sh +++ b/Build/make-sdist.sh @@ -9,11 +9,12 @@ mkdir --parents dist/$sdist_dir find . \( -name .git -or -name dist -or -name cabal-dev \) -prune \ -or -not -name \\*.orig -not -type d -print \ -| perl -ne "print unless length >= 100 - length q{$sdist_dir}" \ -| xargs cp --parents --target-directory dist/$sdist_dir + | perl -ne "print unless length >= 100 - length q{$sdist_dir}" \ + | grep -v ':' \ + | xargs cp --parents --target-directory dist/$sdist_dir cd dist -tar -caf $sdist_dir.tar.gz $sdist_dir +tar --format=ustar -caf $sdist_dir.tar.gz $sdist_dir # Check that tarball can be unpacked by cabal. # It's picky about tar longlinks etc. -- cgit v1.2.3 From 7dbd3857b91e5acb05f6477f5c97c1aeae9eeee3 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 11 Apr 2014 19:01:01 -0400 Subject: devblog --- doc/devblog/day_151__birthday_bug.mdwn | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 doc/devblog/day_151__birthday_bug.mdwn diff --git a/doc/devblog/day_151__birthday_bug.mdwn b/doc/devblog/day_151__birthday_bug.mdwn new file mode 100644 index 000000000..251bfb935 --- /dev/null +++ b/doc/devblog/day_151__birthday_bug.mdwn @@ -0,0 +1,18 @@ +Pushed out a new release today, fixing two important bugs, followed by a +second release which fixed the bugs harder. + +Automatic upgrading was broken on OSX. The webapp will tell you upgrading +failed, and you'll need to manually download the .dmg and install it. + +With help from Maximiliano Curia, finally tracked down a bug I have been +chasing for a while where the assistant would start using a lot of CPU +while not seeming to be busy doing anything. Turned out to be triggered by +a scheduled fsck that was configured to run once a month with no particular +day specified. + +That bug turned out to affect users who first scheduled such a fsck job +after the 11th day of the month. So I expedited putting a release out to +avoid anyone else running into it starting tomorrow. + +(Oddly, the 11th day of this month also happens to be my birthday. I did not +expect to have to cut 2 releases today..) -- cgit v1.2.3 From b8b328f962b81f26d91da4da918a461677af0eaa Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 11 Apr 2014 21:42:43 -0400 Subject: Improve handling on monthly/yearly scheduling. Code was still buggy, it turns out (though the recursion checker caught it). In the case of (Schedule (Monthly Nothing) AnyTime), where the last run was on yyyy-12-31, it looped forever. Also, the handling of (Schedule (Yearly Nothing) AnyTime) was wacky where the last run was yyyy-12-31. It would suggest a window starting on the 3rd for the next run (because 31 mod 28 is 3). I think that originally I was wanted to avoid running on 01-01 if it had just run on 12-31. But the code didn't accomplish this, and it's not necessary anyway. This is supposed to calculate the next window meeting the schedule, and for (Schedule (Monthly Nothing), the window starts at 01-01 and runs through 01-31. If that causes two back-to-back runs, well the next one will not be until 02-01 at the earliest. Also, back-to-back runs can be avoided, if desired, by using Divisible 2. --- Utility/Scheduled.hs | 17 +++++++---------- debian/changelog | 6 ++++++ 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/Utility/Scheduled.hs b/Utility/Scheduled.hs index 1b25cb4c7..4dfa4d04c 100644 --- a/Utility/Scheduled.hs +++ b/Utility/Scheduled.hs @@ -14,6 +14,7 @@ module Utility.Scheduled ( MonthDay, YearDay, nextTime, + calcNextTime, startTime, fromSchedule, fromScheduledTime, @@ -22,7 +23,7 @@ module Utility.Scheduled ( toRecurrance, toSchedule, parseSchedule, - prop_schedule_roundtrips + prop_schedule_roundtrips, ) where import Utility.Data @@ -127,14 +128,14 @@ calcNextTime schedule@(Schedule recurrance scheduledtime) lasttime currenttime | otherwise -> skip 1 Monthly Nothing | afterday -> skip 1 - | 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. + -- any day in the month following lasttime + | maybe True (\old -> (mnum candidate > mnum old || ynum candidate > ynum old)) lastday -> Just $ window candidate (endOfMonth candidate) | otherwise -> skip 1 Yearly Nothing | afterday -> skip 1 - | maybe True (\old -> ynum candidate > ynum old && yday candidate >= (yday old `mod` minyday)) lastday -> + -- any day in the year following lasttime + | maybe True (\old -> ynum candidate > ynum old) lastday -> Just $ window candidate (endOfYear candidate) | otherwise -> skip 1 Weekly (Just w) @@ -200,17 +201,13 @@ yday = snd . toOrdinalDate ynum :: Day -> Int ynum = fromIntegral . fst . toOrdinalDate -{- Calendar max and mins. -} +{- Calendar max values. -} maxyday :: Int maxyday = 366 -- with leap days -minyday :: Int -minyday = 365 maxwnum :: Int maxwnum = 53 -- some years have more than 52 maxmday :: Int maxmday = 31 -minmday :: Int -minmday = 28 maxmnum :: Int maxmnum = 12 maxwday :: Int diff --git a/debian/changelog b/debian/changelog index a883ddda9..6b5a205e1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +git-annex (5.20140413) UNRELEASED; urgency=medium + + * Improve handling on monthly/yearly scheduling. + + -- Joey Hess Fri, 11 Apr 2014 21:33:35 -0400 + git-annex (5.20140412) unstable; urgency=high * Last release didn't quite fix the high cpu issue in all cases, this should. -- cgit v1.2.3 From 6e45ca3a50466644260e4f10bc8d3e680b93e95d Mon Sep 17 00:00:00 2001 From: "https://openid.stackexchange.com/user/e65e6d0e-58ba-41de-84cc-1f2ba54cf574" Date: Sat, 12 Apr 2014 03:51:56 +0000 Subject: removed --- ...ent_2_f19c9bb519a7017f0731fd0e8780ed74._comment | 22 ---------------------- 1 file changed, 22 deletions(-) delete mode 100644 doc/encryption/comment_2_f19c9bb519a7017f0731fd0e8780ed74._comment diff --git a/doc/encryption/comment_2_f19c9bb519a7017f0731fd0e8780ed74._comment b/doc/encryption/comment_2_f19c9bb519a7017f0731fd0e8780ed74._comment deleted file mode 100644 index bf4330383..000000000 --- a/doc/encryption/comment_2_f19c9bb519a7017f0731fd0e8780ed74._comment +++ /dev/null @@ -1,22 +0,0 @@ -[[!comment format=mdwn - username="https://openid.stackexchange.com/user/e65e6d0e-58ba-41de-84cc-1f2ba54cf574" - nickname="Mica Semrick" - subject="Encrypt with pub or sub?" - date="2014-04-08T03:56:36Z" - content=""" -Forgive me, I'm a bit new to PGP. - -I do: - - $ gpg --list-keys - /home/user/.gnupg/pubring.gpg - ------------------------------ - pub 2048R/41363A6A 2014-04-03 - uid A Guy (git-annex key) - sub 2048R/77998J8TDY 2014-04-03 - -and see the pub and the sub key. - -When I init a new special remote and want encryption, should I give the init command the pub or the sub key? Or does git annex sort that out itself? - -"""]] -- cgit v1.2.3 From 5ec67d23c20eaeb222d43f9ec99509e94585978e Mon Sep 17 00:00:00 2001 From: David Triendl Date: Sat, 12 Apr 2014 06:46:08 +0200 Subject: Add doc/bugs/Drop_--from_always_trusts_local_repository.mdwn --- ...Drop_--from_always_trusts_local_repository.mdwn | 44 ++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 doc/bugs/Drop_--from_always_trusts_local_repository.mdwn diff --git a/doc/bugs/Drop_--from_always_trusts_local_repository.mdwn b/doc/bugs/Drop_--from_always_trusts_local_repository.mdwn new file mode 100644 index 000000000..a1b27cf5b --- /dev/null +++ b/doc/bugs/Drop_--from_always_trusts_local_repository.mdwn @@ -0,0 +1,44 @@ +### Please describe the problem. + +The command `git annex drop --from` always trusts the local repository, even if +it is marked as untrusted. + + +### What steps will reproduce the problem? +[[!format sh """ +mkdir t u; cd t; git init; git commit --allow-empty -m "Initial commit"; git annex init "Trusted"; date > file; git annex add file; git commit -m "Add file"; cd ../u; git init; git remote add t ../t; git fetch t; git merge t/master; git annex init "Untrusted"; git annex untrust .; git annex get file; cd ../t; git remote add u ../u; git fetch u; cd .. +"""]] + +Create two repositories, *t* (trusted) and *u* (untrusted). A file is in both +repositories. When performing `git annex drop file` in repository *t*, `git +annex` will abort because there are not enough copies. But when performing `git +annex drop --from t file` in *u*, git annex will delete the copy. + + +### What version of git-annex are you using? On what operating system? + +Bug was introduced with 6c31e3a8 and still exists in current master (d955cfe7). + + +### Please provide any additional information below. + +The following change seems to solve the problem. (First time working with +Haskell, please excuse the crude code.) + +[[!format diff """ +diff --git a/Command/Drop.hs b/Command/Drop.hs +index 269c4c2..09ea99a 100644 +--- a/Command/Drop.hs ++++ b/Command/Drop.hs +@@ -82,8 +82,9 @@ performRemote key afile numcopies remote = lockContent key $ do + (remotes, trusteduuids) <- Remote.keyPossibilitiesTrusted key + present <- inAnnex key + u <- getUUID ++ level <- lookupTrust u + let have = filter (/= uuid) $ +- if present then u:trusteduuids else trusteduuids ++ if present && level <= SemiTrusted then u:trusteduuids else trusteduuids + untrusteduuids <- trustGet UnTrusted + let tocheck = filter (/= remote) $ + Remote.remotesWithoutUUID remotes (have++untrusteduuids) +"""]] -- cgit v1.2.3 From d9a46f25006d0056bcab98861b1261a22e91406d Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 12 Apr 2014 12:58:32 -0400 Subject: Improve handling on monthly/yearly scheduling. Avoid back-to-back runs. --- Utility/Scheduled.hs | 50 +++++++++++++++++++++++++++++++++++++------------- 1 file changed, 37 insertions(+), 13 deletions(-) diff --git a/Utility/Scheduled.hs b/Utility/Scheduled.hs index 4dfa4d04c..8ae1664f6 100644 --- a/Utility/Scheduled.hs +++ b/Utility/Scheduled.hs @@ -67,8 +67,8 @@ data ScheduledTime type Hour = Int type Minute = Int -{- Next time a Schedule should take effect. The NextTimeWindow is used - - when a Schedule is allowed to start at some point within the window. -} +-- | Next time a Schedule should take effect. The NextTimeWindow is used +-- when a Schedule is allowed to start at some point within the window. data NextTime = NextTimeExactly LocalTime | NextTimeWindow LocalTime LocalTime @@ -84,8 +84,8 @@ nextTime schedule lasttime = do tz <- getTimeZone now return $ calcNextTime schedule lasttime $ utcToLocalTime tz now -{- Calculate the next time that fits a Schedule, based on the - - last time it occurred, and the current time. -} +-- | 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@(Schedule recurrance scheduledtime) lasttime currenttime | scheduledtime == AnyTime = do @@ -98,10 +98,10 @@ calcNextTime schedule@(Schedule recurrance scheduledtime) lasttime currenttime findfromtoday anytime = findfrom recurrance afterday today where today = localDay currenttime - afterday = sameaslastday || toolatetoday + afterday = sameaslastrun || toolatetoday toolatetoday = not anytime && localTimeOfDay currenttime >= nexttime - sameaslastday = lastday == Just today - lastday = localDay <$> lasttime + sameaslastrun = lastrun == Just today + lastrun = localDay <$> lasttime nexttime = case scheduledtime of AnyTime -> TimeOfDay 0 0 0 SpecificTime h m -> TimeOfDay h m 0 @@ -121,21 +121,19 @@ calcNextTime schedule@(Schedule recurrance scheduledtime) lasttime currenttime | otherwise -> Just $ exactly candidate Weekly Nothing | afterday -> skip 1 - | otherwise -> case (wday <$> lastday, wday candidate) of + | otherwise -> case (wday <$> lastrun, wday candidate) of (Nothing, _) -> Just $ window candidate (addDays 6 candidate) (Just old, curr) | old == curr -> Just $ window candidate (addDays 6 candidate) | otherwise -> skip 1 Monthly Nothing | afterday -> skip 1 - -- any day in the month following lasttime - | maybe True (\old -> (mnum candidate > mnum old || ynum candidate > ynum old)) lastday -> + | maybe True (candidate `oneMonthPast`) lastrun -> Just $ window candidate (endOfMonth candidate) | otherwise -> skip 1 Yearly Nothing | afterday -> skip 1 - -- any day in the year following lasttime - | maybe True (\old -> ynum candidate > ynum old) lastday -> + | maybe True (candidate `oneYearPast`) lastrun -> Just $ window candidate (endOfYear candidate) | otherwise -> skip 1 Weekly (Just w) @@ -177,6 +175,32 @@ calcNextTime schedule@(Schedule recurrance scheduledtime) lasttime currenttime getday = localDay . startTime divisible n v = v `rem` n == 0 +-- Check if the new Day occurs one month or more past the old Day. +oneMonthPast :: Day -> Day -> Bool +new `oneMonthPast` old + | mday new >= mday old && (new `newerMonth` old || new `newerYear` old) = True + | new `skippedAMonth` old || new `skippedAYear` old = True + | otherwise = False + +-- Check if the new Day occurs one year or more past the old Day. +oneYearPast :: Day -> Day -> Bool +new `oneYearPast` old + | yday new >= yday old && new `newerYear` old = True + | new `skippedAYear` old = True + | otherwise = False + +newerMonth :: Day -> Day -> Bool +new `newerMonth` old = mnum new > mnum old + +newerYear :: Day -> Day -> Bool +new `newerYear` old = ynum new > ynum old + +skippedAMonth :: Day -> Day -> Bool +new `skippedAMonth` old = mnum new > mnum old + 1 + +skippedAYear :: Day -> Day -> Bool +new `skippedAYear` old = ynum new > ynum old + 1 + endOfMonth :: Day -> Day endOfMonth day = let (y,m,_d) = toGregorian day @@ -201,7 +225,7 @@ yday = snd . toOrdinalDate ynum :: Day -> Int ynum = fromIntegral . fst . toOrdinalDate -{- Calendar max values. -} +-- Calendar max values. maxyday :: Int maxyday = 366 -- with leap days maxwnum :: Int -- cgit v1.2.3 From 66b5dc3f36e32407bfcf120efaae67b49a3e5853 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 12 Apr 2014 13:29:35 -0400 Subject: wrote test case; found bugs in date math; fixed and simplified using Data.Time.Calendar --- Utility/Scheduled.hs | 53 +++++++++++++++++++++++++++++++--------------------- 1 file changed, 32 insertions(+), 21 deletions(-) diff --git a/Utility/Scheduled.hs b/Utility/Scheduled.hs index 8ae1664f6..d3ae06203 100644 --- a/Utility/Scheduled.hs +++ b/Utility/Scheduled.hs @@ -1,6 +1,6 @@ {- scheduled activities - - - Copyright 2013 Joey Hess + - Copyright 2013-2014 Joey Hess - - Licensed under the GNU GPL version 3 or higher. -} @@ -24,6 +24,7 @@ module Utility.Scheduled ( toSchedule, parseSchedule, prop_schedule_roundtrips, + prop_past_sane, ) where import Utility.Data @@ -177,29 +178,15 @@ calcNextTime schedule@(Schedule recurrance scheduledtime) lasttime currenttime -- Check if the new Day occurs one month or more past the old Day. oneMonthPast :: Day -> Day -> Bool -new `oneMonthPast` old - | mday new >= mday old && (new `newerMonth` old || new `newerYear` old) = True - | new `skippedAMonth` old || new `skippedAYear` old = True - | otherwise = False +new `oneMonthPast` old = fromGregorian y (m+1) d <= new + where + (y,m,d) = toGregorian old -- Check if the new Day occurs one year or more past the old Day. oneYearPast :: Day -> Day -> Bool -new `oneYearPast` old - | yday new >= yday old && new `newerYear` old = True - | new `skippedAYear` old = True - | otherwise = False - -newerMonth :: Day -> Day -> Bool -new `newerMonth` old = mnum new > mnum old - -newerYear :: Day -> Day -> Bool -new `newerYear` old = ynum new > ynum old - -skippedAMonth :: Day -> Day -> Bool -new `skippedAMonth` old = mnum new > mnum old + 1 - -skippedAYear :: Day -> Day -> Bool -new `skippedAYear` old = ynum new > ynum old + 1 +new `oneYearPast` old = fromGregorian (y+1) m d <= new + where + (y,m,d) = toGregorian old endOfMonth :: Day -> Day endOfMonth day = @@ -383,3 +370,27 @@ instance Arbitrary Recurrance where prop_schedule_roundtrips :: Schedule -> Bool prop_schedule_roundtrips s = toSchedule (fromSchedule s) == Just s + +prop_past_sane :: Bool +prop_past_sane = and + [ all (checksout oneMonthPast) (mplus1 ++ yplus1) + , all (not . (checksout oneMonthPast)) (map swap (mplus1 ++ yplus1)) + , all (checksout oneYearPast) yplus1 + , all (not . (checksout oneYearPast)) (map swap yplus1) + ] + where + mplus1 = -- new date old date, 1+ months before it + [ (fromGregorian 2014 01 15, fromGregorian 2013 12 15) + , (fromGregorian 2014 01 15, fromGregorian 2013 02 15) + , (fromGregorian 2014 02 15, fromGregorian 2013 01 15) + , (fromGregorian 2014 03 01, fromGregorian 2013 01 15) + , (fromGregorian 2014 03 01, fromGregorian 2013 12 15) + , (fromGregorian 2015 01 01, fromGregorian 2010 01 01) + ] + yplus1 = -- new date old date, 1+ years before it + [ (fromGregorian 2014 01 15, fromGregorian 2012 01 16) + , (fromGregorian 2014 01 15, fromGregorian 2013 01 14) + , (fromGregorian 2022 12 31, fromGregorian 2000 01 01) + ] + checksout cmp (new, old) = new `cmp` old + swap (a,b) = (b,a) -- cgit v1.2.3 From b356a4f8d13ca9e1e2d68b17dd0b7b93143c8ef5 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 12 Apr 2014 14:19:56 -0400 Subject: add new test --- Test.hs | 1 + 1 file changed, 1 insertion(+) diff --git a/Test.hs b/Test.hs index 8fbaf1d94..afcd5790e 100644 --- a/Test.hs +++ b/Test.hs @@ -164,6 +164,7 @@ properties = localOption (QuickCheckTests 1000) $ testGroup "QuickCheck" , testProperty "prop_parse_show_TrustLog" Logs.Trust.prop_parse_show_TrustLog , testProperty "prop_hashes_stable" Utility.Hash.prop_hashes_stable , testProperty "prop_schedule_roundtrips" Utility.Scheduled.prop_schedule_roundtrips + , testProperty "prop_past_sane" Utility.Scheduled.prop_past_sane , testProperty "prop_duration_roundtrips" Utility.HumanTime.prop_duration_roundtrips , testProperty "prop_metadata_sane" Types.MetaData.prop_metadata_sane , testProperty "prop_metadata_serialize" Types.MetaData.prop_metadata_serialize -- cgit v1.2.3