diff options
author | 2012-12-28 16:42:11 -0400 | |
---|---|---|
committer | 2012-12-28 16:42:11 -0400 | |
commit | 5c9891e1d139fb750ae5efe1ed2c8e5b2044287f (patch) | |
tree | a6c7d608f4e76059cf9ddcabfffd50c03d8a09cf | |
parent | 92f57da495b25b4d42ed8e2efa3fc09c89b460b0 (diff) |
OSX assistant: Uses direct mode by default when setting up a new local repository.
-rw-r--r-- | Assistant/Threads/Committer.hs | 20 | ||||
-rw-r--r-- | debian/changelog | 5 | ||||
-rw-r--r-- | doc/bugs/OSX_alias_permissions_and_versions_problem.mdwn | 4 | ||||
-rw-r--r-- | doc/bugs/pasting_into_annex_on_OSX.mdwn | 5 | ||||
-rw-r--r-- | doc/git-annex.mdwn | 4 |
5 files changed, 25 insertions, 13 deletions
diff --git a/Assistant/Threads/Committer.hs b/Assistant/Threads/Committer.hs index 4d623eb0a..e968959c6 100644 --- a/Assistant/Threads/Committer.hs +++ b/Assistant/Threads/Committer.hs @@ -41,9 +41,9 @@ import Data.Either {- This thread makes git commits at appropriate times. -} commitThread :: NamedThread commitThread = NamedThread "Committer" $ do - delayadd <- liftAnnex $ - maybe delayaddDefault (Just . Seconds) . readish - <$> getConfig (annexConfig "delayadd") "" + delayadd <- liftAnnex $ do + v <- readish <$> getConfig (annexConfig "delayadd") "" + maybe delayaddDefault (return . Just . Seconds) v runEvery (Seconds 1) <~> do -- We already waited one second as a simple rate limiter. -- Next, wait until at least one change is available for @@ -115,13 +115,17 @@ shouldCommit now changes thisSecond c = now `diffUTCTime` changeTime c <= 1 {- OSX needs a short delay after a file is added before locking it down, - - as pasting a file seems to try to set file permissions or otherwise - - access the file after closing it. -} -delayaddDefault :: Maybe Seconds + - when using a non-direct mode repository, as pasting a file seems to + - try to set file permissions or otherwise access the file after closing + - it. -} +delayaddDefault :: Annex (Maybe Seconds) #ifdef darwin_HOST_OS -delayaddDefault = Just $ Seconds 1 +delayaddDefault = ifM isDirect + ( return Nothing + , return $ Just $ Seconds 1 + ) #else -delayaddDefault = Nothing +delayaddDefault = return Nothing #endif {- If there are PendingAddChanges, or InProcessAddChanges, the files diff --git a/debian/changelog b/debian/changelog index fd5444ec6..ef1c7ee34 100644 --- a/debian/changelog +++ b/debian/changelog @@ -11,6 +11,8 @@ git-annex (3.20121212) UNRELEASED; urgency=low as well as allowing detection of modification of files in direct mode. BSD systems still use kqueue, and cannot detect modifications of existing files in direct mode. + * OSX assistant: Uses direct mode by default when setting up a new + local repository. * kqueue: Fix bug that made broken symlinks not be noticed. * vicfg: Quote filename. Closes: #696193 * Bugfix: Fixed bug parsing transfer info files, where the newline after @@ -23,9 +25,6 @@ git-annex (3.20121212) UNRELEASED; urgency=low * SHA*E backends: Exclude non-alphanumeric characters from extensions. * migrate: Remove leading \ in SHA* checksums, and non-alphanumerics from extensions of SHA*E keys. - - -- Joey Hess <joeyh@debian.org> Thu, 13 Dec 2012 14:06:43 -0400 - -- Joey Hess <joeyh@debian.org> Thu, 13 Dec 2012 14:06:43 -0400 diff --git a/doc/bugs/OSX_alias_permissions_and_versions_problem.mdwn b/doc/bugs/OSX_alias_permissions_and_versions_problem.mdwn index 2c92ea3fb..f4ebc9d1e 100644 --- a/doc/bugs/OSX_alias_permissions_and_versions_problem.mdwn +++ b/doc/bugs/OSX_alias_permissions_and_versions_problem.mdwn @@ -31,3 +31,7 @@ The sync should be transparent but it's not, and it's error prone. It would even Dropbox even allows to put a symlink in the dropbox directory, and it will sync the file. [[!tag /design/assistant/OSX]] + +> Now the assistant creates new repositories using direct mode on OSX. +> In direct mode, there is no locking of files; they can be modified +> directly. [[done]] --[[Joey]] diff --git a/doc/bugs/pasting_into_annex_on_OSX.mdwn b/doc/bugs/pasting_into_annex_on_OSX.mdwn index 57ad9d3e0..4ea4851af 100644 --- a/doc/bugs/pasting_into_annex_on_OSX.mdwn +++ b/doc/bugs/pasting_into_annex_on_OSX.mdwn @@ -20,4 +20,9 @@ Please provide any additional information below. >> Reopening since I've heard from someone else that it can still happen. >> --[[Joey]] +>>> Closing again, since the assistant now makes new repositories on OSX +>>> using direct mode, which should avoid this problem. NB: any existing +>>> repositories you have on OSX should be switched to use direct mode by +>>> manually running `git annex direct` in them. [[done]] --[[Joey]] + [[!tag /design/assistant/OSX]] diff --git a/doc/git-annex.mdwn b/doc/git-annex.mdwn index 4b4109820..169c234c1 100644 --- a/doc/git-annex.mdwn +++ b/doc/git-annex.mdwn @@ -788,8 +788,8 @@ Here are all the supported configuration settings. Makes the watch and assistant commands delay for the specified number of seconds before adding a newly created file to the annex. Normally this is not needed, because they already wait for all writers of the file - to close it. On Mac OSX, this defaults to 1 second, to work around - a bad interaction with software there. + to close it. On Mac OSX, when not using direct mode this defaults to + 1 second, to work around a bad interaction with software there. * `annex.direct` |