direct mode by default in repositories created by assistant

This commit is contained in:
Joey Hess 2013-01-01 14:01:47 -04:00
parent 4008590c68
commit 47994ce5cd
5 changed files with 32 additions and 10 deletions

View file

@ -29,6 +29,7 @@ import Annex.UUID
import Types.StandardGroups import Types.StandardGroups
import Logs.PreferredContent import Logs.PreferredContent
import Utility.UserInfo import Utility.UserInfo
import Config
import qualified Data.Text as T import qualified Data.Text as T
import Data.Char import Data.Char
@ -285,12 +286,8 @@ initRepo primary_assistant_repo dir desc = inDir dir $ do
, Param "-m" , Param "-m"
, Param "created repository" , Param "created repository"
] ]
#ifdef darwin_HOST_OS
{- Use direct mode repositories by default on OSX, because
- this avoids some problems with the Finder. -}
when primary_assistant_repo $ when primary_assistant_repo $
setDirect True setDirect True
#endif
getUUID getUUID
{- Adds a directory to the autostart file. -} {- Adds a directory to the autostart file. -}

5
debian/changelog vendored
View file

@ -5,14 +5,13 @@ git-annex (3.20121212) UNRELEASED; urgency=low
via symlinks. Note that direct mode is currently experimental. Many via symlinks. Note that direct mode is currently experimental. Many
git-annex commands do not work in direct mode. Some git commands can git-annex commands do not work in direct mode. Some git commands can
cause data loss when used in direct mode repositories. cause data loss when used in direct mode repositories.
* assistant: Support direct mode. * assistant: Now uses direct mode by default when setting up a new
local repository.
* OSX assistant: Now uses the FSEvents API to detect file changes. * OSX assistant: Now uses the FSEvents API to detect file changes.
This avoids issues with running out of file descriptors on large trees, This avoids issues with running out of file descriptors on large trees,
as well as allowing detection of modification of files in direct mode. as well as allowing detection of modification of files in direct mode.
BSD systems still use kqueue, and cannot detect modifications of existing BSD systems still use kqueue, and cannot detect modifications of existing
files in direct mode. 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. * kqueue: Fix bug that made broken symlinks not be noticed.
* vicfg: Quote filename. Closes: #696193 * vicfg: Quote filename. Closes: #696193
* Bugfix: Fixed bug parsing transfer info files, where the newline after * Bugfix: Fixed bug parsing transfer info files, where the newline after

View file

@ -1,3 +1,28 @@
## version 3.20130102
This release makes several significant improvements to the git-annex
assistant, which is still in beta.
The main improvement is direct mode. This allows you to directly edit files
in the repository, and the assistant will automatically commit and sync
your changes. Direct mode is the default for new repositories created
by the assistant. To convert your existing repository to use direct mode,
manually run `git annex direct` inside the repository.
The following are known limitations of this release of the git-annex
assistant:
* If a file in a direct mode repository is modified as it's being transferred,
the old version of the file can be lost, and fsck will later complain
about a corrupt object.
* On BSD operating systems (but not on OS X), the assistant uses kqueue to
watch files. Kqueue has to open every directory it watches, so too many
directories will run it out of the max number of open files (typically
1024), and fail. See [[this_bug|bugs/Issue_on_OSX_with_some_system_limits]]
for a workaround.
* Also on systems with kqueue, modifications to existing files in direct
mode will not be noticed.
## version 3.20121211 ## version 3.20121211
This release of the git-annex assistant (which is still in beta) This release of the git-annex assistant (which is still in beta)

View file

@ -10,10 +10,10 @@ and use cases to add. Feel free to chip in with comments! --[[Joey]]
* Month 3 "easy setup": [[!traillink configurators]] [[!traillink pairing]] * Month 3 "easy setup": [[!traillink configurators]] [[!traillink pairing]]
* Month 4 "cloud": [[!traillink cloud]] [[!traillink transfer_control]] * Month 4 "cloud": [[!traillink cloud]] [[!traillink transfer_control]]
* Month 5 "cloud continued": [[!traillink xmpp]] [[!traillink more_cloud_providers]] * Month 5 "cloud continued": [[!traillink xmpp]] [[!traillink more_cloud_providers]]
* Month 6 "9k bonus round": [[!traillink desymlink]]
We are, approximately, here: We are, approximately, here:
* Month 6 "9k bonus round": [[!traillink desymlink]]
* Month 7: user-driven features and polishing; * Month 7: user-driven features and polishing;
[presentation at LCA2013](https://lca2013.linux.org.au/schedule/30059/view_talk) [presentation at LCA2013](https://lca2013.linux.org.au/schedule/30059/view_talk)
* Month 8: [[!traillink Android]] * Month 8: [[!traillink Android]]

View file

@ -1,13 +1,14 @@
Normally, git-annex repositories consist of symlinks that are checked into Normally, git-annex repositories consist of symlinks that are checked into
git, and in turn point at the content of large files that is stored in git, and in turn point at the content of large files that is stored in
`.git/annex/objects/`. Direct mode is an experimental mode that gets rid of `.git/annex/objects/`. Direct mode gets rid of the symlinks.
the symlinks.
The advantage of direct mode is that you can access files directly, The advantage of direct mode is that you can access files directly,
including modifying them. The disadvantage is that most regular git including modifying them. The disadvantage is that most regular git
commands cannot safely be used, and only a subset of git-annex commands commands cannot safely be used, and only a subset of git-annex commands
can be used. can be used.
Repositories created by the [[assistant]] use direct mode by default.
## enabling (and disabling) direct mode ## enabling (and disabling) direct mode
Any repository can be converted to use direct mode at any time, and if you Any repository can be converted to use direct mode at any time, and if you