diff -Nru git-annex-5.20140405/Annex.hs git-annex-5.20140412ubuntu1/Annex.hs --- git-annex-5.20140405/Annex.hs 2014-04-02 22:46:31.000000000 +0000 +++ git-annex-5.20140412ubuntu1/Annex.hs 2014-04-11 22:12:28.000000000 +0000 @@ -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.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 @@ , 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 @@ , useragent = Nothing , errcounter = 0 , unusedkeys = Nothing +#ifdef WITH_QUVI , quviversion = Nothing +#endif , existinghooks = M.empty , desktopnotify = mempty } diff -Nru git-annex-5.20140405/Build/BundledPrograms.hs git-annex-5.20140412ubuntu1/Build/BundledPrograms.hs --- git-annex-5.20140405/Build/BundledPrograms.hs 2014-01-24 14:23:06.000000000 +0000 +++ git-annex-5.20140412ubuntu1/Build/BundledPrograms.hs 2014-04-11 22:12:28.000000000 +0000 @@ -45,7 +45,12 @@ #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 -Nru git-annex-5.20140405/CHANGELOG git-annex-5.20140412ubuntu1/CHANGELOG --- git-annex-5.20140405/CHANGELOG 2014-04-05 22:05:28.000000000 +0000 +++ git-annex-5.20140412ubuntu1/CHANGELOG 2014-04-14 09:41:33.000000000 +0000 @@ -1,3 +1,33 @@ +git-annex (5.20140412ubuntu1) trusty; urgency=medium + + * Patch from git to fix building on architectures without GHCi (Joey + Hess): + - Avoid depending on shakespeare except for when building the webapp. + + -- Colin Watson Mon, 14 Apr 2014 10:41:31 +0100 + +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:14:38 -0400 + +git-annex (5.20140411) unstable; urgency=high + + * 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 + * 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 + git-annex (5.20140405) unstable; urgency=medium * git-annex-shell: Added notifychanges command. diff -Nru git-annex-5.20140405/CmdLine/GitAnnex.hs git-annex-5.20140412ubuntu1/CmdLine/GitAnnex.hs --- git-annex-5.20140405/CmdLine/GitAnnex.hs 2014-03-12 15:53:22.000000000 +0000 +++ git-annex-5.20140412ubuntu1/CmdLine/GitAnnex.hs 2014-04-11 22:12:28.000000000 +0000 @@ -89,6 +89,7 @@ #ifdef WITH_XMPP import qualified Command.XMPPGit #endif +import qualified Command.RemoteDaemon #endif import qualified Command.Test #ifdef WITH_TESTSUITE @@ -176,6 +177,7 @@ #ifdef WITH_XMPP , Command.XMPPGit.def #endif + , Command.RemoteDaemon.def #endif , Command.Test.def #ifdef WITH_TESTSUITE diff -Nru git-annex-5.20140405/Command/ImportFeed.hs git-annex-5.20140412ubuntu1/Command/ImportFeed.hs --- git-annex-5.20140405/Command/ImportFeed.hs 2014-03-12 15:53:22.000000000 +0000 +++ git-annex-5.20140412ubuntu1/Command/ImportFeed.hs 2014-04-11 22:12:28.000000000 +0000 @@ -15,6 +15,8 @@ import qualified Data.Set as S import qualified Data.Map as M import Data.Time.Clock +import Data.Time.Format +import System.Locale import Common.Annex import qualified Annex @@ -212,6 +214,7 @@ , fieldMaybe "itemdescription" $ getItemDescription $ item i , fieldMaybe "itemrights" $ getItemRights $ item i , fieldMaybe "itemid" $ snd <$> getItemId (item i) + , fieldMaybe "itempubdate" $ pubdate $ item i , ("extension", sanitizeFilePath extension) ] where @@ -221,6 +224,12 @@ fieldMaybe k Nothing = (k, "none") fieldMaybe k (Just v) = field k v + pubdate itm = case getItemPublishDate itm :: Maybe (Maybe UTCTime) of + Just (Just d) -> Just $ + formatTime defaultTimeLocale "%F" d + -- if date cannot be parsed, use the raw string + _ -> replace "/" "-" <$> getItemPublishDateString itm + {- Called when there is a problem with a feed. - Throws an error if the feed is broken, otherwise shows a warning. -} feedProblem :: URLString -> String -> Annex () diff -Nru git-annex-5.20140405/Command/NotifyChanges.hs git-annex-5.20140412ubuntu1/Command/NotifyChanges.hs --- git-annex-5.20140405/Command/NotifyChanges.hs 2014-04-05 22:05:28.000000000 +0000 +++ git-annex-5.20140412ubuntu1/Command/NotifyChanges.hs 2014-04-11 22:12:28.000000000 +0000 @@ -13,7 +13,7 @@ import Utility.DirWatcher.Types import qualified Git import Git.Sha -import RemoteDaemon.EndPoint.GitAnnexShell.Types +import RemoteDaemon.Transport.Ssh.Types import Control.Concurrent import Control.Concurrent.Async diff -Nru git-annex-5.20140405/Command/RemoteDaemon.hs git-annex-5.20140412ubuntu1/Command/RemoteDaemon.hs --- git-annex-5.20140405/Command/RemoteDaemon.hs 1970-01-01 00:00:00.000000000 +0000 +++ git-annex-5.20140412ubuntu1/Command/RemoteDaemon.hs 2014-04-11 22:12:28.000000000 +0000 @@ -0,0 +1,24 @@ +{- git-annex command + - + - Copyright 2014 Joey Hess + - + - Licensed under the GNU GPL version 3 or higher. + -} + +module Command.RemoteDaemon where + +import Common.Annex +import Command +import RemoteDaemon.Core + +def :: [Command] +def = [noCommit $ command "remotedaemon" paramNothing seek SectionPlumbing + "detects when remotes have changed, and fetches from them"] + +seek :: CommandSeek +seek = withNothing start + +start :: CommandStart +start = do + liftIO runForeground + stop diff -Nru git-annex-5.20140405/Command/TransferKeys.hs git-annex-5.20140412ubuntu1/Command/TransferKeys.hs --- git-annex-5.20140405/Command/TransferKeys.hs 2014-04-02 22:46:31.000000000 +0000 +++ git-annex-5.20140412ubuntu1/Command/TransferKeys.hs 2014-04-11 22:12:28.000000000 +0000 @@ -16,8 +16,7 @@ import Annex.Transfer import qualified Remote import Types.Key - -import GHC.IO.Handle +import Utility.SimpleProtocol (ioHandles) data TransferRequest = TransferRequest Direction Remote Key AssociatedFile @@ -29,7 +28,8 @@ seek = withNothing start start :: CommandStart -start = withHandles $ \(readh, writeh) -> do +start = do + (readh, writeh) <- liftIO ioHandles runRequests readh writeh runner stop where @@ -44,21 +44,6 @@ download (Remote.uuid remote) key file forwardRetry $ \p -> getViaTmp key $ \t -> Remote.retrieveKeyFile remote key file t p -{- stdin and stdout are connected with the caller, to be used for - - communication with it. But doing a transfer might involve something - - that tries to read from stdin, or write to stdout. To avoid that, close - - stdin, and duplicate stderr to stdout. Return two new handles - - that are duplicates of the original (stdin, stdout). -} -withHandles :: ((Handle, Handle) -> Annex a) -> Annex a -withHandles a = do - readh <- liftIO $ hDuplicate stdin - writeh <- liftIO $ hDuplicate stdout - liftIO $ do - nullh <- openFile devNull ReadMode - nullh `hDuplicateTo` stdin - stderr `hDuplicateTo` stdout - a (readh, writeh) - runRequests :: Handle -> Handle diff -Nru git-annex-5.20140405/Config.hs git-annex-5.20140412ubuntu1/Config.hs --- git-annex-5.20140405/Config.hs 2014-03-12 15:53:22.000000000 +0000 +++ git-annex-5.20140412ubuntu1/Config.hs 2014-04-11 22:12:28.000000000 +0000 @@ -32,7 +32,10 @@ setConfig :: ConfigKey -> String -> Annex () setConfig (ConfigKey key) value = do inRepo $ Git.Command.run [Param "config", Param key, Param value] - Annex.changeGitRepo =<< inRepo Git.Config.reRead + reloadConfig + +reloadConfig :: Annex () +reloadConfig = Annex.changeGitRepo =<< inRepo Git.Config.reRead {- Unsets a git config setting. (Leaves it in state currently.) -} unsetConfig :: ConfigKey -> Annex () diff -Nru git-annex-5.20140405/debian/changelog git-annex-5.20140412ubuntu1/debian/changelog --- git-annex-5.20140405/debian/changelog 2014-04-05 22:05:28.000000000 +0000 +++ git-annex-5.20140412ubuntu1/debian/changelog 2014-04-14 09:41:33.000000000 +0000 @@ -1,3 +1,33 @@ +git-annex (5.20140412ubuntu1) trusty; urgency=medium + + * Patch from git to fix building on architectures without GHCi (Joey + Hess): + - Avoid depending on shakespeare except for when building the webapp. + + -- Colin Watson Mon, 14 Apr 2014 10:41:31 +0100 + +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:14:38 -0400 + +git-annex (5.20140411) unstable; urgency=high + + * 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 + * 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 + git-annex (5.20140405) unstable; urgency=medium * git-annex-shell: Added notifychanges command. diff -Nru git-annex-5.20140405/debian/control git-annex-5.20140412ubuntu1/debian/control --- git-annex-5.20140405/debian/control 2014-04-02 22:46:31.000000000 +0000 +++ git-annex-5.20140412ubuntu1/debian/control 2014-04-14 09:41:30.000000000 +0000 @@ -35,6 +35,7 @@ libghc-yesod-static-dev [i386 amd64 kfreebsd-i386 kfreebsd-amd64 powerpc sparc], libghc-yesod-default-dev [i386 amd64 kfreebsd-amd64 powerpc sparc], libghc-hamlet-dev [i386 amd64 kfreebsd-i386 kfreebsd-amd64 powerpc sparc], + libghc-shakespeare-dev [i386 amd64 kfreebsd-i386 kfreebsd-amd64 powerpc sparc], libghc-clientsession-dev [i386 amd64 kfreebsd-i386 kfreebsd-amd64 powerpc sparc], libghc-warp-dev [i386 amd64 kfreebsd-i386 kfreebsd-amd64 powerpc sparc], libghc-warp-tls-dev [i386 amd64 kfreebsd-i386 kfreebsd-amd64 powerpc sparc], @@ -55,7 +56,7 @@ libghc-xml-types-dev, libghc-async-dev, libghc-http-dev, - libghc-feed-dev, + libghc-feed-dev (>= 0.3.9.2), libghc-regex-tdfa-dev [!mipsel !s390], libghc-regex-compat-dev [mipsel s390], libghc-tasty-dev (>= 0.7) [!mipsel !sparc], @@ -71,7 +72,8 @@ wget, curl, openssh-client, -Maintainer: Joey Hess +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Joey Hess Standards-Version: 3.9.5 Vcs-Git: git://git.kitenet.net/git-annex Homepage: http://git-annex.branchable.com/ Binary files /tmp/xp2RUjnZn8/git-annex-5.20140405/doc/assistant/connection.png and /tmp/NbiEyPMskI/git-annex-5.20140412ubuntu1/doc/assistant/connection.png differ diff -Nru git-annex-5.20140405/doc/assistant/release_notes.mdwn git-annex-5.20140412ubuntu1/doc/assistant/release_notes.mdwn --- git-annex-5.20140405/doc/assistant/release_notes.mdwn 2014-03-12 15:53:22.000000000 +0000 +++ git-annex-5.20140412ubuntu1/doc/assistant/release_notes.mdwn 2014-04-11 22:12:28.000000000 +0000 @@ -1,3 +1,14 @@ +## 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 +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 The Windows port of the assistant and webapp is now considered to be beta diff -Nru git-annex-5.20140405/doc/bugs/assistant_eats_all_CPU/comment_23_48a4c8d9dcc6cec243c6072090f26b6d._comment git-annex-5.20140412ubuntu1/doc/bugs/assistant_eats_all_CPU/comment_23_48a4c8d9dcc6cec243c6072090f26b6d._comment --- git-annex-5.20140405/doc/bugs/assistant_eats_all_CPU/comment_23_48a4c8d9dcc6cec243c6072090f26b6d._comment 1970-01-01 00:00:00.000000000 +0000 +++ git-annex-5.20140412ubuntu1/doc/bugs/assistant_eats_all_CPU/comment_23_48a4c8d9dcc6cec243c6072090f26b6d._comment 2014-04-11 22:12:28.000000000 +0000 @@ -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. +"""]] diff -Nru git-annex-5.20140405/doc/bugs/assistant_eats_all_CPU.mdwn git-annex-5.20140412ubuntu1/doc/bugs/assistant_eats_all_CPU.mdwn --- git-annex-5.20140405/doc/bugs/assistant_eats_all_CPU.mdwn 2014-03-12 15:53:22.000000000 +0000 +++ git-annex-5.20140412ubuntu1/doc/bugs/assistant_eats_all_CPU.mdwn 2014-04-11 22:12:28.000000000 +0000 @@ -520,3 +520,10 @@ 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]] diff -Nru git-annex-5.20140405/doc/bugs/Assistant_having_a_child_git_cat-file_--batch_do_the_same_thing_over_and_over_and_using_a_lot_of_memory/comment_2_b2941bf7901a1b2237b7210c8f0af2a5._comment git-annex-5.20140412ubuntu1/doc/bugs/Assistant_having_a_child_git_cat-file_--batch_do_the_same_thing_over_and_over_and_using_a_lot_of_memory/comment_2_b2941bf7901a1b2237b7210c8f0af2a5._comment --- git-annex-5.20140405/doc/bugs/Assistant_having_a_child_git_cat-file_--batch_do_the_same_thing_over_and_over_and_using_a_lot_of_memory/comment_2_b2941bf7901a1b2237b7210c8f0af2a5._comment 1970-01-01 00:00:00.000000000 +0000 +++ git-annex-5.20140412ubuntu1/doc/bugs/Assistant_having_a_child_git_cat-file_--batch_do_the_same_thing_over_and_over_and_using_a_lot_of_memory/comment_2_b2941bf7901a1b2237b7210c8f0af2a5._comment 2014-04-11 22:12:28.000000000 +0000 @@ -0,0 +1,22 @@ +[[!comment format=mdwn + username="http://joeyh.name/" + ip="209.250.56.244" + subject="comment 2" + date="2014-04-07T21:07:35Z" + content=""" +Except of log when this apparently happened. Note the 6 minute time discontinuity when it was apparently looping: + +
+[2014-04-07 23:24:24 EEST] read: git [\"--git-dir=/storage/sarjat/annex-sarjat/.git\",\"--work-tree=/storage/sarjat/annex-sarjat\",\"write-tree\"]
+[2014-04-07 23:24:24 EEST] read: git [\"--git-dir=/storage/sarjat/annex-sarjat/.git\",\"--work-tree=/storage/sarjat/annex-sarjat\",\"rev-parse\",\"84068090af4bcd3d24f16d865ac07b0478f20ada:\"]
+[2014-04-07 23:24:24 EEST] read: git [\"--git-dir=/storage/sarjat/annex-sarjat/.git\",\"--work-tree=/storage/sarjat/annex-sarjat\",\"symbolic-ref\",\"HEAD\"]
+[2014-04-07 23:24:24 EEST] read: git [\"--git-dir=/storage/sarjat/annex-sarjat/.git\",\"--work-tree=/storage/sarjat/annex-sarjat\",\"show-ref\",\"refs/heads/master\"]
+[2014-04-07 23:30:13 EEST] read: git [\"--git-dir=/storage/sarjat/annex-sarjat/.git\",\"--work-tree=/storage/sarjat/annex-sarjat\",\"show-ref\",\"git-annex\"]
+[2014-04-07 23:30:13 EEST] read: git [\"--git-dir=/storage/sarjat/annex-sarjat/.git\",\"--work-tree=/storage/sarjat/annex-sarjat\",\"show-ref\",\"--hash\",\"refs/heads/git-annex\"]
+[2014-04-07 23:30:13 EEST] read: git [\"--git-dir=/storage/sarjat/annex-sarjat/.git\",\"--work-tree=/storage/sarjat/annex-sarjat\",\"log\",\"refs/heads/git-annex..214ed317536695b91c8dd5bed059c46c11ad00be\",\"--oneline\",\"-n1\"]
+
+ +Also probably relevant, the network topology AIUI was: `client --> server` where both nodes ran the assistant. This happened on the server shortly after the client dropped off a refs/heads/synced/master. + +(Also, the \"logging to a deleted file\" appears to have been a local misconfiguration; a cron job that repeatedly tried to start the assistant. Only one will start, but later ones will rotate the logs before noticing it's running and giving up.) +"""]] diff -Nru git-annex-5.20140405/doc/bugs/Assistant_having_a_child_git_cat-file_--batch_do_the_same_thing_over_and_over_and_using_a_lot_of_memory/comment_3_1429ca784a03bc424b3537cbe0449421._comment git-annex-5.20140412ubuntu1/doc/bugs/Assistant_having_a_child_git_cat-file_--batch_do_the_same_thing_over_and_over_and_using_a_lot_of_memory/comment_3_1429ca784a03bc424b3537cbe0449421._comment --- git-annex-5.20140405/doc/bugs/Assistant_having_a_child_git_cat-file_--batch_do_the_same_thing_over_and_over_and_using_a_lot_of_memory/comment_3_1429ca784a03bc424b3537cbe0449421._comment 1970-01-01 00:00:00.000000000 +0000 +++ git-annex-5.20140412ubuntu1/doc/bugs/Assistant_having_a_child_git_cat-file_--batch_do_the_same_thing_over_and_over_and_using_a_lot_of_memory/comment_3_1429ca784a03bc424b3537cbe0449421._comment 2014-04-11 22:12:28.000000000 +0000 @@ -0,0 +1,23 @@ +[[!comment format=mdwn + username="http://joeyh.name/" + ip="209.250.56.244" + subject="comment 3" + date="2014-04-07T21:55:19Z" + content=""" +Unfortunately all I have been able to tell for sure from this log is that it seems that the expensive transfer scan is not running, and this is unlikely to be a repository auto-repair. + +My best guess as to what might be going on is an update of the git-annex branch. + +[2014-04-07 23:24:24 EEST] read: git [\"--git-dir=/storage/sarjat/annex-sarjat/.git\",\"--work-tree=/storage/sarjat/annex-sarjat\",\"write-tree\"] + +This is prep for an index file commit, probably to the git-annex branch. + +[2014-04-07 23:24:24 EEST] read: git [\"--git-dir=/storage/sarjat/annex-sarjat/.git\",\"--work-tree=/storage/sarjat/annex-sarjat\",\"rev-parse\",\"84068090af4bcd3d24f16d865ac07b0478f20ada:\"] + +This is a getting the parent commit's tree. + +The git-cat-file churn could then be a union merge reading the contents of the git-annex branch to union-merge it into the `.git/annex/index` (in `mergeIndex`). This would reuse the main git cat-file process. + +That does not explain why it would need to read eg, SHA256E-s106800355--c70e31d511e7eec4881a15dfba521ea3d1fe14694968f81ae1819f1a2a93f9be.mp4.log 28 times. +Normally, during a union merge only files listed by `diff-index` need to be read, and it lists each file only once. +"""]] diff -Nru git-annex-5.20140405/doc/bugs/Assistant_having_a_child_git_cat-file_--batch_do_the_same_thing_over_and_over_and_using_a_lot_of_memory/comment_4_f9e65cf5598b4b14eeee1f41f46d4084._comment git-annex-5.20140412ubuntu1/doc/bugs/Assistant_having_a_child_git_cat-file_--batch_do_the_same_thing_over_and_over_and_using_a_lot_of_memory/comment_4_f9e65cf5598b4b14eeee1f41f46d4084._comment --- git-annex-5.20140405/doc/bugs/Assistant_having_a_child_git_cat-file_--batch_do_the_same_thing_over_and_over_and_using_a_lot_of_memory/comment_4_f9e65cf5598b4b14eeee1f41f46d4084._comment 1970-01-01 00:00:00.000000000 +0000 +++ git-annex-5.20140412ubuntu1/doc/bugs/Assistant_having_a_child_git_cat-file_--batch_do_the_same_thing_over_and_over_and_using_a_lot_of_memory/comment_4_f9e65cf5598b4b14eeee1f41f46d4084._comment 2014-04-11 22:12:28.000000000 +0000 @@ -0,0 +1,12 @@ +[[!comment format=mdwn + username="http://joeyh.name/" + ip="209.250.56.244" + subject="comment 4" + date="2014-04-07T21:57:32Z" + content=""" +Does `git log git-annex` show a commit that was made at 23:30? + +Does it show a commit 84068090af4bcd3d24f16d865ac07b0478f20ada? + +Is 84068090af4bcd3d24f16d865ac07b0478f20ada the parent of the 23:30 commit? +"""]] diff -Nru git-annex-5.20140405/doc/bugs/Assistant_having_a_child_git_cat-file_--batch_do_the_same_thing_over_and_over_and_using_a_lot_of_memory/comment_5_044ecac2d2e670e1ef69809c944093d1._comment git-annex-5.20140412ubuntu1/doc/bugs/Assistant_having_a_child_git_cat-file_--batch_do_the_same_thing_over_and_over_and_using_a_lot_of_memory/comment_5_044ecac2d2e670e1ef69809c944093d1._comment --- git-annex-5.20140405/doc/bugs/Assistant_having_a_child_git_cat-file_--batch_do_the_same_thing_over_and_over_and_using_a_lot_of_memory/comment_5_044ecac2d2e670e1ef69809c944093d1._comment 1970-01-01 00:00:00.000000000 +0000 +++ git-annex-5.20140412ubuntu1/doc/bugs/Assistant_having_a_child_git_cat-file_--batch_do_the_same_thing_over_and_over_and_using_a_lot_of_memory/comment_5_044ecac2d2e670e1ef69809c944093d1._comment 2014-04-11 22:12:28.000000000 +0000 @@ -0,0 +1,19 @@ +[[!comment format=mdwn + username="http://joeyh.name/" + ip="209.250.56.244" + subject="comment 5" + date="2014-04-07T22:12:14Z" + content=""" +Is the repository using direct mode? + +Another theory is that: + +* test/hello appears +* watcher sees new symlink, tries to make a commit with it +* master branch already has that symlink +* this is why the write-tree is not followed by a commit-tree. The commit would have been empty. + +If this is the case, then 84068090af4bcd3d24f16d865ac07b0478f20ada will be a ref on the master branch. + +And all of the above is normal operation. But it does suggest, that if this repo is in direct mode, it might be running a direct mode work tree update around then. Which requires a lot of cat-file queries of the git-annex branch. And would certainly make repeated queries at least if the repository has duplicate copies of some files.. +"""]] diff -Nru git-annex-5.20140405/doc/bugs/Assistant_having_a_child_git_cat-file_--batch_do_the_same_thing_over_and_over_and_using_a_lot_of_memory/comment_6_6f4f51e1583bed5e7e601e4f30f4207b._comment git-annex-5.20140412ubuntu1/doc/bugs/Assistant_having_a_child_git_cat-file_--batch_do_the_same_thing_over_and_over_and_using_a_lot_of_memory/comment_6_6f4f51e1583bed5e7e601e4f30f4207b._comment --- git-annex-5.20140405/doc/bugs/Assistant_having_a_child_git_cat-file_--batch_do_the_same_thing_over_and_over_and_using_a_lot_of_memory/comment_6_6f4f51e1583bed5e7e601e4f30f4207b._comment 1970-01-01 00:00:00.000000000 +0000 +++ git-annex-5.20140412ubuntu1/doc/bugs/Assistant_having_a_child_git_cat-file_--batch_do_the_same_thing_over_and_over_and_using_a_lot_of_memory/comment_6_6f4f51e1583bed5e7e601e4f30f4207b._comment 2014-04-11 22:12:28.000000000 +0000 @@ -0,0 +1,8 @@ +[[!comment format=mdwn + username="http://joeyh.name/" + ip="209.250.56.244" + subject="comment 6" + date="2014-04-07T22:17:16Z" + content=""" +Does the git log have any recent commits that were \"git-annex automatic merge conflict fix\" ? +"""]] diff -Nru git-annex-5.20140405/doc/bugs/Assistant_having_a_child_git_cat-file_--batch_do_the_same_thing_over_and_over_and_using_a_lot_of_memory/comment_7_683a0a3d4caea0ee625e41ae8a6c7c06._comment git-annex-5.20140412ubuntu1/doc/bugs/Assistant_having_a_child_git_cat-file_--batch_do_the_same_thing_over_and_over_and_using_a_lot_of_memory/comment_7_683a0a3d4caea0ee625e41ae8a6c7c06._comment --- git-annex-5.20140405/doc/bugs/Assistant_having_a_child_git_cat-file_--batch_do_the_same_thing_over_and_over_and_using_a_lot_of_memory/comment_7_683a0a3d4caea0ee625e41ae8a6c7c06._comment 1970-01-01 00:00:00.000000000 +0000 +++ git-annex-5.20140412ubuntu1/doc/bugs/Assistant_having_a_child_git_cat-file_--batch_do_the_same_thing_over_and_over_and_using_a_lot_of_memory/comment_7_683a0a3d4caea0ee625e41ae8a6c7c06._comment 2014-04-11 22:12:28.000000000 +0000 @@ -0,0 +1,81 @@ +[[!comment format=mdwn + username="http://johan.kiviniemi.name/" + nickname="Johan" + subject="comment 7" + date="2014-04-07T22:44:33Z" + content=""" +In the git-annex branch, there is + +* [[!toggle id=\"4deec8203e0baf7bb5b7d5d868d82439261ab3bc\" text=\"a commit at 23:21:51\"]] from my desktop box where I added `test/hello` + +[[!toggleable id=\"4deec8203e0baf7bb5b7d5d868d82439261ab3bc\" text=\"\"\" + commit 4deec8203e0baf7bb5b7d5d868d82439261ab3bc + Author: Johan Kiviniemi + Date: Mon Apr 7 23:21:51 2014 +0300 + + update + + diff --git a/992/280/SHA256E-s6--5891b5b522d5df086d0ff0b110fbd9d21bb4fc7163af34d08286a2e846f6be03.log b/992/280/SHA256E-s6--5891b5b522d5df086d0ff0b110fbd9d21bb4fc7163af34d08286a2e846f6be03.log + new file mode 100644 + index 0000000..1cf060c + --- /dev/null + +++ b/992/280/SHA256E-s6--5891b5b522d5df086d0ff0b110fbd9d21bb4fc7163af34d08286a2e846f6be03.log + @@ -0,0 +1 @@ + +1396902111.893785s 1 86e07a59-8bba-4878-8d0b-5dfe8c6366c4 +\"\"\"]] + +* [[!toggle id=\"2e0884d9c8859339855ceee396b9ea9ae05865b4\" text=\"a commit at 23:21:54\"]] when the desktop box synced to the server (from which the log excerpt came) + +[[!toggleable id=\"2e0884d9c8859339855ceee396b9ea9ae05865b4\" text=\"\"\" + commit 2e0884d9c8859339855ceee396b9ea9ae05865b4 + Author: Johan Kiviniemi + Date: Mon Apr 7 23:21:54 2014 +0300 + + update + + diff --git a/992/280/SHA256E-s6--5891b5b522d5df086d0ff0b110fbd9d21bb4fc7163af34d08286a2e84 + 6f6be03.log b/992/280/SHA256E-s6--5891b5b522d5df086d0ff0b110fbd9d21bb4fc7163af34d08286a2e8 + 46f6be03.log + index 1cf060c..cd0bccc 100644 + --- a/992/280/SHA256E-s6--5891b5b522d5df086d0ff0b110fbd9d21bb4fc7163af34d08286a2e846f6be03 + .log + +++ b/992/280/SHA256E-s6--5891b5b522d5df086d0ff0b110fbd9d21bb4fc7163af34d08286a2e846f6be03 + .log + @@ -1 +1,2 @@ + +1396902112.657779s 1 09ada430-8802-47da-bbfa-f5256a3c55d2 + 1396902111.893785s 1 86e07a59-8bba-4878-8d0b-5dfe8c6366c4 +\"\"\"]] + +* [[!toggle id=\"214ed317536695b91c8dd5bed059c46c11ad00be\" text=\"a commit at 23:24:24\"]] (2.5 minutes later!) when the assistant on the server finally merged `synced/git-annex` into `git-annex` (`test/hello` became visible in the working tree at that time). + +[[!toggleable id=\"214ed317536695b91c8dd5bed059c46c11ad00be\" text=\"\"\" + commit 214ed317536695b91c8dd5bed059c46c11ad00be + Merge: 4deec82 2e0884d + Author: sarjat + Date: Mon Apr 7 23:24:24 2014 +0300 + + merging synced/git-annex into git-annex +\"\"\"]] + +There is no commit in the `git-annex` branch at 23:30. The next commit is from unrelated changes at 00:06. + +[[!toggle id=\"84068090af4bcd3d24f16d865ac07b0478f20ada\" text=\"84068090af4bcd3d24f16d865ac07b0478f20ada\"]] is the commit in `master` which added `test/hello` at 23:21:51. + +[[!toggleable id=\"84068090af4bcd3d24f16d865ac07b0478f20ada\" text=\"\"\" + commit 84068090af4bcd3d24f16d865ac07b0478f20ada + Author: Johan Kiviniemi + Date: Mon Apr 7 23:21:51 2014 +0300 + + diff --git a/test/hello b/test/hello + new file mode 120000 + index 0000000..8c2678f + --- /dev/null + +++ b/test/hello + @@ -0,0 +1 @@ + +../.git/annex/objects/zK/02/SHA256E-s6--5891b5b522d5df086d0ff0b110fbd9d21bb4fc7163af34d08 + \ No newline at end of file +\"\"\"]] + +The repository on the server is in indirect mode. + +"""]] diff -Nru git-annex-5.20140405/doc/bugs/Assistant_having_a_child_git_cat-file_--batch_do_the_same_thing_over_and_over_and_using_a_lot_of_memory/comment_8_03dd76b01f46a7cc66eddac3e054c8ad._comment git-annex-5.20140412ubuntu1/doc/bugs/Assistant_having_a_child_git_cat-file_--batch_do_the_same_thing_over_and_over_and_using_a_lot_of_memory/comment_8_03dd76b01f46a7cc66eddac3e054c8ad._comment --- git-annex-5.20140405/doc/bugs/Assistant_having_a_child_git_cat-file_--batch_do_the_same_thing_over_and_over_and_using_a_lot_of_memory/comment_8_03dd76b01f46a7cc66eddac3e054c8ad._comment 1970-01-01 00:00:00.000000000 +0000 +++ git-annex-5.20140412ubuntu1/doc/bugs/Assistant_having_a_child_git_cat-file_--batch_do_the_same_thing_over_and_over_and_using_a_lot_of_memory/comment_8_03dd76b01f46a7cc66eddac3e054c8ad._comment 2014-04-11 22:12:28.000000000 +0000 @@ -0,0 +1,8 @@ +[[!comment format=mdwn + username="http://johan.kiviniemi.name/" + nickname="Johan" + subject="comment 8" + date="2014-04-07T22:48:18Z" + content=""" +There are no commits in `master` or `git-annex` that have the word conflict in the description. +"""]] diff -Nru git-annex-5.20140405/doc/bugs/Assistant_having_a_child_git_cat-file_--batch_do_the_same_thing_over_and_over_and_using_a_lot_of_memory/comment_9_5f4444f03cbebaa44628288095383679._comment git-annex-5.20140412ubuntu1/doc/bugs/Assistant_having_a_child_git_cat-file_--batch_do_the_same_thing_over_and_over_and_using_a_lot_of_memory/comment_9_5f4444f03cbebaa44628288095383679._comment --- git-annex-5.20140405/doc/bugs/Assistant_having_a_child_git_cat-file_--batch_do_the_same_thing_over_and_over_and_using_a_lot_of_memory/comment_9_5f4444f03cbebaa44628288095383679._comment 1970-01-01 00:00:00.000000000 +0000 +++ git-annex-5.20140412ubuntu1/doc/bugs/Assistant_having_a_child_git_cat-file_--batch_do_the_same_thing_over_and_over_and_using_a_lot_of_memory/comment_9_5f4444f03cbebaa44628288095383679._comment 2014-04-11 22:12:28.000000000 +0000 @@ -0,0 +1,89 @@ +[[!comment format=mdwn + username="http://johan.kiviniemi.name/" + nickname="Johan" + subject="comment 9" + date="2014-04-07T22:55:12Z" + content=""" +[[!toggle id=\"excerpt\" text=\"The full log excerpt\"]] which includes the sync from the client and the final messages after the cat-file loop ended and things stabilized (but a memory leak of 30 MB in the git-annex assistant process remained). + +[[!toggleable id=\"excerpt\" text=\"\"\" + [2014-04-04 10:55:00 EEST] main: starting assistant version 5.20140402 + + + + [2014-04-07 23:21:08 EEST] read: git [\"--git-dir=/storage/sarjat/annex-sarjat/.git\",\"--work-tree=/storage/sarjat/annex-sarjat\",\"show-ref\",\"git-annex\"] + [2014-04-07 23:21:08 EEST] read: git [\"--git-dir=/storage/sarjat/annex-sarjat/.git\",\"--work-tree=/storage/sarjat/annex-sarjat\",\"show-ref\",\"--hash\",\"refs/heads/git-annex\"] + [2014-04-07 23:21:08 EEST] read: git [\"--git-dir=/storage/sarjat/annex-sarjat/.git\",\"--work-tree=/storage/sarjat/annex-sarjat\",\"log\",\"refs/heads/git-annex..20d1f5538f6aa430f29ef938f6db045f5a69425d\",\"--oneline\",\"-n1\"] + [2014-04-07 23:21:08 EEST] read: git [\"--git-dir=/storage/sarjat/annex-sarjat/.git\",\"--work-tree=/storage/sarjat/annex-sarjat\",\"log\",\"refs/heads/git-annex..b402a6e7b9268e25dbd9c6a027f4a5258993980d\",\"--oneline\",\"-n1\"] + [2014-04-07 23:21:08 EEST] read: git [\"--git-dir=/storage/sarjat/annex-sarjat/.git\",\"--work-tree=/storage/sarjat/annex-sarjat\",\"log\",\"refs/heads/git-annex..7b18a191d58d779aab5789b923adb09863938ffe\",\"--oneline\",\"-n1\"] + [2014-04-07 23:21:08 EEST] read: git [\"--git-dir=/storage/sarjat/annex-sarjat/.git\",\"--work-tree=/storage/sarjat/annex-sarjat\",\"ls-tree\",\"--full-tree\",\"-z\",\"--\",\"refs/heads/git-annex\",\"uuid.log\",\"remote.log\",\"trust.log\",\"group.log\",\"numcopies.log\",\"schedule.log\",\"preferred-content.log\",\"required-content.log\",\"group-preferred-content.log\"] + [2014-04-07 23:21:52 EEST] TransferWatcher: transfer starting: Download UUID \"86e07a59-8bba-4878-8d0b-5dfe8c6366c4\" SHA256E-s6--5891b5b522d5df086d0ff0b110fbd9d21bb4fc7163af34d08286a2e846f6be03 Nothing + [2014-04-07 23:21:52 EEST] read: git [\"config\",\"--null\",\"--list\"] + [2014-04-07 23:21:52 EEST] TransferWatcher: transfer starting: Download UUID \"86e07a59-8bba-4878-8d0b-5dfe8c6366c4\" test/hello Nothing + [2014-04-07 23:21:52 EEST] read: git [\"config\",\"--null\",\"--list\"] + [2014-04-07 23:21:52 EEST] read: git [\"--git-dir=/storage/sarjat/annex-sarjat/.git\",\"--work-tree=/storage/sarjat/annex-sarjat\",\"show-ref\",\"git-annex\"] + [2014-04-07 23:21:52 EEST] read: git [\"--git-dir=/storage/sarjat/annex-sarjat/.git\",\"--work-tree=/storage/sarjat/annex-sarjat\",\"show-ref\",\"--hash\",\"refs/heads/git-annex\"] + [2014-04-07 23:21:52 EEST] read: git [\"--git-dir=/storage/sarjat/annex-sarjat/.git\",\"--work-tree=/storage/sarjat/annex-sarjat\",\"log\",\"refs/heads/git-annex..20d1f5538f6aa430f29ef938f6db045f5a69425d\",\"--oneline\",\"-n1\"] + [2014-04-07 23:21:52 EEST] read: git [\"--git-dir=/storage/sarjat/annex-sarjat/.git\",\"--work-tree=/storage/sarjat/annex-sarjat\",\"log\",\"refs/heads/git-annex..4deec8203e0baf7bb5b7d5d868d82439261ab3bc\",\"--oneline\",\"-n1\"] + [2014-04-07 23:21:52 EEST] read: git [\"--git-dir=/storage/sarjat/annex-sarjat/.git\",\"--work-tree=/storage/sarjat/annex-sarjat\",\"log\",\"refs/heads/git-annex..b402a6e7b9268e25dbd9c6a027f4a5258993980d\",\"--oneline\",\"-n1\"] + [2014-04-07 23:21:52 EEST] read: git [\"--git-dir=/storage/sarjat/annex-sarjat/.git\",\"--work-tree=/storage/sarjat/annex-sarjat\",\"log\",\"refs/heads/git-annex..7b18a191d58d779aab5789b923adb09863938ffe\",\"--oneline\",\"-n1\"] + [2014-04-07 23:21:52 EEST] feed: git [\"--git-dir=/storage/sarjat/annex-sarjat/.git\",\"--work-tree=/storage/sarjat/annex-sarjat\",\"update-index\",\"-z\",\"--index-info\"] + [2014-04-07 23:21:52 EEST] TransferWatcher: transfer finishing: Transfer {transferDirection = Download, transferUUID = UUID \"86e07a59-8bba-4878-8d0b-5dfe8c6366c4\", transferKey = Key {keyName = \"5891b5b522d5df086d0ff0b110fbd9d21bb4fc7163af34d08286a2e846f6be03\", keyBackendName = \"SHA256E\", keySize = Just 6, keyMtime = Nothing}} + [2014-04-07 23:21:52 EEST] read: git [\"--git-dir=/storage/sarjat/annex-sarjat/.git\",\"--work-tree=/storage/sarjat/annex-sarjat\",\"diff-index\",\"--raw\",\"-z\",\"-r\",\"--no-renames\",\"-l0\",\"--cached\",\"4deec8203e0baf7bb5b7d5d868d82439261ab3bc\"] + [2014-04-07 23:21:52 EEST] read: git [\"--git-dir=/storage/sarjat/annex-sarjat/.git\",\"--work-tree=/storage/sarjat/annex-sarjat\",\"log\",\"4deec8203e0baf7bb5b7d5d868d82439261ab3bc..refs/heads/git-annex\",\"--oneline\",\"-n1\"] + [2014-04-07 23:21:52 EEST] call: git [\"--git-dir=/storage/sarjat/annex-sarjat/.git\",\"--work-tree=/storage/sarjat/annex-sarjat\",\"update-ref\",\"refs/heads/git-annex\",\"4deec8203e0baf7bb5b7d5d868d82439261ab3bc\"] + [2014-04-07 23:22:08 EEST] read: git [\"--git-dir=/storage/sarjat/annex-sarjat/.git\",\"--work-tree=/storage/sarjat/annex-sarjat\",\"ls-tree\",\"--full-tree\",\"-z\",\"--\",\"refs/heads/git-annex\",\"uuid.log\",\"remote.log\",\"trust.log\",\"group.log\",\"numcopies.log\",\"schedule.log\",\"preferred-content.log\",\"required-content.log\",\"group-preferred-content.log\"] + [2014-04-07 23:24:24 EEST] read: git [\"--git-dir=/storage/sarjat/annex-sarjat/.git\",\"--work-tree=/storage/sarjat/annex-sarjat\",\"symbolic-ref\",\"HEAD\"] + [2014-04-07 23:24:24 EEST] read: git [\"--git-dir=/storage/sarjat/annex-sarjat/.git\",\"--work-tree=/storage/sarjat/annex-sarjat\",\"show-ref\",\"refs/heads/master\"] + [2014-04-07 23:24:24 EEST] Merger: merging refs/heads/synced/master into refs/heads/master + [2014-04-07 23:24:24 EEST] read: git [\"--git-dir=/storage/sarjat/annex-sarjat/.git\",\"--work-tree=/storage/sarjat/annex-sarjat\",\"show-ref\",\"--hash\",\"refs/heads/master\"] + [2014-04-07 23:24:24 EEST] call: git [\"--git-dir=/storage/sarjat/annex-sarjat/.git\",\"--work-tree=/storage/sarjat/annex-sarjat\",\"merge\",\"--no-edit\",\"refs/heads/synced/master\"] + Updating 645e474..8406809 + Fast-forward + test/hello | 1 + + 1 file changed, 1 insertion(+) + create mode 120000 test/hello + [2014-04-07 23:24:24 EEST] read: git [\"--git-dir=/storage/sarjat/annex-sarjat/.git\",\"--work-tree=/storage/sarjat/annex-sarjat\",\"show-ref\",\"git-annex\"] + [2014-04-07 23:24:24 EEST] read: git [\"--git-dir=/storage/sarjat/annex-sarjat/.git\",\"--work-tree=/storage/sarjat/annex-sarjat\",\"show-ref\",\"--hash\",\"refs/heads/git-annex\"] + [2014-04-07 23:24:24 EEST] read: git [\"--git-dir=/storage/sarjat/annex-sarjat/.git\",\"--work-tree=/storage/sarjat/annex-sarjat\",\"log\",\"refs/heads/git-annex..4deec8203e0baf7bb5b7d5d868d82439261ab3bc\",\"--oneline\",\"-n1\"] + [2014-04-07 23:24:24 EEST] read: git [\"--git-dir=/storage/sarjat/annex-sarjat/.git\",\"--work-tree=/storage/sarjat/annex-sarjat\",\"log\",\"refs/heads/git-annex..2e0884d9c8859339855ceee396b9ea9ae05865b4\",\"--oneline\",\"-n1\"] + [2014-04-07 23:24:24 EEST] read: git [\"--git-dir=/storage/sarjat/annex-sarjat/.git\",\"--work-tree=/storage/sarjat/annex-sarjat\",\"log\",\"refs/heads/git-annex..b402a6e7b9268e25dbd9c6a027f4a5258993980d\",\"--oneline\",\"-n1\"] + [2014-04-07 23:24:24 EEST] read: git [\"--git-dir=/storage/sarjat/annex-sarjat/.git\",\"--work-tree=/storage/sarjat/annex-sarjat\",\"log\",\"refs/heads/git-annex..7b18a191d58d779aab5789b923adb09863938ffe\",\"--oneline\",\"-n1\"] + [2014-04-07 23:24:24 EEST] chat: git [\"--git-dir=/storage/sarjat/annex-sarjat/.git\",\"--work-tree=/storage/sarjat/annex-sarjat\",\"hash-object\",\"-w\",\"--stdin-paths\",\"--no-filters\"] + [2014-04-07 23:24:24 EEST] feed: git [\"--git-dir=/storage/sarjat/annex-sarjat/.git\",\"--work-tree=/storage/sarjat/annex-sarjat\",\"update-index\",\"-z\",\"--index-info\"] + [2014-04-07 23:24:24 EEST] feed: git [\"--git-dir=/storage/sarjat/annex-sarjat/.git\",\"--work-tree=/storage/sarjat/annex-sarjat\",\"update-index\",\"-z\",\"--index-info\"] + [2014-04-07 23:24:24 EEST] read: git [\"--git-dir=/storage/sarjat/annex-sarjat/.git\",\"--work-tree=/storage/sarjat/annex-sarjat\",\"diff-index\",\"--raw\",\"-z\",\"-r\",\"--no-renames\",\"-l0\",\"--cached\",\"2e0884d9c8859339855ceee396b9ea9ae05865b4\"] + [2014-04-07 23:24:24 EEST] chat: git [\"--git-dir=/storage/sarjat/annex-sarjat/.git\",\"--work-tree=/storage/sarjat/annex-sarjat\",\"hash-object\",\"-t\",\"blob\",\"-w\",\"--stdin\",\"--no-filters\"] + [2014-04-07 23:24:24 EEST] feed: git [\"--git-dir=/storage/sarjat/annex-sarjat/.git\",\"--work-tree=/storage/sarjat/annex-sarjat\",\"update-index\",\"-z\",\"--index-info\"] + [2014-04-07 23:24:24 EEST] read: git [\"--git-dir=/storage/sarjat/annex-sarjat/.git\",\"--work-tree=/storage/sarjat/annex-sarjat\",\"diff-index\",\"--raw\",\"-z\",\"-r\",\"--no-renames\",\"-l0\",\"--cached\",\"refs/heads/git-annex\"] + [2014-04-07 23:24:24 EEST] read: git [\"--git-dir=/storage/sarjat/annex-sarjat/.git\",\"--work-tree=/storage/sarjat/annex-sarjat\",\"write-tree\"] + [2014-04-07 23:24:24 EEST] chat: git [\"--git-dir=/storage/sarjat/annex-sarjat/.git\",\"--work-tree=/storage/sarjat/annex-sarjat\",\"commit-tree\",\"0bd4352b4008165d356bc9b1250bdb456c675175\",\"-p\",\"refs/heads/git-annex\",\"-p\",\"2e0884d9c8859339855ceee396b9ea9ae05865b4\"] + [2014-04-07 23:24:24 EEST] call: git [\"--git-dir=/storage/sarjat/annex-sarjat/.git\",\"--work-tree=/storage/sarjat/annex-sarjat\",\"update-ref\",\"refs/heads/git-annex\",\"214ed317536695b91c8dd5bed059c46c11ad00be\"] + [2014-04-07 23:24:24 EEST] read: git [\"--git-dir=/storage/sarjat/annex-sarjat/.git\",\"--work-tree=/storage/sarjat/annex-sarjat\",\"ls-tree\",\"--full-tree\",\"-z\",\"--\",\"refs/heads/git-annex\",\"uuid.log\",\"remote.log\",\"trust.log\",\"group.log\",\"numcopies.log\",\"schedule.log\",\"preferred-content.log\",\"required-content.log\",\"group-preferred-content.log\"] + [2014-04-07 23:24:24 EEST] Watcher: add symlink test/hello + [2014-04-07 23:24:24 EEST] chat: git [\"--git-dir=/storage/sarjat/annex-sarjat/.git\",\"--work-tree=/storage/sarjat/annex-sarjat\",\"hash-object\",\"-t\",\"blob\",\"-w\",\"--stdin\",\"--no-filters\"] + [2014-04-07 23:24:24 EEST] Committer: committing 1 changes + [2014-04-07 23:24:24 EEST] Committer: Committing changes to git + [2014-04-07 23:24:24 EEST] feed: git [\"--git-dir=/storage/sarjat/annex-sarjat/.git\",\"--work-tree=/storage/sarjat/annex-sarjat\",\"update-index\",\"-z\",\"--index-info\"] + [2014-04-07 23:24:24 EEST] read: git [\"--git-dir=/storage/sarjat/annex-sarjat/.git\",\"--work-tree=/storage/sarjat/annex-sarjat\",\"symbolic-ref\",\"HEAD\"] + [2014-04-07 23:24:24 EEST] read: git [\"--git-dir=/storage/sarjat/annex-sarjat/.git\",\"--work-tree=/storage/sarjat/annex-sarjat\",\"show-ref\",\"--hash\",\"refs/heads/master\"] + [2014-04-07 23:24:24 EEST] read: git [\"--git-dir=/storage/sarjat/annex-sarjat/.git\",\"--work-tree=/storage/sarjat/annex-sarjat\",\"write-tree\"] + [2014-04-07 23:24:24 EEST] read: git [\"--git-dir=/storage/sarjat/annex-sarjat/.git\",\"--work-tree=/storage/sarjat/annex-sarjat\",\"rev-parse\",\"84068090af4bcd3d24f16d865ac07b0478f20ada:\"] + [2014-04-07 23:24:24 EEST] read: git [\"--git-dir=/storage/sarjat/annex-sarjat/.git\",\"--work-tree=/storage/sarjat/annex-sarjat\",\"symbolic-ref\",\"HEAD\"] + [2014-04-07 23:24:24 EEST] read: git [\"--git-dir=/storage/sarjat/annex-sarjat/.git\",\"--work-tree=/storage/sarjat/annex-sarjat\",\"show-ref\",\"refs/heads/master\"] + [2014-04-07 23:30:13 EEST] read: git [\"--git-dir=/storage/sarjat/annex-sarjat/.git\",\"--work-tree=/storage/sarjat/annex-sarjat\",\"show-ref\",\"git-annex\"] + [2014-04-07 23:30:13 EEST] read: git [\"--git-dir=/storage/sarjat/annex-sarjat/.git\",\"--work-tree=/storage/sarjat/annex-sarjat\",\"show-ref\",\"--hash\",\"refs/heads/git-annex\"] + [2014-04-07 23:30:13 EEST] read: git [\"--git-dir=/storage/sarjat/annex-sarjat/.git\",\"--work-tree=/storage/sarjat/annex-sarjat\",\"log\",\"refs/heads/git-annex..214ed317536695b91c8dd5bed059c46c11ad00be\",\"--oneline\",\"-n1\"] + [2014-04-07 23:30:13 EEST] read: git [\"--git-dir=/storage/sarjat/annex-sarjat/.git\",\"--work-tree=/storage/sarjat/annex-sarjat\",\"log\",\"refs/heads/git-annex..2e0884d9c8859339855ceee396b9ea9ae05865b4\",\"--oneline\",\"-n1\"] + [2014-04-07 23:30:13 EEST] read: git [\"--git-dir=/storage/sarjat/annex-sarjat/.git\",\"--work-tree=/storage/sarjat/annex-sarjat\",\"log\",\"refs/heads/git-annex..b402a6e7b9268e25dbd9c6a027f4a5258993980d\",\"--oneline\",\"-n1\"] + [2014-04-07 23:30:13 EEST] read: git [\"--git-dir=/storage/sarjat/annex-sarjat/.git\",\"--work-tree=/storage/sarjat/annex-sarjat\",\"log\",\"refs/heads/git-annex..7b18a191d58d779aab5789b923adb09863938ffe\",\"--oneline\",\"-n1\"] + [2014-04-07 23:30:13 EEST] read: git [\"--git-dir=/storage/sarjat/annex-sarjat/.git\",\"--work-tree=/storage/sarjat/annex-sarjat\",\"ls-tree\",\"--full-tree\",\"-z\",\"--\",\"refs/heads/git-annex\",\"uuid.log\",\"remote.log\",\"trust.log\",\"group.log\",\"numcopies.log\",\"schedule.log\",\"preferred-content.log\",\"required-content.log\",\"group-preferred-content.log\"] + [2014-04-07 23:30:13 EEST] read: git [\"--git-dir=/storage/sarjat/annex-sarjat/.git\",\"--work-tree=/storage/sarjat/annex-sarjat\",\"show-ref\",\"git-annex\"] + [2014-04-07 23:30:13 EEST] read: git [\"--git-dir=/storage/sarjat/annex-sarjat/.git\",\"--work-tree=/storage/sarjat/annex-sarjat\",\"show-ref\",\"--hash\",\"refs/heads/git-annex\"] + [2014-04-07 23:30:13 EEST] read: git [\"--git-dir=/storage/sarjat/annex-sarjat/.git\",\"--work-tree=/storage/sarjat/annex-sarjat\",\"log\",\"refs/heads/git-annex..214ed317536695b91c8dd5bed059c46c11ad00be\",\"--oneline\",\"-n1\"] + [2014-04-07 23:30:13 EEST] read: git [\"--git-dir=/storage/sarjat/annex-sarjat/.git\",\"--work-tree=/storage/sarjat/annex-sarjat\",\"log\",\"refs/heads/git-annex..2e0884d9c8859339855ceee396b9ea9ae05865b4\",\"--oneline\",\"-n1\"] + [2014-04-07 23:30:13 EEST] read: git [\"--git-dir=/storage/sarjat/annex-sarjat/.git\",\"--work-tree=/storage/sarjat/annex-sarjat\",\"log\",\"refs/heads/git-annex..b402a6e7b9268e25dbd9c6a027f4a5258993980d\",\"--oneline\",\"-n1\"] + [2014-04-07 23:30:13 EEST] read: git [\"--git-dir=/storage/sarjat/annex-sarjat/.git\",\"--work-tree=/storage/sarjat/annex-sarjat\",\"log\",\"refs/heads/git-annex..7b18a191d58d779aab5789b923adb09863938ffe\",\"--oneline\",\"-n1\"] + [2014-04-07 23:31:13 EEST] read: git [\"--git-dir=/storage/sarjat/annex-sarjat/.git\",\"--work-tree=/storage/sarjat/annex-sarjat\",\"ls-tree\",\"--full-tree\",\"-z\",\"--\",\"refs/heads/git-annex\",\"uuid.log\",\"remote.log\",\"trust.log\",\"group.log\",\"numcopies.log\",\"schedule.log\",\"preferred-content.log\",\"required-content.log\",\"group-preferred-content.log\"] +\"\"\"]] +"""]] diff -Nru git-annex-5.20140405/doc/bugs/Compilation_error_when_building_version_5.20140402_in_cabal_sandbox.mdwn git-annex-5.20140412ubuntu1/doc/bugs/Compilation_error_when_building_version_5.20140402_in_cabal_sandbox.mdwn --- git-annex-5.20140405/doc/bugs/Compilation_error_when_building_version_5.20140402_in_cabal_sandbox.mdwn 2014-04-05 22:05:28.000000000 +0000 +++ git-annex-5.20140412ubuntu1/doc/bugs/Compilation_error_when_building_version_5.20140402_in_cabal_sandbox.mdwn 2014-04-11 22:12:28.000000000 +0000 @@ -33,3 +33,4 @@ ### Please provide any additional information below. +> [[fixed|done]] --[[Joey]] diff -Nru git-annex-5.20140405/doc/bugs/git-annex_fails_to_initialize_under_Windows/comment_2_b9a3a0104bc56f9110fc58c9df140f12._comment git-annex-5.20140412ubuntu1/doc/bugs/git-annex_fails_to_initialize_under_Windows/comment_2_b9a3a0104bc56f9110fc58c9df140f12._comment --- git-annex-5.20140405/doc/bugs/git-annex_fails_to_initialize_under_Windows/comment_2_b9a3a0104bc56f9110fc58c9df140f12._comment 1970-01-01 00:00:00.000000000 +0000 +++ git-annex-5.20140412ubuntu1/doc/bugs/git-annex_fails_to_initialize_under_Windows/comment_2_b9a3a0104bc56f9110fc58c9df140f12._comment 2014-04-11 22:12:28.000000000 +0000 @@ -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 + +"""]] diff -Nru git-annex-5.20140405/doc/bugs/Git-Annex_requires_all_repositories_to_repair/comment_1_dff1424e48835d7d3eb8653fc59de18a._comment git-annex-5.20140412ubuntu1/doc/bugs/Git-Annex_requires_all_repositories_to_repair/comment_1_dff1424e48835d7d3eb8653fc59de18a._comment --- git-annex-5.20140405/doc/bugs/Git-Annex_requires_all_repositories_to_repair/comment_1_dff1424e48835d7d3eb8653fc59de18a._comment 1970-01-01 00:00:00.000000000 +0000 +++ git-annex-5.20140412ubuntu1/doc/bugs/Git-Annex_requires_all_repositories_to_repair/comment_1_dff1424e48835d7d3eb8653fc59de18a._comment 2014-04-11 22:12:28.000000000 +0000 @@ -0,0 +1,10 @@ +[[!comment format=mdwn + username="http://joeyh.name/" + ip="209.250.56.244" + subject="comment 1" + date="2014-04-07T19:25:25Z" + content=""" +Repair does not require access to remotes, but it will certianly yield a better result to have one remote available. Otherwise, information that cannot be repaired will be missing from the repository. Repair will still successfully complete in this situation though. + +If you have an error message, please paste it. +"""]] diff -Nru git-annex-5.20140405/doc/bugs/Git-Annex_requires_all_repositories_to_repair.mdwn git-annex-5.20140412ubuntu1/doc/bugs/Git-Annex_requires_all_repositories_to_repair.mdwn --- git-annex-5.20140405/doc/bugs/Git-Annex_requires_all_repositories_to_repair.mdwn 1970-01-01 00:00:00.000000000 +0000 +++ git-annex-5.20140412ubuntu1/doc/bugs/Git-Annex_requires_all_repositories_to_repair.mdwn 2014-04-11 22:12:28.000000000 +0000 @@ -0,0 +1,2 @@ +I recently had my git-annex repository die and it needed to be repaired. Two of my repositories are external hard drives. When I tried to use git-annex repair, it would churn for some hours, then error because the external hard drives were not plugged in. When I brought the two hard drives home from the various places that they are (safely) stored, it all worked fine, but it would have been great if git-annex repair could somehow do what it could with what was connected and do the rest as and when the other drives are plugged in. This must only become more of a problem as git-annex is used for longer, as one may have a handful of USB keys storing a little on each. + diff -Nru git-annex-5.20140405/doc/bugs/git_annex_sync_in_direct_mode_does_not_honor_skip-worktree/comment_5_cb98789c50c58f01055183dbaf7b4eba._comment git-annex-5.20140412ubuntu1/doc/bugs/git_annex_sync_in_direct_mode_does_not_honor_skip-worktree/comment_5_cb98789c50c58f01055183dbaf7b4eba._comment --- git-annex-5.20140405/doc/bugs/git_annex_sync_in_direct_mode_does_not_honor_skip-worktree/comment_5_cb98789c50c58f01055183dbaf7b4eba._comment 1970-01-01 00:00:00.000000000 +0000 +++ git-annex-5.20140412ubuntu1/doc/bugs/git_annex_sync_in_direct_mode_does_not_honor_skip-worktree/comment_5_cb98789c50c58f01055183dbaf7b4eba._comment 2014-04-11 22:12:28.000000000 +0000 @@ -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. + +"""]] diff -Nru git-annex-5.20140405/doc/bugs/nautilus__47__scripts__47__git-annex_get:_openFile:_does_not_exist___40__No_such_file_or_directory__41__/comment_1_9fdeaa51ccc7c71dcfeea3ea783d3b50._comment git-annex-5.20140412ubuntu1/doc/bugs/nautilus__47__scripts__47__git-annex_get:_openFile:_does_not_exist___40__No_such_file_or_directory__41__/comment_1_9fdeaa51ccc7c71dcfeea3ea783d3b50._comment --- git-annex-5.20140405/doc/bugs/nautilus__47__scripts__47__git-annex_get:_openFile:_does_not_exist___40__No_such_file_or_directory__41__/comment_1_9fdeaa51ccc7c71dcfeea3ea783d3b50._comment 1970-01-01 00:00:00.000000000 +0000 +++ git-annex-5.20140412ubuntu1/doc/bugs/nautilus__47__scripts__47__git-annex_get:_openFile:_does_not_exist___40__No_such_file_or_directory__41__/comment_1_9fdeaa51ccc7c71dcfeea3ea783d3b50._comment 2014-04-11 22:12:28.000000000 +0000 @@ -0,0 +1,9 @@ +[[!comment format=mdwn + username="https://www.google.com/accounts/o8/id?id=AItOawmqz6wCn-Q1vzrsHGvEJHOt_T5ZESilxhc" + nickname="Sören" + subject="comment 1" + date="2014-04-06T11:34:37Z" + content=""" +The problem has been reported [here](http://git-annex.branchable.com/bugs/git-annex_fails_to_start_when_nautilus_script_directory_is_missing/) as well and is already fixed in the latest [release](http://git-annex.branchable.com/news/version_5.20140405/). + +"""]] diff -Nru git-annex-5.20140405/doc/bugs/nautilus__47__scripts__47__git-annex_get:_openFile:_does_not_exist___40__No_such_file_or_directory__41__.mdwn git-annex-5.20140412ubuntu1/doc/bugs/nautilus__47__scripts__47__git-annex_get:_openFile:_does_not_exist___40__No_such_file_or_directory__41__.mdwn --- git-annex-5.20140405/doc/bugs/nautilus__47__scripts__47__git-annex_get:_openFile:_does_not_exist___40__No_such_file_or_directory__41__.mdwn 1970-01-01 00:00:00.000000000 +0000 +++ git-annex-5.20140412ubuntu1/doc/bugs/nautilus__47__scripts__47__git-annex_get:_openFile:_does_not_exist___40__No_such_file_or_directory__41__.mdwn 2014-04-11 22:12:28.000000000 +0000 @@ -0,0 +1,30 @@ +### Please describe the problem. +When I try to start the webapp, it fails, complaining about a nautilus script. + + +### What version of git-annex are you using? On what operating system? +Mythbuntu 12.04 (which is based on XFCE and doesn't have nautilus) +$ git-annex version +git-annex version: 5.20140402 +build flags: Assistant Webapp Webapp-secure Pairing S3 WebDAV Inotify DBus DesktopNotify XMPP 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: 0 1 2 4 + +### Please provide any additional information below. + +[[!format sh """ +# If you can, paste a complete transcript of the problem occurring here. +# If the problem is with the git-annex assistant, paste in .git/annex/daemon.log +$ git-annex webapp + +git-annex: /home/mythbuntu/.local/share/nautilus/scripts/git-annex get: openFile: does not exist (No such file or directory) +failed +git-annex: webapp: 1 failed + +# End of transcript or log. +"""]] + +[[fixed|done]] --[[Joey]] diff -Nru git-annex-5.20140405/doc/bugs/Repository_Information_Is_Lost/comment_1_bae0ed4c0a6baf1675f8de1663042f43._comment git-annex-5.20140412ubuntu1/doc/bugs/Repository_Information_Is_Lost/comment_1_bae0ed4c0a6baf1675f8de1663042f43._comment --- git-annex-5.20140405/doc/bugs/Repository_Information_Is_Lost/comment_1_bae0ed4c0a6baf1675f8de1663042f43._comment 1970-01-01 00:00:00.000000000 +0000 +++ git-annex-5.20140412ubuntu1/doc/bugs/Repository_Information_Is_Lost/comment_1_bae0ed4c0a6baf1675f8de1663042f43._comment 2014-04-11 22:12:28.000000000 +0000 @@ -0,0 +1,8 @@ +[[!comment format=mdwn + username="http://joeyh.name/" + ip="209.250.56.244" + subject="comment 1" + date="2014-04-07T19:24:12Z" + content=""" +Have you run `git-annex repair` or used the assistant to repair this repository? This can result in data going missing until the repository is able to pull the data from one of its remotes. +"""]] diff -Nru git-annex-5.20140405/doc/contribute.mdwn git-annex-5.20140412ubuntu1/doc/contribute.mdwn --- git-annex-5.20140405/doc/contribute.mdwn 1970-01-01 00:00:00.000000000 +0000 +++ git-annex-5.20140412ubuntu1/doc/contribute.mdwn 2014-04-11 22:12:28.000000000 +0000 @@ -0,0 +1,15 @@ +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. + +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. diff -Nru git-annex-5.20140405/doc/design/assistant.mdwn git-annex-5.20140412ubuntu1/doc/design/assistant.mdwn --- git-annex-5.20140405/doc/design/assistant.mdwn 2013-10-17 22:58:50.000000000 +0000 +++ git-annex-5.20140412ubuntu1/doc/design/assistant.mdwn 2014-04-11 22:12:28.000000000 +0000 @@ -3,7 +3,7 @@ Parts of the design is still being fleshed out, still many ideas and use cases to add. Feel free to chip in with comments! --[[Joey]] -See [[roadmap]] for current plans. +See [[roadmap]] for current plans, as this list was mostly completed. ## initial development kickstarter year overview (2012-2013) diff -Nru git-annex-5.20140405/doc/design/git-remote-daemon.mdwn git-annex-5.20140412ubuntu1/doc/design/git-remote-daemon.mdwn --- git-annex-5.20140405/doc/design/git-remote-daemon.mdwn 2014-04-05 22:05:28.000000000 +0000 +++ git-annex-5.20140412ubuntu1/doc/design/git-remote-daemon.mdwn 2014-04-11 22:12:28.000000000 +0000 @@ -37,35 +37,24 @@ # design -Let git-remote-daemon be the name. It runs in a repo and -either: +Let git-remote-daemon be the name. Or for git-annex, +`git annex remotedaemon`. -* forks to background and performs configured actions (ie, `git pull`) -* with --foreground, communicates over stdio - with its caller using a simple protocol (exiting when its caller closes its - stdin handle so it will stop when the assistant stops). +It runs in one of two ways: -It is configured entirely by .git/config. +1. Forked to background, using a named pipe for the control protocol. +2. With --foreground, the control protocol goes over stdio. -# encryption & authentication - -For simplicity, the network transports have to do their own end-to-end -encryption. Encryption is not part of this design. - -(XMPP does not do end-to-end encryption, but might be supported -transitionally.) - -Ditto for authentication that we're talking to who we indend to talk to. -Any public key data etc used for authenticion is part of the remote's -configuration (or hidden away in a secure chmodded file, if neccesary). -This design does not concern itself with authenticating the remote node, -it just takes the auth token and uses it. +Either way, behavior is the same: -For example, in telehash, each node has its own keypair, which is used -or authentication and encryption, and is all that's needed to route -messages to that node. +* Get a list of remotes to act on by looking at .git/config +* Automatically notices when a remote has changes to branches + matching remote.$name.fetch, and pulls them down to the appropriate + location. +* When the control protocol informs it about a new ref that's available, + it offers the ref to any interested remotes. -# stdio protocol +# control protocol This is an asynchronous protocol. Ie, either side can send any message at any time, and the other side does not send a reply. @@ -82,25 +71,21 @@ * `CONNECTED $remote` - Send when a connection has been made with a remote. + Sent when a connection has been made with a remote. * `DISCONNECTED $remote` - Send when connection with a remote has been lost. - -* `CHANGED $remote $sha ...` - - This indicates that refs in the named git remote have changed, - and indicates the new shas. + Sent when connection with a remote has been lost. -* `STATUS $remote $string` +* `SYNCING $remote` - A user-visible status message about a named remote. + Indicates that a pull or a push with a remote is in progress. + Always followed by DONESYNCING. -* `ERROR $remote $string` +* `DONESYNCING 1|0 $remote` - A user-visible error about a named remote. - (Can continue running past this point, for this or other remotes.) + Indicates that syncing with a remote is done, and either succeeded + (1) or failed (0). ## consumed messages @@ -119,21 +104,44 @@ Affects all remotes. -* `PUSH $remote` +* `CHANGED ref ...` - Requests that a git push be done with the remote over the network - transport when next possible. May be repeated many times before the push - finally happens. + Indicates that a ref is new or has changed. These can be offered to peers, + and peers that are interested in them can pull the content. * `RELOAD` Indicates that configs have changed. Daemon should reload .git/config and/or restart. -# send-pack and receive-pack + Possible config changes include adding a new remote, removing a remote, + or setting `remote..annex-sync` to configure whether to sync with a + particular remote. + +* `STOP` + + Shut down git-remote-daemon -Done as the assistant does with XMPP currently. Does not involve -communication over the above stdio protocol. + (When using stdio, it also should shutdown when it reaches EOF on + stdin.) + +# encryption & authentication + +For simplicity, the network transports have to do their own end-to-end +encryption. Encryption is not part of this design. + +(XMPP does not do end-to-end encryption, but might be supported +transitionally.) + +Ditto for authentication that we're talking to who we indend to talk to. +Any public key data etc used for authenticion is part of the remote's +configuration (or hidden away in a secure chmodded file, if neccesary). +This design does not concern itself with authenticating the remote node, +it just takes the auth token and uses it. + +For example, in telehash, each node has its own keypair, which is used +or authentication and encryption, and is all that's needed to route +messages to that node. # network level protocol @@ -143,17 +151,27 @@ one design, and git-annex-shell on a central ssh server has a very different (and much simpler) design. -## git-annex-shell +## ssh + +`git-annex-shell notifychanges` is run, and speaks a simple protocol +over stdio to inform when refs on the remote have changed. + +No pushing is done for CHANGED, since git handles ssh natively. -Speak a subset of the stdio protocol between git-annex-shell and -git-remote-daemon, over ssh. +TODO: -Only thing that seems to be needed is CHANGED, actually! +* Remote system might not be available. Find a smart way to detect it, + ideally w/o generating network traffic. One way might be to check + if the ssh connection caching control socket exists, for example. +* Remote system might be available, and connection get lost. Should + reconnect, but needs to avoid bad behavior (ie, constant reconnect + attempts.) +* Detect if old system had a too old git-annex-shell and avoid bad behavior ## telehash TODO -## XMPP +## xmpp Reuse [[assistant/xmpp]] diff -Nru git-annex-5.20140405/doc/design/roadmap.mdwn git-annex-5.20140412ubuntu1/doc/design/roadmap.mdwn --- git-annex-5.20140405/doc/design/roadmap.mdwn 2014-04-02 22:46:31.000000000 +0000 +++ git-annex-5.20140412ubuntu1/doc/design/roadmap.mdwn 2014-04-11 22:12:28.000000000 +0000 @@ -11,7 +11,7 @@ * 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]] diff -Nru git-annex-5.20140405/doc/devblog/day_147__git-annex_remotedaemon.mdwn git-annex-5.20140412ubuntu1/doc/devblog/day_147__git-annex_remotedaemon.mdwn --- git-annex-5.20140405/doc/devblog/day_147__git-annex_remotedaemon.mdwn 1970-01-01 00:00:00.000000000 +0000 +++ git-annex-5.20140412ubuntu1/doc/devblog/day_147__git-annex_remotedaemon.mdwn 2014-04-11 22:12:28.000000000 +0000 @@ -0,0 +1,5 @@ +Built `git-annex remotedaemon` command today. It's buggy, but it already +works! If you have a new enough git-annex-shell on a remote server, you can +run "git annex remotedaemon" in a git-annex repository, and it will notice +any pushes that get made to that remote from any other clone, and pull down +the changes. diff -Nru git-annex-5.20140405/doc/devblog/day_148__too_many_documents.mdwn git-annex-5.20140412ubuntu1/doc/devblog/day_148__too_many_documents.mdwn --- git-annex-5.20140405/doc/devblog/day_148__too_many_documents.mdwn 1970-01-01 00:00:00.000000000 +0000 +++ git-annex-5.20140412ubuntu1/doc/devblog/day_148__too_many_documents.mdwn 2014-04-11 22:12:28.000000000 +0000 @@ -0,0 +1,8 @@ +Various bug triage today. Was not good for much after shuffling paper for +the whole first part of the day, but did get a few little things done. + +Re , git-annex does not use OpenSSL itself, +but when using XMPP, the remote server's key could have been intercepted +using this new technique. Also, the git-annex autobuilds and this website +are served over https -- working on generating new https certificates now. +Be safe out there.. diff -Nru git-annex-5.20140405/doc/devblog/day_149__remote_control_working.mdwn git-annex-5.20140412ubuntu1/doc/devblog/day_149__remote_control_working.mdwn --- git-annex-5.20140405/doc/devblog/day_149__remote_control_working.mdwn 1970-01-01 00:00:00.000000000 +0000 +++ git-annex-5.20140412ubuntu1/doc/devblog/day_149__remote_control_working.mdwn 2014-04-11 22:12:28.000000000 +0000 @@ -0,0 +1,15 @@ +[[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! + +Today's work was sponsored by Frédéric Schütz. diff -Nru git-annex-5.20140405/doc/devblog/day_149__signal.mdwn git-annex-5.20140412ubuntu1/doc/devblog/day_149__signal.mdwn --- git-annex-5.20140405/doc/devblog/day_149__signal.mdwn 1970-01-01 00:00:00.000000000 +0000 +++ git-annex-5.20140412ubuntu1/doc/devblog/day_149__signal.mdwn 2014-04-11 22:12:28.000000000 +0000 @@ -0,0 +1,16 @@ +[[!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 +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. diff -Nru git-annex-5.20140405/doc/encryption/comment_2_f19c9bb519a7017f0731fd0e8780ed74._comment git-annex-5.20140412ubuntu1/doc/encryption/comment_2_f19c9bb519a7017f0731fd0e8780ed74._comment --- git-annex-5.20140405/doc/encryption/comment_2_f19c9bb519a7017f0731fd0e8780ed74._comment 1970-01-01 00:00:00.000000000 +0000 +++ git-annex-5.20140412ubuntu1/doc/encryption/comment_2_f19c9bb519a7017f0731fd0e8780ed74._comment 2014-04-11 22:12:28.000000000 +0000 @@ -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? + +"""]] diff -Nru git-annex-5.20140405/doc/forum/A_tiny_filesystem__63__/comment_1_993e3f5dbe4bcbb5b7bd9e08ab9554f3._comment git-annex-5.20140412ubuntu1/doc/forum/A_tiny_filesystem__63__/comment_1_993e3f5dbe4bcbb5b7bd9e08ab9554f3._comment --- git-annex-5.20140405/doc/forum/A_tiny_filesystem__63__/comment_1_993e3f5dbe4bcbb5b7bd9e08ab9554f3._comment 1970-01-01 00:00:00.000000000 +0000 +++ git-annex-5.20140412ubuntu1/doc/forum/A_tiny_filesystem__63__/comment_1_993e3f5dbe4bcbb5b7bd9e08ab9554f3._comment 2014-04-11 22:12:28.000000000 +0000 @@ -0,0 +1,8 @@ +[[!comment format=mdwn + username="http://joeyh.name/" + ip="209.250.56.244" + subject="comment 1" + date="2014-04-05T22:34:32Z" + 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\" +"""]] diff -Nru git-annex-5.20140405/doc/forum/A_tiny_filesystem__63__/comment_2_af57591d42868c8aa1cc1eda43ca8b98._comment git-annex-5.20140412ubuntu1/doc/forum/A_tiny_filesystem__63__/comment_2_af57591d42868c8aa1cc1eda43ca8b98._comment --- git-annex-5.20140405/doc/forum/A_tiny_filesystem__63__/comment_2_af57591d42868c8aa1cc1eda43ca8b98._comment 1970-01-01 00:00:00.000000000 +0000 +++ git-annex-5.20140412ubuntu1/doc/forum/A_tiny_filesystem__63__/comment_2_af57591d42868c8aa1cc1eda43ca8b98._comment 2014-04-11 22:12:28.000000000 +0000 @@ -0,0 +1,8 @@ +[[!comment format=mdwn + username="https://id.koumbit.net/anarcat" + ip="2001:1928:1:9::1" + subject="comment 2" + date="2014-04-07T04:25:43Z" + content=""" +what's wrong with [sharebox](https://github.com/chmduquesne/sharebox-fs), actually? +"""]] diff -Nru git-annex-5.20140405/doc/forum/A_tiny_filesystem__63__/comment_3_3869c0472b50d7cf5e29ac0720f4f20f._comment git-annex-5.20140412ubuntu1/doc/forum/A_tiny_filesystem__63__/comment_3_3869c0472b50d7cf5e29ac0720f4f20f._comment --- git-annex-5.20140405/doc/forum/A_tiny_filesystem__63__/comment_3_3869c0472b50d7cf5e29ac0720f4f20f._comment 1970-01-01 00:00:00.000000000 +0000 +++ git-annex-5.20140412ubuntu1/doc/forum/A_tiny_filesystem__63__/comment_3_3869c0472b50d7cf5e29ac0720f4f20f._comment 2014-04-11 22:12:28.000000000 +0000 @@ -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? +"""]] diff -Nru git-annex-5.20140405/doc/forum/Automatically_dropping_files.mdwn git-annex-5.20140412ubuntu1/doc/forum/Automatically_dropping_files.mdwn --- git-annex-5.20140405/doc/forum/Automatically_dropping_files.mdwn 1970-01-01 00:00:00.000000000 +0000 +++ git-annex-5.20140412ubuntu1/doc/forum/Automatically_dropping_files.mdwn 2014-04-11 22:12:28.000000000 +0000 @@ -0,0 +1,7 @@ +I can make `git-annex` automatically fetch files with the [[/preferred content]] setting and the `--auto` flag, and it works almost exactly like I expect it to work. + +What I am missing is a way to make `git annex drop --auto` drop all files that are not wanted. + +I would like to work with metadata and tags in such a way that I can have clones (with views) that have only exactly those files available which carry a tag (done), and all other files automatically removed from the annex (unless that would be unsafe). + +Does anyone know how to achieve this? diff -Nru git-annex-5.20140405/doc/forum/git_annex_assistant_-_Changing_repository_information.mdwn git-annex-5.20140412ubuntu1/doc/forum/git_annex_assistant_-_Changing_repository_information.mdwn --- git-annex-5.20140405/doc/forum/git_annex_assistant_-_Changing_repository_information.mdwn 1970-01-01 00:00:00.000000000 +0000 +++ git-annex-5.20140412ubuntu1/doc/forum/git_annex_assistant_-_Changing_repository_information.mdwn 2014-04-11 22:12:28.000000000 +0000 @@ -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? diff -Nru git-annex-5.20140405/doc/forum/Walkthrough_for_direct_mode__63__.mdwn git-annex-5.20140412ubuntu1/doc/forum/Walkthrough_for_direct_mode__63__.mdwn --- git-annex-5.20140405/doc/forum/Walkthrough_for_direct_mode__63__.mdwn 1970-01-01 00:00:00.000000000 +0000 +++ git-annex-5.20140412ubuntu1/doc/forum/Walkthrough_for_direct_mode__63__.mdwn 2014-04-11 22:12:28.000000000 +0000 @@ -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 - diff -Nru git-annex-5.20140405/doc/git-annex.mdwn git-annex-5.20140412ubuntu1/doc/git-annex.mdwn --- git-annex-5.20140405/doc/git-annex.mdwn 2014-04-02 22:46:31.000000000 +0000 +++ git-annex-5.20140412ubuntu1/doc/git-annex.mdwn 2014-04-11 22:12:28.000000000 +0000 @@ -268,7 +268,7 @@ Use `--template` to control where the files are stored. The default template is '${feedtitle}/${itemtitle}${extension}' - (Other available variables: feedauthor, itemauthor, itemsummary, itemdescription, itemrights, itemid) + (Other available variables: feedauthor, itemauthor, itemsummary, itemdescription, itemrights, itemid, itempubdate) The `--relaxed` and `--fast` options behave the same as they do in addurl. @@ -922,6 +922,10 @@ There are several parameters, provided by Haskell's tasty test framework. +* `remotedaemon` + + Detects when remotes have changed and fetches from them. + * `xmppgit` This command is used internally to perform git pulls over XMPP. diff -Nru git-annex-5.20140405/doc/git-annex-shell.mdwn git-annex-5.20140412ubuntu1/doc/git-annex-shell.mdwn --- git-annex-5.20140405/doc/git-annex-shell.mdwn 2014-04-05 22:05:28.000000000 +0000 +++ git-annex-5.20140412ubuntu1/doc/git-annex-shell.mdwn 2014-04-11 22:12:28.000000000 +0000 @@ -67,7 +67,7 @@ * 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 @@ -106,6 +106,9 @@ 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. diff -Nru git-annex-5.20140405/doc/index.mdwn git-annex-5.20140412ubuntu1/doc/index.mdwn --- git-annex-5.20140405/doc/index.mdwn 2013-10-17 22:58:50.000000000 +0000 +++ git-annex-5.20140412ubuntu1/doc/index.mdwn 2014-04-11 22:12:28.000000000 +0000 @@ -39,7 +39,8 @@ ---- -git-annex is [[Free Software|license]] +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 hosted by [Branchable](http://branchable.com/). diff -Nru git-annex-5.20140405/doc/metadata.mdwn git-annex-5.20140412ubuntu1/doc/metadata.mdwn --- git-annex-5.20140405/doc/metadata.mdwn 2014-04-02 22:46:31.000000000 +0000 +++ git-annex-5.20140412ubuntu1/doc/metadata.mdwn 2014-04-11 22:12:28.000000000 +0000 @@ -12,7 +12,7 @@ or without particular metadata. For example `git annex find --metadata tag=foo --or --metadata tag=bar` * Using it in [[preferred_content]] expressions. - For example "tag=important or not author=me" + For example "metadata=tag=important or not metadata=author=me" Each file (actually the underlying key) can have any number of metadata fields, which each can have any number of values. For example, to tag diff -Nru git-annex-5.20140405/doc/news/version_5.20140221.mdwn git-annex-5.20140412ubuntu1/doc/news/version_5.20140221.mdwn --- git-annex-5.20140405/doc/news/version_5.20140221.mdwn 2014-03-12 15:53:22.000000000 +0000 +++ git-annex-5.20140412ubuntu1/doc/news/version_5.20140221.mdwn 1970-01-01 00:00:00.000000000 +0000 @@ -1,28 +0,0 @@ -git-annex 5.20140221 released with [[!toggle text="these changes"]] -[[!toggleable text=""" - * metadata: New command that can attach metadata to files. - * --metadata can be used to limit commands to acting on files - that have particular metadata. - * Preferred content expressions can use metadata=field=value - to limit them to acting on files that have particular metadata. - * view: New command that creates and checks out a branch that provides - a structured view of selected metadata. - * vfilter, vadd, vpop, vcycle: New commands for operating within views. - * pre-commit: Update metadata when committing changes to locations - of annexed files within a view. - * Add progress display for transfers to/from external special remotes. - * unused: Fix to actually detect unused keys when in direct mode. - * fsck: When run with --all or --unused, while .gitattributes - annex.numcopies cannot be honored since it's operating on keys - instead of files, make it honor the global numcopies setting, - and the annex.numcopies git config setting. - * trust, untrust, semitrust, dead: Warn when the trust level is - overridden in .git/config. - * glacier: Do not try to run glacier value create when an existing glacier - remote is enabled. - * fsck: Refuse to do anything if more than one of --incremental, --more, - and --incremental-schedule are given, since it's not clear which option - should win. - * Windows webapp: Can set up box.com, Amazon S3, and rsync.net remotes - * Windows webapp: Can create repos on removable drives. - * Windows: Ensure HOME is set, as needed by bundled cygwin utilities."""]] \ No newline at end of file diff -Nru git-annex-5.20140405/doc/news/version_5.20140227.mdwn git-annex-5.20140412ubuntu1/doc/news/version_5.20140227.mdwn --- git-annex-5.20140405/doc/news/version_5.20140227.mdwn 2014-03-12 15:53:22.000000000 +0000 +++ git-annex-5.20140412ubuntu1/doc/news/version_5.20140227.mdwn 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru git-annex-5.20140405/doc/news/version_5.20140405.mdwn git-annex-5.20140412ubuntu1/doc/news/version_5.20140405.mdwn --- git-annex-5.20140405/doc/news/version_5.20140405.mdwn 1970-01-01 00:00:00.000000000 +0000 +++ git-annex-5.20140412ubuntu1/doc/news/version_5.20140405.mdwn 2014-04-11 22:12:28.000000000 +0000 @@ -0,0 +1,7 @@ +git-annex 5.20140405 released with [[!toggle text="these changes"]] +[[!toggleable text=""" + * git-annex-shell: Added notifychanges command. + * Improve display of dbus notifications. Thanks, Johan Kiviniemi. + * Fix nautilus script installation to not crash when the nautilus script dir + does not exist. Instead, only install scripts when the directory already + exists."""]] \ No newline at end of file diff -Nru git-annex-5.20140405/doc/news/version_5.20140411.mdwn git-annex-5.20140412ubuntu1/doc/news/version_5.20140411.mdwn --- git-annex-5.20140405/doc/news/version_5.20140411.mdwn 1970-01-01 00:00:00.000000000 +0000 +++ git-annex-5.20140412ubuntu1/doc/news/version_5.20140411.mdwn 2014-04-11 22:12:28.000000000 +0000 @@ -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 diff -Nru git-annex-5.20140405/doc/preferred_content.mdwn git-annex-5.20140412ubuntu1/doc/preferred_content.mdwn --- git-annex-5.20140405/doc/preferred_content.mdwn 2014-04-02 22:46:31.000000000 +0000 +++ git-annex-5.20140412ubuntu1/doc/preferred_content.mdwn 2014-04-11 22:12:28.000000000 +0000 @@ -144,6 +144,16 @@ expression tuned for your needs, and every repository you put in this group and make its preferred content be "groupwanted" will use it. +### difference: metadata matching + +This: + + git annex get --metadata tag=done + +becomes + + metadata=tag=done + ## upgrades It's important that all clones of a repository can understand one-another's diff -Nru git-annex-5.20140405/doc/tips/downloading_podcasts.mdwn git-annex-5.20140412ubuntu1/doc/tips/downloading_podcasts.mdwn --- git-annex-5.20140405/doc/tips/downloading_podcasts.mdwn 2014-01-24 14:23:06.000000000 +0000 +++ git-annex-5.20140412ubuntu1/doc/tips/downloading_podcasts.mdwn 2014-04-11 22:12:28.000000000 +0000 @@ -23,7 +23,8 @@ `--template='${feedtitle}/${itemtitle}${extension}'` Other available template variables: -feedauthor, itemauthor, itemsummary, itemdescription, itemrights, itemid +feedauthor, itemauthor, itemsummary, itemdescription, itemrights, itemid, +itempubdate ## catching up diff -Nru git-annex-5.20140405/doc/tips/googledriveannex/comment_2_c98c00e87bc921158c9c3698fd9f89c9._comment git-annex-5.20140412ubuntu1/doc/tips/googledriveannex/comment_2_c98c00e87bc921158c9c3698fd9f89c9._comment --- git-annex-5.20140405/doc/tips/googledriveannex/comment_2_c98c00e87bc921158c9c3698fd9f89c9._comment 1970-01-01 00:00:00.000000000 +0000 +++ git-annex-5.20140412ubuntu1/doc/tips/googledriveannex/comment_2_c98c00e87bc921158c9c3698fd9f89c9._comment 2014-04-11 22:12:28.000000000 +0000 @@ -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 + +"""]] diff -Nru git-annex-5.20140405/doc/tips/shared_git_annex_directory_between_multiple_users/comment_1_01db8cf9dff016bd8e0498d36f325418._comment git-annex-5.20140412ubuntu1/doc/tips/shared_git_annex_directory_between_multiple_users/comment_1_01db8cf9dff016bd8e0498d36f325418._comment --- git-annex-5.20140405/doc/tips/shared_git_annex_directory_between_multiple_users/comment_1_01db8cf9dff016bd8e0498d36f325418._comment 1970-01-01 00:00:00.000000000 +0000 +++ git-annex-5.20140412ubuntu1/doc/tips/shared_git_annex_directory_between_multiple_users/comment_1_01db8cf9dff016bd8e0498d36f325418._comment 2014-04-11 22:12:28.000000000 +0000 @@ -0,0 +1,8 @@ +[[!comment format=mdwn + username="madduck" + ip="2001:a60:f0fb:0:224:d7ff:fe04:c82c" + subject="Does not work" + date="2014-04-06T10:48:06Z" + content=""" +This does not seem to work, even with latest git-annex. I think it's because git-annex [[!debbug desc=\"creates files without honouring +s on the parent directory\" 729757]]. I just found out it also doesn't honour default ACLs. I hope this can be fixed soon. +"""]] diff -Nru git-annex-5.20140405/doc/tips/using_gitolite_with_git-annex.mdwn git-annex-5.20140412ubuntu1/doc/tips/using_gitolite_with_git-annex.mdwn --- git-annex-5.20140405/doc/tips/using_gitolite_with_git-annex.mdwn 2013-10-17 22:58:50.000000000 +0000 +++ git-annex-5.20140412ubuntu1/doc/tips/using_gitolite_with_git-annex.mdwn 2014-04-11 22:12:28.000000000 +0000 @@ -3,8 +3,6 @@ `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 @@ 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 @@ 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: diff -Nru git-annex-5.20140405/doc/tips/using_the_web_as_a_special_remote/comment_6_dceb15bd656e69eefa3ca975d9d642de._comment git-annex-5.20140412ubuntu1/doc/tips/using_the_web_as_a_special_remote/comment_6_dceb15bd656e69eefa3ca975d9d642de._comment --- git-annex-5.20140405/doc/tips/using_the_web_as_a_special_remote/comment_6_dceb15bd656e69eefa3ca975d9d642de._comment 1970-01-01 00:00:00.000000000 +0000 +++ git-annex-5.20140412ubuntu1/doc/tips/using_the_web_as_a_special_remote/comment_6_dceb15bd656e69eefa3ca975d9d642de._comment 2014-04-11 22:12:28.000000000 +0000 @@ -0,0 +1,8 @@ +[[!comment format=mdwn + username="http://joeyh.name/" + ip="209.250.56.244" + subject="comment 6" + date="2014-04-07T20:07:45Z" + content=""" +Using the URL backend for youtube is intentional. Youtube may serve up different encodings for the same video over time, and this way git-annex treats them all as equvilant. If you want to \"freeze\" the repository to the current one, use `git annex migrate`, and be prepared for `git annex get --from web` to not work long term. +"""]] diff -Nru git-annex-5.20140405/doc/todo/LIst_of_Available_Remotes_in_Webapp.mdwn git-annex-5.20140412ubuntu1/doc/todo/LIst_of_Available_Remotes_in_Webapp.mdwn --- git-annex-5.20140405/doc/todo/LIst_of_Available_Remotes_in_Webapp.mdwn 1970-01-01 00:00:00.000000000 +0000 +++ git-annex-5.20140412ubuntu1/doc/todo/LIst_of_Available_Remotes_in_Webapp.mdwn 2014-04-11 22:12:28.000000000 +0000 @@ -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. diff -Nru git-annex-5.20140405/doc/todo/make___34__itemdate__34___valid_importfeed_template_option/comment_1_9fa523d1eabb6e029a91413770e9af72._comment git-annex-5.20140412ubuntu1/doc/todo/make___34__itemdate__34___valid_importfeed_template_option/comment_1_9fa523d1eabb6e029a91413770e9af72._comment --- git-annex-5.20140405/doc/todo/make___34__itemdate__34___valid_importfeed_template_option/comment_1_9fa523d1eabb6e029a91413770e9af72._comment 1970-01-01 00:00:00.000000000 +0000 +++ git-annex-5.20140412ubuntu1/doc/todo/make___34__itemdate__34___valid_importfeed_template_option/comment_1_9fa523d1eabb6e029a91413770e9af72._comment 2014-04-11 22:12:28.000000000 +0000 @@ -0,0 +1,16 @@ +[[!comment format=mdwn + username="http://grossmeier.net/" + nickname="greg" + subject="Without knowing Haskell" + date="2014-04-06T04:55:31Z" + content=""" +Maybe this just requires adding: + + , fieldMaybe \"itemdate\" $ getFeedPubDate $ item i + +on line 214 in Command/ImportFeed.hs ?? + +It is supported by [Text.Feed.Query](http://hackage.haskell.org/package/feed-0.3.9.2/docs/Text-Feed-Query.html) + +I have no haskell dev env so I can't test this, but if my suggestion is true, I might set one up :) +"""]] diff -Nru git-annex-5.20140405/doc/todo/make___34__itemdate__34___valid_importfeed_template_option/comment_2_9090bb66713f48fbdd1e2a3f1292b7ba._comment git-annex-5.20140412ubuntu1/doc/todo/make___34__itemdate__34___valid_importfeed_template_option/comment_2_9090bb66713f48fbdd1e2a3f1292b7ba._comment --- git-annex-5.20140405/doc/todo/make___34__itemdate__34___valid_importfeed_template_option/comment_2_9090bb66713f48fbdd1e2a3f1292b7ba._comment 1970-01-01 00:00:00.000000000 +0000 +++ git-annex-5.20140412ubuntu1/doc/todo/make___34__itemdate__34___valid_importfeed_template_option/comment_2_9090bb66713f48fbdd1e2a3f1292b7ba._comment 2014-04-11 22:12:28.000000000 +0000 @@ -0,0 +1,8 @@ +[[!comment format=mdwn + username="http://joeyh.name/" + ip="209.250.56.244" + subject="comment 2" + date="2014-04-07T19:51:27Z" + content=""" +https://github.com/sof/feed/issues/6 +"""]] diff -Nru git-annex-5.20140405/doc/todo/make___34__itemdate__34___valid_importfeed_template_option.mdwn git-annex-5.20140412ubuntu1/doc/todo/make___34__itemdate__34___valid_importfeed_template_option.mdwn --- git-annex-5.20140405/doc/todo/make___34__itemdate__34___valid_importfeed_template_option.mdwn 1970-01-01 00:00:00.000000000 +0000 +++ git-annex-5.20140412ubuntu1/doc/todo/make___34__itemdate__34___valid_importfeed_template_option.mdwn 2014-04-11 22:12:28.000000000 +0000 @@ -0,0 +1,18 @@ +Some podcasts don't include a sortable date as the first thing in their episode title, which makes listening to them in order challenging if not impossible. + +The date the item was posted is part of the RSS standard, so we should parse that and provide a new importfeed template option "itemdate". + +(For the curious, I tried "itemid" thinking that might give me something close, but it doesn't. I used --template='${feedtitle}/${itemid}-${itemtitle}${extension}' and get: + + http___openmetalcast.com__p_1163-Open_Metalcast_Episode__93__Headless_Chicken.ogg + +or + + http___www.folkalley.com_music_podcasts__name_2013_08_21_alleycast_6_13.mp3-Alleycast___06.13.mp3 + +that "works" but is ugly :) + +Would love to be able to put a YYYYMMDD at the beginning and then the title. + +> [[done]]; itempubdate will use form YYYY-MM-DD (or the raw date string +> if the feed does not use a parsable form). --[[Joey]] diff -Nru git-annex-5.20140405/doc/todo/Recursive_addurl_simlar_to_wget_--recursive/comment_1_4ecd9ddba1b63b571555ec9bef18e2d8._comment git-annex-5.20140412ubuntu1/doc/todo/Recursive_addurl_simlar_to_wget_--recursive/comment_1_4ecd9ddba1b63b571555ec9bef18e2d8._comment --- git-annex-5.20140405/doc/todo/Recursive_addurl_simlar_to_wget_--recursive/comment_1_4ecd9ddba1b63b571555ec9bef18e2d8._comment 1970-01-01 00:00:00.000000000 +0000 +++ git-annex-5.20140412ubuntu1/doc/todo/Recursive_addurl_simlar_to_wget_--recursive/comment_1_4ecd9ddba1b63b571555ec9bef18e2d8._comment 2014-04-11 22:12:28.000000000 +0000 @@ -0,0 +1,8 @@ +[[!comment format=mdwn + username="http://joeyh.name/" + ip="209.250.56.244" + subject="comment 1" + date="2014-04-07T20:10:51Z" + content=""" +Recursively traversing websites is *hard*, so I would rather leave it out of git-annex. +"""]] diff -Nru git-annex-5.20140405/doc/todo/Time_Stamping_of_Events_in_Webapp.mdwn git-annex-5.20140412ubuntu1/doc/todo/Time_Stamping_of_Events_in_Webapp.mdwn --- git-annex-5.20140405/doc/todo/Time_Stamping_of_Events_in_Webapp.mdwn 1970-01-01 00:00:00.000000000 +0000 +++ git-annex-5.20140412ubuntu1/doc/todo/Time_Stamping_of_Events_in_Webapp.mdwn 2014-04-11 22:12:28.000000000 +0000 @@ -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. diff -Nru git-annex-5.20140405/doc/todo/Use_a_remote_as_a_sharing_site_for_files_with_obfuscated_URLs/comment_2_735afa6f87a93cdf333c17da32010620._comment git-annex-5.20140412ubuntu1/doc/todo/Use_a_remote_as_a_sharing_site_for_files_with_obfuscated_URLs/comment_2_735afa6f87a93cdf333c17da32010620._comment --- git-annex-5.20140405/doc/todo/Use_a_remote_as_a_sharing_site_for_files_with_obfuscated_URLs/comment_2_735afa6f87a93cdf333c17da32010620._comment 1970-01-01 00:00:00.000000000 +0000 +++ git-annex-5.20140412ubuntu1/doc/todo/Use_a_remote_as_a_sharing_site_for_files_with_obfuscated_URLs/comment_2_735afa6f87a93cdf333c17da32010620._comment 2014-04-11 22:12:28.000000000 +0000 @@ -0,0 +1,8 @@ +[[!comment format=mdwn + username="https://id.koumbit.net/anarcat" + ip="2001:1928:1:9::1" + subject="comment 2" + date="2014-04-07T04:35:39Z" + content=""" +i wonder if the assistant or the new daemon couldn't do this job as well... -- [[anarcat]] +"""]] diff -Nru git-annex-5.20140405/doc/todo/wishlist:_special_remote_Ubuntu_One/comment_2_17e948acb1e29793cf172cd6def4160b._comment git-annex-5.20140412ubuntu1/doc/todo/wishlist:_special_remote_Ubuntu_One/comment_2_17e948acb1e29793cf172cd6def4160b._comment --- git-annex-5.20140405/doc/todo/wishlist:_special_remote_Ubuntu_One/comment_2_17e948acb1e29793cf172cd6def4160b._comment 1970-01-01 00:00:00.000000000 +0000 +++ git-annex-5.20140412ubuntu1/doc/todo/wishlist:_special_remote_Ubuntu_One/comment_2_17e948acb1e29793cf172cd6def4160b._comment 2014-04-11 22:12:28.000000000 +0000 @@ -0,0 +1,8 @@ +[[!comment format=mdwn + username="madduck" + ip="2001:a60:f0fb:0:224:d7ff:fe04:c82c" + subject="Ubuntu One to be discontinued" + date="2014-04-07T05:11:52Z" + content=""" +Thanksfully, Canonical have stopped this silliness, Ubuntu One will be discontinued, so this todo can be marked \"wontfix\" and archived. +"""]] diff -Nru git-annex-5.20140405/doc/users/anarcat.mdwn git-annex-5.20140412ubuntu1/doc/users/anarcat.mdwn --- git-annex-5.20140405/doc/users/anarcat.mdwn 2014-01-24 14:23:06.000000000 +0000 +++ git-annex-5.20140412ubuntu1/doc/users/anarcat.mdwn 2014-04-11 22:12:28.000000000 +0000 @@ -9,7 +9,7 @@ ... or the ones I commented it, to be more precise. -[[!inline pages="tips/* and and link(users/anarcat) and !bugs/*/*" sort=mtime feeds=no actions=yes archive=yes show=0]] +[[!inline pages="tips/* and and link(users/anarcat)" sort=mtime feeds=no actions=yes archive=yes show=0]] My todos @@ -18,13 +18,13 @@ ... same. [[!inline pages="todo/* and !todo/done and !link(todo/done) and -link(users/anarcat) and !todo/*/*" sort=mtime feeds=no actions=yes archive=yes show=0]] +link(users/anarcat)" sort=mtime feeds=no actions=yes archive=yes show=0]] Done ---- [[!inline pages="todo/* and !todo/done and link(todo/done) and -link(users/anarcat) and !todo/*/*" feeds=no actions=yes archive=yes show=0]] +link(users/anarcat)" feeds=no actions=yes archive=yes show=0]] My bugs ======= @@ -32,13 +32,13 @@ ... same. [[!inline pages="bugs/* and !bugs/done and !link(bugs/done) and -link(users/anarcat) and !bugs/*/*" sort=mtime feeds=no actions=yes archive=yes show=0]] +link(users/anarcat)" sort=mtime feeds=no actions=yes archive=yes show=0]] Fixed ----- [[!inline pages="bugs/* and !bugs/done and link(bugs/done) and -link(users/anarcat) and !bugs/*/*" feeds=no actions=yes archive=yes show=0]] +link(users/anarcat)" feeds=no actions=yes archive=yes show=0]] Forum posts =========== diff -Nru git-annex-5.20140405/doc/walkthrough/backups/comment_1_d0244791d2abbf29553546a6a6568a0f._comment git-annex-5.20140412ubuntu1/doc/walkthrough/backups/comment_1_d0244791d2abbf29553546a6a6568a0f._comment --- git-annex-5.20140405/doc/walkthrough/backups/comment_1_d0244791d2abbf29553546a6a6568a0f._comment 1970-01-01 00:00:00.000000000 +0000 +++ git-annex-5.20140412ubuntu1/doc/walkthrough/backups/comment_1_d0244791d2abbf29553546a6a6568a0f._comment 2014-04-11 22:12:28.000000000 +0000 @@ -0,0 +1,10 @@ +[[!comment format=mdwn + username="madduck" + ip="2001:a60:f0fb:0:224:d7ff:fe04:c82c" + subject="Warn while inconsistent" + date="2014-04-06T20:44:17Z" + content=""" +Sure, git-annex prevents me from dropping files unless there are numcopies around elsewhere, but shouldn't it also ensure that numcopies cannot be set unless that requirement is already met? + +Furthermore, shouldn't it ensure that when new files are added, they are automatically distributed to fulfill the requirement? +"""]] diff -Nru git-annex-5.20140405/Git/Types.hs git-annex-5.20140412ubuntu1/Git/Types.hs --- git-annex-5.20140405/Git/Types.hs 2014-03-12 15:53:22.000000000 +0000 +++ git-annex-5.20140412ubuntu1/Git/Types.hs 2014-04-11 22:12:28.000000000 +0000 @@ -27,7 +27,7 @@ | LocalUnknown FilePath | Url URI | Unknown - deriving (Show, Eq) + deriving (Show, Eq, Ord) data Repo = Repo { location :: RepoLocation @@ -41,7 +41,7 @@ , gitEnv :: Maybe [(String, String)] -- global options to pass to git when running git commands , gitGlobalOpts :: [CommandParam] - } deriving (Show, Eq) + } deriving (Show, Eq, Ord) type RemoteName = String diff -Nru git-annex-5.20140405/git-annex.cabal git-annex-5.20140412ubuntu1/git-annex.cabal --- git-annex-5.20140405/git-annex.cabal 2014-04-05 22:05:28.000000000 +0000 +++ git-annex-5.20140412ubuntu1/git-annex.cabal 2014-04-14 09:40:56.000000000 +0000 @@ -1,5 +1,5 @@ Name: git-annex -Version: 5.20140405 +Version: 5.20140412 Cabal-Version: >= 1.8 License: GPL-3 Maintainer: Joey Hess @@ -191,7 +191,8 @@ yesod, yesod-default, yesod-static, yesod-form, yesod-core, http-types, transformers, wai, wai-logger, warp, warp-tls, blaze-builder, crypto-api, hamlet, clientsession, - template-haskell, data-default, aeson, network-conduit + template-haskell, data-default, aeson, network-conduit, + shakespeare CPP-Options: -DWITH_WEBAPP if flag(Webapp) && flag (Webapp-secure) Build-Depends: warp-tls (>= 1.4), securemem, byteable @@ -210,7 +211,7 @@ CPP-Options: -DWITH_DNS if flag(Feed) - Build-Depends: feed + Build-Depends: feed (>= 0.3.9.2) CPP-Options: -DWITH_FEED if flag(Quvi) diff -Nru git-annex-5.20140405/.gitignore git-annex-5.20140412ubuntu1/.gitignore --- git-annex-5.20140405/.gitignore 2014-02-20 22:50:50.000000000 +0000 +++ git-annex-5.20140412ubuntu1/.gitignore 2014-04-11 22:12:28.000000000 +0000 @@ -23,6 +23,9 @@ dist # Sandboxed builds cabal-dev +.cabal-sandbox +cabal.sandbox.config +cabal.config # Project-local emacs configuration .dir-locals.el # OSX related diff -Nru git-annex-5.20140405/Makefile git-annex-5.20140412ubuntu1/Makefile --- git-annex-5.20140405/Makefile 2014-04-02 22:46:31.000000000 +0000 +++ git-annex-5.20140412ubuntu1/Makefile 2014-04-11 22:12:28.000000000 +0000 @@ -140,7 +140,7 @@ 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)" diff -Nru git-annex-5.20140405/RemoteDaemon/Common.hs git-annex-5.20140412ubuntu1/RemoteDaemon/Common.hs --- git-annex-5.20140405/RemoteDaemon/Common.hs 1970-01-01 00:00:00.000000000 +0000 +++ git-annex-5.20140412ubuntu1/RemoteDaemon/Common.hs 2014-04-11 22:12:28.000000000 +0000 @@ -0,0 +1,42 @@ +{- git-remote-daemon utilities + - + - Copyright 2014 Joey Hess + - + - Licensed under the GNU GPL version 3 or higher. + -} + +module RemoteDaemon.Common + ( liftAnnex + , inLocalRepo + , checkNewShas + ) where + +import qualified Annex +import Common.Annex +import RemoteDaemon.Types +import qualified Git +import Annex.CatFile + +import Control.Concurrent + +-- Runs an Annex action. Long-running actions should be avoided, +-- since only one liftAnnex can be running at a time, amoung all +-- transports. +liftAnnex :: TransportHandle -> Annex a -> IO a +liftAnnex (TransportHandle _ annexstate) a = do + st <- takeMVar annexstate + (r, st') <- Annex.run st a + putMVar annexstate st' + return r + +inLocalRepo :: TransportHandle -> (Git.Repo -> IO a) -> IO a +inLocalRepo (TransportHandle g _) a = a g + +-- Check if any of the shas are actally new in the local git repo, +-- to avoid unnecessary fetching. +checkNewShas :: TransportHandle -> [Git.Sha] -> IO Bool +checkNewShas transporthandle = check + where + check [] = return True + check (r:rs) = maybe (check rs) (const $ return False) + =<< liftAnnex transporthandle (catObjectDetails r) diff -Nru git-annex-5.20140405/RemoteDaemon/Core.hs git-annex-5.20140412ubuntu1/RemoteDaemon/Core.hs --- git-annex-5.20140405/RemoteDaemon/Core.hs 1970-01-01 00:00:00.000000000 +0000 +++ git-annex-5.20140412ubuntu1/RemoteDaemon/Core.hs 2014-04-11 22:12:28.000000000 +0000 @@ -0,0 +1,118 @@ +{- git-remote-daemon core + - + - Copyright 2014 Joey Hess + - + - Licensed under the GNU GPL version 3 or higher. + -} + +module RemoteDaemon.Core (runForeground) where + +import qualified Annex +import Common +import Types.GitConfig +import RemoteDaemon.Common +import RemoteDaemon.Types +import RemoteDaemon.Transport +import qualified Git +import qualified Git.Types as Git +import qualified Git.CurrentRepo +import Utility.SimpleProtocol +import Config + +import Control.Concurrent.Async +import Control.Concurrent +import Network.URI +import qualified Data.Map as M + +runForeground :: IO () +runForeground = do + (readh, writeh) <- ioHandles + ichan <- newChan :: IO (Chan Consumed) + ochan <- newChan :: IO (Chan Emitted) + + let reader = forever $ do + l <- hGetLine readh + case parseMessage l of + Nothing -> error $ "protocol error: " ++ l + Just cmd -> writeChan ichan cmd + let writer = forever $ do + msg <- readChan ochan + hPutStrLn writeh $ unwords $ formatMessage msg + hFlush writeh + let controller = runController ichan ochan + + -- If any thread fails, the rest will be killed. + void $ tryIO $ + reader `concurrently` writer `concurrently` controller + +type RemoteMap = M.Map Git.Repo (IO (), Chan Consumed) + +-- Runs the transports, dispatching messages to them, and handling +-- the main control messages. +runController :: Chan Consumed -> Chan Emitted -> IO () +runController ichan ochan = do + h <- genTransportHandle + m <- genRemoteMap h ochan + startrunning m + go h False m + where + go h paused m = do + cmd <- readChan ichan + case cmd of + RELOAD -> do + liftAnnex h reloadConfig + m' <- genRemoteMap h ochan + let common = M.intersection m m' + let new = M.difference m' m + let old = M.difference m m' + stoprunning old + unless paused $ + startrunning new + go h paused (M.union common new) + PAUSE -> do + stoprunning m + go h True m + RESUME -> do + when paused $ + startrunning m + go h False m + STOP -> exitSuccess + -- All remaining messages are sent to + -- all Transports. + msg -> do + unless paused $ + forM_ chans (`writeChan` msg) + go h paused m + where + chans = map snd (M.elems m) + + startrunning m = forM_ (M.elems m) startrunning' + startrunning' (transport, _) = void $ async transport + + -- Ask the transport nicely to stop. + stoprunning m = forM_ (M.elems m) stoprunning' + stoprunning' (_, c) = writeChan c STOP + +-- Generates a map with a transport for each supported remote in the git repo, +-- except those that have annex.sync = false +genRemoteMap :: TransportHandle -> Chan Emitted -> IO RemoteMap +genRemoteMap h@(TransportHandle g _) ochan = + M.fromList . catMaybes <$> mapM gen (Git.remotes g) + where + gen r = case Git.location r of + Git.Url u -> case M.lookup (uriScheme u) remoteTransports of + Just transport + | remoteAnnexSync (extractRemoteGitConfig r (Git.repoDescribe r)) -> do + ichan <- newChan :: IO (Chan Consumed) + return $ Just + ( r + , (transport r (Git.repoDescribe r) h ichan ochan, ichan) + ) + _ -> return Nothing + _ -> return Nothing + +genTransportHandle :: IO TransportHandle +genTransportHandle = do + annexstate <- newMVar =<< Annex.new =<< Git.CurrentRepo.get + g <- Annex.repo <$> readMVar annexstate + return $ TransportHandle g annexstate diff -Nru git-annex-5.20140405/RemoteDaemon/EndPoint/GitAnnexShell/Types.hs git-annex-5.20140412ubuntu1/RemoteDaemon/EndPoint/GitAnnexShell/Types.hs --- git-annex-5.20140405/RemoteDaemon/EndPoint/GitAnnexShell/Types.hs 2014-04-05 22:05:28.000000000 +0000 +++ git-annex-5.20140412ubuntu1/RemoteDaemon/EndPoint/GitAnnexShell/Types.hs 1970-01-01 00:00:00.000000000 +0000 @@ -1,32 +0,0 @@ -{- git-remote-daemon, git-annex-shell endpoint, datatypes - - - - Copyright 2014 Joey Hess - - - - Licensed under the GNU GPL version 3 or higher. - -} - -{-# LANGUAGE TypeSynonymInstances, FlexibleInstances #-} -{-# OPTIONS_GHC -fno-warn-orphans #-} - -module RemoteDaemon.EndPoint.GitAnnexShell.Types ( - Notification(..), - Proto.serialize, - Proto.deserialize, - Proto.formatMessage, -) where - -import qualified Utility.SimpleProtocol as Proto -import RemoteDaemon.Types (ShaList) - -data Notification - = READY - | CHANGED ShaList - -instance Proto.Sendable Notification where - formatMessage READY = ["READY"] - formatMessage (CHANGED shas) = ["CHANGED", Proto.serialize shas] - -instance Proto.Receivable Notification where - parseCommand "READY" = Proto.parse0 READY - parseCommand "CHANGED" = Proto.parse1 CHANGED - parseCommand _ = Proto.parseFail diff -Nru git-annex-5.20140405/RemoteDaemon/Transport/Ssh/Types.hs git-annex-5.20140412ubuntu1/RemoteDaemon/Transport/Ssh/Types.hs --- git-annex-5.20140405/RemoteDaemon/Transport/Ssh/Types.hs 1970-01-01 00:00:00.000000000 +0000 +++ git-annex-5.20140412ubuntu1/RemoteDaemon/Transport/Ssh/Types.hs 2014-04-11 22:12:28.000000000 +0000 @@ -0,0 +1,32 @@ +{- git-remote-daemon, git-annex-shell notifychanges protocol types + - + - Copyright 2014 Joey Hess + - + - Licensed under the GNU GPL version 3 or higher. + -} + +{-# LANGUAGE TypeSynonymInstances, FlexibleInstances #-} +{-# OPTIONS_GHC -fno-warn-orphans #-} + +module RemoteDaemon.Transport.Ssh.Types ( + Notification(..), + Proto.serialize, + Proto.deserialize, + Proto.formatMessage, +) where + +import qualified Utility.SimpleProtocol as Proto +import RemoteDaemon.Types (RefList) + +data Notification + = READY + | CHANGED RefList + +instance Proto.Sendable Notification where + formatMessage READY = ["READY"] + formatMessage (CHANGED shas) = ["CHANGED", Proto.serialize shas] + +instance Proto.Receivable Notification where + parseCommand "READY" = Proto.parse0 READY + parseCommand "CHANGED" = Proto.parse1 CHANGED + parseCommand _ = Proto.parseFail diff -Nru git-annex-5.20140405/RemoteDaemon/Transport/Ssh.hs git-annex-5.20140412ubuntu1/RemoteDaemon/Transport/Ssh.hs --- git-annex-5.20140405/RemoteDaemon/Transport/Ssh.hs 1970-01-01 00:00:00.000000000 +0000 +++ git-annex-5.20140412ubuntu1/RemoteDaemon/Transport/Ssh.hs 2014-04-11 22:12:28.000000000 +0000 @@ -0,0 +1,72 @@ +{- git-remote-daemon, git-annex-shell over ssh transport + - + - Copyright 2014 Joey Hess + - + - Licensed under the GNU GPL version 3 or higher. + -} + +module RemoteDaemon.Transport.Ssh (transport) where + +import Common.Annex +import RemoteDaemon.Types +import RemoteDaemon.Common +import Remote.Helper.Ssh +import qualified RemoteDaemon.Transport.Ssh.Types as SshRemote +import Utility.SimpleProtocol +import Git.Command + +import Control.Concurrent.Chan +import Control.Concurrent.Async +import System.Process (std_in, std_out) + +transport :: Transport +transport r remotename transporthandle ichan ochan = do + v <- liftAnnex transporthandle $ git_annex_shell r "notifychanges" [] [] + case v of + Nothing -> noop + Just (cmd, params) -> go cmd (toCommand params) + where + go cmd params = do + (Just toh, Just fromh, _, pid) <- createProcess (proc cmd params) + { std_in = CreatePipe + , std_out = CreatePipe + } + + let shutdown = do + hClose toh + hClose fromh + void $ waitForProcess pid + send DISCONNECTED + + let fromshell = forever $ do + l <- hGetLine fromh + case parseMessage l of + Just SshRemote.READY -> send CONNECTED + Just (SshRemote.CHANGED shas) -> + whenM (checkNewShas transporthandle shas) $ + fetch + Nothing -> shutdown + + -- The only control message that matters is STOP. + -- + -- Note that a CHANGED control message is not handled; + -- we don't push to the ssh remote. The assistant + -- and git-annex sync both handle pushes, so there's no + -- need to do it here. + let handlecontrol = forever $ do + msg <- readChan ichan + case msg of + STOP -> ioError (userError "done") + _ -> noop + + -- Run both threads until one finishes. + void $ tryIO $ concurrently fromshell handlecontrol + shutdown + + send msg = writeChan ochan (msg remotename) + + fetch = do + send SYNCING + ok <- inLocalRepo transporthandle $ + runBool [Param "fetch", Param remotename] + send (DONESYNCING ok) diff -Nru git-annex-5.20140405/RemoteDaemon/Transport.hs git-annex-5.20140412ubuntu1/RemoteDaemon/Transport.hs --- git-annex-5.20140405/RemoteDaemon/Transport.hs 1970-01-01 00:00:00.000000000 +0000 +++ git-annex-5.20140412ubuntu1/RemoteDaemon/Transport.hs 2014-04-11 22:12:28.000000000 +0000 @@ -0,0 +1,21 @@ +{- git-remote-daemon transports + - + - Copyright 2014 Joey Hess + - + - Licensed under the GNU GPL version 3 or higher. + -} + +module RemoteDaemon.Transport where + +import RemoteDaemon.Types +import qualified RemoteDaemon.Transport.Ssh + +import qualified Data.Map as M + +-- Corresponds to uriScheme +type TransportScheme = String + +remoteTransports :: M.Map TransportScheme Transport +remoteTransports = M.fromList + [ ("ssh:", RemoteDaemon.Transport.Ssh.transport) + ] diff -Nru git-annex-5.20140405/RemoteDaemon/Types.hs git-annex-5.20140412ubuntu1/RemoteDaemon/Types.hs --- git-annex-5.20140405/RemoteDaemon/Types.hs 2014-04-05 22:05:28.000000000 +0000 +++ git-annex-5.20140412ubuntu1/RemoteDaemon/Types.hs 2014-04-11 22:12:28.000000000 +0000 @@ -10,74 +10,84 @@ module RemoteDaemon.Types where +import qualified Annex import qualified Git.Types as Git import qualified Utility.SimpleProtocol as Proto +import Control.Concurrent + +-- A Transport for a particular git remote consumes some messages +-- from a Chan, and emits others to another Chan. +type Transport = RemoteRepo -> RemoteName -> TransportHandle -> Chan Consumed -> Chan Emitted -> IO () + +type RemoteRepo = Git.Repo +type LocalRepo = Git.Repo + +-- All Transports share a single AnnexState MVar +data TransportHandle = TransportHandle LocalRepo (MVar Annex.AnnexState) + -- Messages that the daemon emits. data Emitted = CONNECTED RemoteName | DISCONNECTED RemoteName - | CHANGED RemoteName ShaList - | STATUS RemoteName UserMessage - | ERROR RemoteName UserMessage + | SYNCING RemoteName + | DONESYNCING Bool RemoteName -- Messages that the deamon consumes. data Consumed = PAUSE | RESUME - | PUSH RemoteName + | CHANGED RefList | RELOAD + | STOP type RemoteName = String -type UserMessage = String -type ShaList = [Git.Sha] +type RefList = [Git.Ref] instance Proto.Sendable Emitted where formatMessage (CONNECTED remote) = ["CONNECTED", Proto.serialize remote] formatMessage (DISCONNECTED remote) = ["DISCONNECTED", Proto.serialize remote] - formatMessage (CHANGED remote shas) = - ["CHANGED" - , Proto.serialize remote - , Proto.serialize shas - ] - formatMessage (STATUS remote msg) = - ["STATUS" - , Proto.serialize remote - , Proto.serialize msg - ] - formatMessage (ERROR remote msg) = - ["ERROR" - , Proto.serialize remote - , Proto.serialize msg - ] + formatMessage (SYNCING remote) = + ["SYNCING", Proto.serialize remote] + formatMessage (DONESYNCING status remote) = + ["DONESYNCING", Proto.serialize status, Proto.serialize remote] instance Proto.Sendable Consumed where formatMessage PAUSE = ["PAUSE"] formatMessage RESUME = ["RESUME"] - formatMessage (PUSH remote) = ["PUSH", Proto.serialize remote] + formatMessage (CHANGED refs) =["CHANGED", Proto.serialize refs] formatMessage RELOAD = ["RELOAD"] + formatMessage STOP = ["STOP"] instance Proto.Receivable Emitted where parseCommand "CONNECTED" = Proto.parse1 CONNECTED parseCommand "DISCONNECTED" = Proto.parse1 DISCONNECTED - parseCommand "CHANGED" = Proto.parse2 CHANGED - parseCommand "STATUS" = Proto.parse2 STATUS - parseCommand "ERROR" = Proto.parse2 ERROR + parseCommand "SYNCING" = Proto.parse1 SYNCING + parseCommand "DONESYNCING" = Proto.parse2 DONESYNCING parseCommand _ = Proto.parseFail instance Proto.Receivable Consumed where parseCommand "PAUSE" = Proto.parse0 PAUSE parseCommand "RESUME" = Proto.parse0 RESUME - parseCommand "PUSH" = Proto.parse1 PUSH + parseCommand "CHANGED" = Proto.parse1 CHANGED parseCommand "RELOAD" = Proto.parse0 RELOAD + parseCommand "STOP" = Proto.parse0 STOP parseCommand _ = Proto.parseFail instance Proto.Serializable [Char] where serialize = id deserialize = Just -instance Proto.Serializable ShaList where +instance Proto.Serializable RefList where serialize = unwords . map Git.fromRef deserialize = Just . map Git.Ref . words + +instance Proto.Serializable Bool where + serialize False = "0" + serialize True = "1" + + deserialize "0" = Just False + deserialize "1" = Just True + deserialize _ = Nothing diff -Nru git-annex-5.20140405/Utility/Rsync.hs git-annex-5.20140412ubuntu1/Utility/Rsync.hs --- git-annex-5.20140405/Utility/Rsync.hs 2014-01-24 14:23:06.000000000 +0000 +++ git-annex-5.20140412ubuntu1/Utility/Rsync.hs 2014-04-11 22:12:28.000000000 +0000 @@ -124,6 +124,9 @@ - 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 @@ 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 -Nru git-annex-5.20140405/Utility/Scheduled.hs git-annex-5.20140412ubuntu1/Utility/Scheduled.hs --- git-annex-5.20140405/Utility/Scheduled.hs 2013-11-10 16:52:32.000000000 +0000 +++ git-annex-5.20140412ubuntu1/Utility/Scheduled.hs 2014-04-11 22:12:28.000000000 +0000 @@ -10,7 +10,11 @@ Recurrance(..), ScheduledTime(..), NextTime(..), + WeekDay, + MonthDay, + YearDay, nextTime, + startTime, fromSchedule, fromScheduledTime, toScheduledTime, @@ -21,9 +25,13 @@ 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 @@ | 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 @@ -78,7 +86,7 @@ {- 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 @@ -100,65 +108,71 @@ window startd endd = NextTimeWindow (LocalTime startd nexttime) (LocalTime endd (TimeOfDay 23 59 0)) - findfrom r afterday day = 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 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 > mday old && mday day >= (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 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 diff -Nru git-annex-5.20140405/Utility/SimpleProtocol.hs git-annex-5.20140412ubuntu1/Utility/SimpleProtocol.hs --- git-annex-5.20140405/Utility/SimpleProtocol.hs 2014-04-05 22:05:28.000000000 +0000 +++ git-annex-5.20140412ubuntu1/Utility/SimpleProtocol.hs 2014-04-11 22:12:28.000000000 +0000 @@ -16,12 +16,13 @@ parse1, parse2, parse3, + ioHandles, ) where -import Control.Applicative import Data.Char +import GHC.IO.Handle -import Utility.Misc +import Common -- Messages that can be sent. class Sendable m where @@ -73,3 +74,17 @@ splitWord :: String -> (String, String) splitWord = separate isSpace + +{- When a program speaks a simple protocol over stdio, any other output + - to stdout (or anything that attempts to read from stdin) + - will mess up the protocol. To avoid that, close stdin, and + - and duplicate stderr to stdout. Return two new handles + - that are duplicates of the original (stdin, stdout). -} +ioHandles :: IO (Handle, Handle) +ioHandles = do + readh <- hDuplicate stdin + writeh <- hDuplicate stdout + nullh <- openFile devNull ReadMode + nullh `hDuplicateTo` stdin + stderr `hDuplicateTo` stdout + return (readh, writeh)