summaryrefslogtreecommitdiff
path: root/GitAnnex.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-04-12 17:29:43 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-04-12 17:42:05 -0400
commitd5ffd2d99d0da587e55b31994dae658c2bb6d9d9 (patch)
tree1f43e3f64d7765296c646e4f9e0158eb6ee14d72 /GitAnnex.hs
parent6464a576cd0c4063fb6cedf32a5dca224db3de6d (diff)
watch subcommand
So far this only handles auto-annexing new files that are created inside the repository while it's running. To make this really useful, it needs to at least: - notice deleted files and stage the deletion (tricky; there's a race with add..) - notice renamed files, auto-fix the symlink, and stage the new file location - periodically auto-commit staged changes - honor .gitignore, not adding files it excludes Also nice to have would be: - Somehow sync remotes, possibly using a push sync like dvcs-autosync does, so they are immediately updated. - Somehow get content that is unavilable. This is problimatic with inotify, since we only get an event once the user has tried (and failed) to read from the file. Perhaps instead, automatically copy content that is added out to remotes, with the goal of all repos eventually getting a copy, if df allows. - Drop files that have not been used lately, or meet some other criteria (as long as there's a copy elsewhere). - Perhaps automatically dropunused files that have been deleted, although I cannot see a way to do that, since by the time the inotify deletion event arrives, the file is deleted, and we cannot see what its symlink pointed to! Alternatievely, perhaps automatically do an expensive unused/dropunused cleanup process. Some of this probably needs the currently stateless threads to maintain a common state.
Diffstat (limited to 'GitAnnex.hs')
-rw-r--r--GitAnnex.hs2
1 files changed, 2 insertions, 0 deletions
diff --git a/GitAnnex.hs b/GitAnnex.hs
index 52886c308..5caa93499 100644
--- a/GitAnnex.hs
+++ b/GitAnnex.hs
@@ -56,6 +56,7 @@ import qualified Command.AddUrl
import qualified Command.Map
import qualified Command.Upgrade
import qualified Command.Version
+import qualified Command.Watch
cmds :: [Command]
cmds = concat
@@ -95,6 +96,7 @@ cmds = concat
, Command.Map.def
, Command.Upgrade.def
, Command.Version.def
+ , Command.Watch.def
]
options :: [Option]