From 88107724d7dcf564322660a0cb77e7d1e5ffee70 Mon Sep 17 00:00:00 2001 From: "https://www.google.com/accounts/o8/id?id=AItOawlu7K3h7Ry1uDAU_ERYGuqt0LoGNJqGuRo" Date: Mon, 4 Jun 2012 21:01:52 +0000 Subject: Added a comment --- .../comment_2_b5faccf132fb47e3cda778a6600fd9ef._comment | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 doc/forum/Automatic___96__git_annex_get__96___after_invalidation_of_local_files_due_to_external_modification__63__/comment_2_b5faccf132fb47e3cda778a6600fd9ef._comment diff --git a/doc/forum/Automatic___96__git_annex_get__96___after_invalidation_of_local_files_due_to_external_modification__63__/comment_2_b5faccf132fb47e3cda778a6600fd9ef._comment b/doc/forum/Automatic___96__git_annex_get__96___after_invalidation_of_local_files_due_to_external_modification__63__/comment_2_b5faccf132fb47e3cda778a6600fd9ef._comment new file mode 100644 index 000000000..2cd1001ef --- /dev/null +++ b/doc/forum/Automatic___96__git_annex_get__96___after_invalidation_of_local_files_due_to_external_modification__63__/comment_2_b5faccf132fb47e3cda778a6600fd9ef._comment @@ -0,0 +1,8 @@ +[[!comment format=mdwn + username="https://www.google.com/accounts/o8/id?id=AItOawlu7K3h7Ry1uDAU_ERYGuqt0LoGNJqGuRo" + nickname="Nathan" + subject="comment 2" + date="2012-06-04T21:01:52Z" + content=""" +Joey, that sounds reasonable; I'll try it. Thanks! +"""]] -- cgit v1.2.3 From b51520b0d5cd13ce43421b0d156a8e889ba27900 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 4 Jun 2012 18:12:25 -0400 Subject: update --- doc/design/assistant/inotify.mdwn | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/doc/design/assistant/inotify.mdwn b/doc/design/assistant/inotify.mdwn index fe4c26d41..82867f104 100644 --- a/doc/design/assistant/inotify.mdwn +++ b/doc/design/assistant/inotify.mdwn @@ -8,7 +8,7 @@ really useful, it needs to: - on startup, fix the symlinks for any renamed links **done** - on startup, stage any files that have been deleted since last run (seems to require a `git commit -a` on startup, or at least a - `git add --update`, which will notice deleted files) + `git add --update`, which will notice deleted files) **done** - notice new files, and git annex add **done** - notice renamed files, auto-fix the symlink, and stage the new file location **done** @@ -18,6 +18,7 @@ really useful, it needs to: contents from the index **done** - notice deleted files and stage the deletion (tricky; there's a race with add since it replaces the file with a symlink..) + **done** - periodically auto-commit staged changes (avoid autocommitting when lots of changes are coming in) - tunable delays before adding new files, etc @@ -32,9 +33,6 @@ really useful, it needs to: unannex its contents. - Gracefully handle when the default limit of 8192 inotified directories is exceeded. This can be tuned by root, so help the user fix it. - -Also to do: - - Support OSes other than Linux; it only uses inotify currently. OSX and FreeBSD use the same mechanism, and there is a Haskell interface for it, -- cgit v1.2.3 From b1619fbd0b41caddf6caf216c10440b3f62f0a0a Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 4 Jun 2012 19:04:55 -0400 Subject: header --- doc/design/assistant/blog.mdwn | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/design/assistant/blog.mdwn b/doc/design/assistant/blog.mdwn index f099e48be..ca9ba5919 100644 --- a/doc/design/assistant/blog.mdwn +++ b/doc/design/assistant/blog.mdwn @@ -1 +1,5 @@ +The git-annex assistant is being +[crowd funded on Kickstarter](http://www.kickstarter.com/projects/joeyh/git-annex-assistant-like-dropbox-but-with-your-own/). +I'll be blogging about my progress here on a semi-daily basis. + [[!inline pages="page(design/assistant/blog/*)" show=30]] -- cgit v1.2.3 From b86825e42b227c3645fe93c123c38010115b2b5a Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 4 Jun 2012 21:29:26 -0400 Subject: update --- doc/design/assistant/inotify.mdwn | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/design/assistant/inotify.mdwn b/doc/design/assistant/inotify.mdwn index 82867f104..6692b7d94 100644 --- a/doc/design/assistant/inotify.mdwn +++ b/doc/design/assistant/inotify.mdwn @@ -22,6 +22,9 @@ really useful, it needs to: - periodically auto-commit staged changes (avoid autocommitting when lots of changes are coming in) - tunable delays before adding new files, etc +- Coleasce related add/rm events. See commit + cbdaccd44aa8f0ca30afba23fc06dd244c242075 for some details of the problems + with doing this. - don't annex `.gitignore` and `.gitattributes` files, but do auto-stage changes to them - configurable option to only annex files meeting certian size or -- cgit v1.2.3 From 13118136c07a621ecd1272de3103207ed55b1da7 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 4 Jun 2012 21:52:36 -0400 Subject: Preserve parent environment when running hooks of the hook special remote. --- Remote/Hook.hs | 17 +++++++++++------ debian/changelog | 1 + 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/Remote/Hook.hs b/Remote/Hook.hs index dcac9da88..1202c6087 100644 --- a/Remote/Hook.hs +++ b/Remote/Hook.hs @@ -10,6 +10,7 @@ module Remote.Hook (remote) where import qualified Data.ByteString.Lazy.Char8 as L import qualified Data.Map as M import System.Exit +import System.Environment import Common.Annex import Types.Remote @@ -59,9 +60,12 @@ hookSetup u c = do gitConfigSpecialRemote u c' "hooktype" hooktype return c' -hookEnv :: Key -> Maybe FilePath -> Maybe [(String, String)] -hookEnv k f = Just $ fileenv f ++ keyenv +hookEnv :: Key -> Maybe FilePath -> IO (Maybe [(String, String)]) +hookEnv k f = Just <$> mergeenv (fileenv f ++ keyenv) where + mergeenv l = M.toList . + M.union (M.fromList l) + <$> M.fromList <$> getEnvironment env s v = ("ANNEX_" ++ s, v) keyenv = [ env "KEY" (show k) @@ -88,8 +92,9 @@ runHook hooktype hook k f a = maybe (return False) run =<< lookupHook hooktype h where run command = do showOutput -- make way for hook output - ifM (liftIO $ boolSystemEnv - "sh" [Param "-c", Param command] $ hookEnv k f) + ifM (liftIO $ + boolSystemEnv "sh" [Param "-c", Param command] + =<< hookEnv k f) ( a , do warning $ hook ++ " hook exited nonzero!" @@ -129,14 +134,14 @@ checkPresent r h k = do liftIO $ catchMsgIO $ check v where findkey s = show k `elem` lines s - env = hookEnv k Nothing check Nothing = error "checkpresent hook misconfigured" check (Just hook) = do (frompipe, topipe) <- createPipe pid <- forkProcess $ do _ <- dupTo topipe stdOutput closeFd frompipe - executeFile "sh" True ["-c", hook] env + executeFile "sh" True ["-c", hook] + =<< hookEnv k Nothing closeFd topipe fromh <- fdToHandle frompipe reply <- hGetContentsStrict fromh diff --git a/debian/changelog b/debian/changelog index 52f6c3b97..fa57391a8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,6 +8,7 @@ git-annex (3.20120523) UNRELEASED; urgency=low unsupported backend. * Require that the SHA256 backend can be used when building, since it's the default. + * Preserve parent environment when running hooks of the hook special remote. -- Joey Hess Sun, 27 May 2012 20:55:29 -0400 -- cgit v1.2.3 From a71b09a4fe9146b60adacbf52f6b9db3fba88f01 Mon Sep 17 00:00:00 2001 From: "https://www.google.com/accounts/o8/id?id=AItOawkSq2FDpK2n66QRUxtqqdbyDuwgbQmUWus" Date: Tue, 5 Jun 2012 14:07:27 +0000 Subject: Added a comment --- ...ment_2_8765b6190e79251637bb59ba28f245c1._comment | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 doc/bugs/subtle_build_issue_on_OSX_10.7_and_Haskell_Platform___40__if_you_have_the_32bit_version_installed__41__/comment_2_8765b6190e79251637bb59ba28f245c1._comment diff --git a/doc/bugs/subtle_build_issue_on_OSX_10.7_and_Haskell_Platform___40__if_you_have_the_32bit_version_installed__41__/comment_2_8765b6190e79251637bb59ba28f245c1._comment b/doc/bugs/subtle_build_issue_on_OSX_10.7_and_Haskell_Platform___40__if_you_have_the_32bit_version_installed__41__/comment_2_8765b6190e79251637bb59ba28f245c1._comment new file mode 100644 index 000000000..cad802a88 --- /dev/null +++ b/doc/bugs/subtle_build_issue_on_OSX_10.7_and_Haskell_Platform___40__if_you_have_the_32bit_version_installed__41__/comment_2_8765b6190e79251637bb59ba28f245c1._comment @@ -0,0 +1,21 @@ +[[!comment format=mdwn + username="https://www.google.com/accounts/o8/id?id=AItOawkSq2FDpK2n66QRUxtqqdbyDuwgbQmUWus" + nickname="Jimmy" + subject="comment 2" + date="2012-06-05T14:07:26Z" + content=""" +FYI, (the follow is on OSX 10.7 on two different machines) + +On my 64bit install of haskell platform... + + laplace:~ jtang$ ghc -e 'print System.Info.arch' + \"x86_64\" + +On my 32bit install of haskell platform... + + x00:git-annex jtang$ ghc -e 'print System.Info.arch' + \"i386\" + +Running _cabal build_ or _cabal install git-annex_ as you suggest with the 32bit install does do the right thing. + +"""]] -- cgit v1.2.3 From 8511957c68942e92b7574b5598e8ad183c59a19b Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 5 Jun 2012 14:14:45 -0400 Subject: releasing version 3.20120605 --- debian/changelog | 4 ++-- git-annex.cabal | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index fa57391a8..fd4f7b98b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -git-annex (3.20120523) UNRELEASED; urgency=low +git-annex (3.20120605) unstable; urgency=low * sync: Show a nicer message if a user tries to sync to a special remote. * lock: Reset unlocked file to index, rather than to branch head. @@ -10,7 +10,7 @@ git-annex (3.20120523) UNRELEASED; urgency=low default. * Preserve parent environment when running hooks of the hook special remote. - -- Joey Hess Sun, 27 May 2012 20:55:29 -0400 + -- Joey Hess Tue, 05 Jun 2012 14:03:39 -0400 git-annex (3.20120522) unstable; urgency=low diff --git a/git-annex.cabal b/git-annex.cabal index e12cbb177..c15167831 100644 --- a/git-annex.cabal +++ b/git-annex.cabal @@ -1,5 +1,5 @@ Name: git-annex -Version: 3.20120522 +Version: 3.20120605 Cabal-Version: >= 1.8 License: GPL Maintainer: Joey Hess -- cgit v1.2.3 From 1ab7b2b8eaa1de567e20c36edf10affdd7f6ac8d Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 5 Jun 2012 14:15:00 -0400 Subject: add news item for git-annex 3.20120605 --- doc/news/version_3.20120406.mdwn | 4 ---- doc/news/version_3.20120605.mdwn | 11 +++++++++++ 2 files changed, 11 insertions(+), 4 deletions(-) delete mode 100644 doc/news/version_3.20120406.mdwn create mode 100644 doc/news/version_3.20120605.mdwn diff --git a/doc/news/version_3.20120406.mdwn b/doc/news/version_3.20120406.mdwn deleted file mode 100644 index b3df304e2..000000000 --- a/doc/news/version_3.20120406.mdwn +++ /dev/null @@ -1,4 +0,0 @@ -git-annex 3.20120406 released with [[!toggle text="these changes"]] -[[!toggleable text=""" - * Disable diskfree on kfreebsd, as I have a build failure on kfreebsd-i386 - that is quite likely caused by it."""]] \ No newline at end of file diff --git a/doc/news/version_3.20120605.mdwn b/doc/news/version_3.20120605.mdwn new file mode 100644 index 000000000..ed0a09177 --- /dev/null +++ b/doc/news/version_3.20120605.mdwn @@ -0,0 +1,11 @@ +git-annex 3.20120605 released with [[!toggle text="these changes"]] +[[!toggleable text=""" + * sync: Show a nicer message if a user tries to sync to a special remote. + * lock: Reset unlocked file to index, rather than to branch head. + * import: New subcommand, pulls files from a directory outside the annex + and adds them. + * Fix display of warning message when encountering a file that uses an + unsupported backend. + * Require that the SHA256 backend can be used when building, since it's the + default. + * Preserve parent environment when running hooks of the hook special remote."""]] \ No newline at end of file -- cgit v1.2.3 From e771c645595fb6cedf0f0c5f2af393712013deb2 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 5 Jun 2012 14:53:30 -0400 Subject: races --- doc/design/assistant/inotify.mdwn | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/doc/design/assistant/inotify.mdwn b/doc/design/assistant/inotify.mdwn index 6692b7d94..938aa2355 100644 --- a/doc/design/assistant/inotify.mdwn +++ b/doc/design/assistant/inotify.mdwn @@ -39,3 +39,34 @@ really useful, it needs to: - Support OSes other than Linux; it only uses inotify currently. OSX and FreeBSD use the same mechanism, and there is a Haskell interface for it, + +## the races + +Many races need to be dealt with by this code. Here are some of them. + +* File is added and then removed before the annex add finishes. + + Currently unfixed; The annex add re-adds the file as a symlink and then + the remove event does nothing since the file exists. + +* File is added and then replaced with another file before the annex add + makes its symlink. + + Currently unfixed; The annex add will fail creating its symlink since + the file exists. The second add event will add the new file. + +* File is added and then replaced with another file before the annex add + moves its content into the annex. + + Currently unfixed; The new content will be moved to the annex under the + old checksum, and fsck will later catch this inconsistency. + +* File is removed and then re-added before the removal event finishes. + + Not a problem; The removal event removes the old file from the index, and + the add event adds the new one. + +* File is removed and then re-added before the removal event starts. + + Not a problem; The removal event does nothing since the file exists, + and the add event replaces it in git with the new one. -- cgit v1.2.3