diff --git a/Assistant/Ssh.hs b/Assistant/Ssh.hs
--- a/Assistant/Ssh.hs
+++ b/Assistant/Ssh.hs
@@ -124,7 +124,7 @@
 removeAuthorizedKeys rsynconly dir pubkey = do
 	let keyline = authorizedKeysLine rsynconly dir pubkey
 	sshdir <- sshDir
-	let keyfile = sshdir </> ".authorized_keys"
+	let keyfile = sshdir </> "authorized_keys"
 	ls <- lines <$> readFileStrict keyfile
 	writeFile keyfile $ unlines $ filter (/= keyline) ls
 
diff --git a/Assistant/Threads/WebApp.hs b/Assistant/Threads/WebApp.hs
--- a/Assistant/Threads/WebApp.hs
+++ b/Assistant/Threads/WebApp.hs
@@ -25,11 +25,12 @@
 import Assistant.WebApp.Configurators.WebDAV
 import Assistant.WebApp.Configurators.XMPP
 import Assistant.WebApp.Documentation
+import Assistant.WebApp.Control
 import Assistant.WebApp.OtherRepos
 import Assistant.Types.ThreadedMonad
 import Utility.WebApp
-import Utility.FileMode
 import Utility.TempFile
+import Utility.FileMode
 import Git
 
 import Yesod
@@ -83,35 +84,9 @@
 				=<< runThreadState (threadState assistantdata) (fromRepo repoPath))
 	go port webapp htmlshim urlfile = do
 		let url = myUrl webapp port
-		maybe noop (`writeFile` url) urlfile
-		writeHtmlShim url htmlshim
+		maybe noop (`writeFileProtected` url) urlfile
+		writeHtmlShim "Starting webapp..." url htmlshim
 		maybe noop (\a -> a url htmlshim) onstartup
-
-{- Creates a html shim file that's used to redirect into the webapp,
- - to avoid exposing the secretToken when launching the web browser. -}
-writeHtmlShim :: String -> FilePath -> IO ()
-writeHtmlShim url file = viaTmp go file $ genHtmlShim url
-  where
-	go tmpfile content = do
-		h <- openFile tmpfile WriteMode
-		modifyFileMode tmpfile $ removeModes [groupReadMode, otherReadMode]
-		hPutStr h content
-		hClose h
-
-{- TODO: generate this static file using Yesod. -}
-genHtmlShim :: String -> String
-genHtmlShim url = unlines
-	[ "<html>"
-	, "<head>"
-	, "<title>Starting webapp...</title>"
-	, "<meta http-equiv=\"refresh\" content=\"0; URL="++url++"\">"
-	, "<body>"
-	, "<p>"
-	, "<a href=\"" ++ url ++ "\">Starting webapp...</a>"
-	, "</p>"
-	, "</body>"
-	, "</html>"
-	]
 
 myUrl :: WebApp -> PortNumber -> Url
 myUrl webapp port = unpack $ yesodRender webapp urlbase HomeR []
diff --git a/Assistant/WebApp.hs b/Assistant/WebApp.hs
--- a/Assistant/WebApp.hs
+++ b/Assistant/WebApp.hs
@@ -13,7 +13,6 @@
 import Assistant.Common
 import Utility.NotificationBroadcaster
 import Utility.Yesod
-import Locations.UserConfig
 
 import Yesod
 import Data.Text (Text)
@@ -24,11 +23,7 @@
 inFirstRun = isNothing . relDir <$> getYesod
 
 newWebAppState :: IO (TMVar WebAppState)
-newWebAppState = do
-	otherrepos <- listOtherRepos
-	atomically $ newTMVar $ WebAppState
-		{ showIntro = True
-		, otherRepos = otherrepos }
+newWebAppState = atomically $ newTMVar $ WebAppState { showIntro = True }
 
 liftAssistant :: forall sub a. (Assistant a) -> GHandler sub WebApp a
 liftAssistant a = liftIO . flip runAssistant a =<< assistantData <$> getYesod
@@ -101,15 +96,5 @@
 	setUltDestReferer
 	redirectUltDest HomeR
 
-{- List of other known repsitories, and link to add a new one. -}
-otherReposWidget :: Widget
-otherReposWidget = do
-	repolist <- lift $ otherRepos <$> getWebAppState
-	$(widgetFile "otherrepos")
-
-listOtherRepos :: IO [(String, String)]
-listOtherRepos = do
-	f <- autoStartFile
-	dirs <- nub <$> ifM (doesFileExist f) ( lines <$> readFile f, return [])
-	names <- mapM relHome dirs
-	return $ sort $ zip names dirs
+controlMenu :: Widget
+controlMenu = $(widgetFile "controlmenu")
diff --git a/Assistant/WebApp/Control.hs b/Assistant/WebApp/Control.hs
new file mode 100644
--- /dev/null
+++ b/Assistant/WebApp/Control.hs
@@ -0,0 +1,42 @@
+{- git-annex assistant webapp control
+ -
+ - Copyright 2012 Joey Hess <joey@kitenet.net>
+ -
+ - Licensed under the GNU AGPL version 3 or higher.
+ -}
+
+{-# LANGUAGE CPP, TypeFamilies, QuasiQuotes, MultiParamTypeClasses, TemplateHaskell, OverloadedStrings, RankNTypes #-}
+
+module Assistant.WebApp.Control where
+
+import Assistant.WebApp.Common
+import Locations.UserConfig
+
+import Control.Concurrent
+import System.Posix (getProcessID, signalProcess, sigTERM)
+
+getShutdownR :: Handler RepHtml
+getShutdownR = page "Shutdown" Nothing $
+	$(widgetFile "control/shutdown")
+
+getShutdownConfirmedR :: Handler RepHtml
+getShutdownConfirmedR = page "Shutdown" Nothing $ do
+	{- Wait 2 seconds before shutting down, to give the web page time
+	 - to display. -}
+	void $ liftIO $ forkIO $ do
+		threadDelay 2000000
+		signalProcess sigTERM =<< getProcessID
+	$(widgetFile "control/shutdownconfirmed")
+
+{- Quite a hack, and doesn't redirect the browser window. -}
+getRestartR :: Handler RepHtml
+getRestartR = page "Restarting" Nothing $ do
+	void $ liftIO $ forkIO $ do
+		threadDelay 2000000
+		program <- readProgramFile
+		unlessM (boolSystem "sh" [Param "-c", Param $ restartcommand program]) $
+			error "restart failed"
+	$(widgetFile "control/restarting")
+  where
+	restartcommand program = program ++ " assistant --stop; " ++
+		program ++ " webapp"
diff --git a/Assistant/WebApp/DashBoard.hs b/Assistant/WebApp/DashBoard.hs
--- a/Assistant/WebApp/DashBoard.hs
+++ b/Assistant/WebApp/DashBoard.hs
@@ -125,9 +125,7 @@
 				boolSystem cmd [Param path]
 			return True
 		, do
-			clearUltDest
-			setUltDest $ "file://" ++ path
-			void $ redirectUltDest HomeR
+			void $ redirect $ "file://" ++ path
 			return False
 		)
   where
diff --git a/Assistant/WebApp/OtherRepos.hs b/Assistant/WebApp/OtherRepos.hs
--- a/Assistant/WebApp/OtherRepos.hs
+++ b/Assistant/WebApp/OtherRepos.hs
@@ -11,14 +11,30 @@
 
 import Assistant.Common
 import Assistant.WebApp.Types
+import Assistant.WebApp.Page
 import qualified Git.Construct
 import qualified Git.Config
 import Locations.UserConfig
 import qualified Utility.Url as Url
+import Utility.Yesod
 
 import Yesod
 import Control.Concurrent
 import System.Process (cwd)
+
+getRepositorySwitcherR :: Handler RepHtml
+getRepositorySwitcherR = page "Switch repository" Nothing $ do
+	repolist <- liftIO listOtherRepos
+	$(widgetFile "control/repositoryswitcher")
+
+listOtherRepos :: IO [(String, String)]
+listOtherRepos = do
+	f <- autoStartFile
+	pwd <- getCurrentDirectory
+	dirs <- filter (\d -> not $ d `dirContains` pwd) . nub
+		<$> ifM (doesFileExist f) ( lines <$> readFile f, return [])
+	names <- mapM relHome dirs
+	return $ sort $ zip names dirs
 
 {- Starts up the assistant in the repository, and waits for it to create
  - a gitAnnexUrlFile. Waits for the assistant to be up and listening for
diff --git a/Assistant/WebApp/Types.hs b/Assistant/WebApp/Types.hs
--- a/Assistant/WebApp/Types.hs
+++ b/Assistant/WebApp/Types.hs
@@ -76,7 +76,6 @@
 
 data WebAppState = WebAppState
 	{ showIntro :: Bool -- should the into message be displayed?
-	, otherRepos :: [(String, String)] -- name and path to other repos
 	}
 
 data RepoSelector = RepoSelector
diff --git a/Assistant/WebApp/routes b/Assistant/WebApp/routes
--- a/Assistant/WebApp/routes
+++ b/Assistant/WebApp/routes
@@ -5,6 +5,10 @@
 /about/license LicenseR GET
 /about/repogroups RepoGroupR GET
 
+/shutdown ShutdownR GET
+/shutdown/confirm ShutdownConfirmedR GET
+/restart RestartR GET
+
 /config ConfigurationR GET
 /config/repository RepositoriesR GET
 /config/xmpp XMPPR GET
@@ -12,6 +16,7 @@
 
 /config/repository/new/first FirstRepositoryR GET
 /config/repository/new NewRepositoryR GET
+/config/repository/switcher RepositorySwitcherR GET
 /config/repository/switchto/#FilePath SwitchToRepositoryR GET
 /config/repository/edit/#UUID EditRepositoryR GET
 /config/repository/edit/new/#UUID EditNewRepositoryR GET
diff --git a/CHANGELOG b/CHANGELOG
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,10 @@
+git-annex (3.20130103) UNRELEASED; urgency=low
+
+  * webapp: Add UI to stop and restart assistant.
+  * committer: Fix a file handle leak.
+
+ -- Joey Hess <joeyh@debian.org>  Thu, 03 Jan 2013 14:58:45 -0400
+
 git-annex (3.20130102) unstable; urgency=low
 
   * direct, indirect: New commands, that switch a repository to and from
diff --git a/Command/Add.hs b/Command/Add.hs
--- a/Command/Add.hs
+++ b/Command/Add.hs
@@ -60,7 +60,8 @@
 	tmp <- fromRepo gitAnnexTmpDir
 	createAnnexDirectory tmp
 	liftIO $ do
-		(tmpfile, _handle) <- openTempFile tmp (takeFileName file)
+		(tmpfile, handle) <- openTempFile tmp (takeFileName file)
+		hClose handle
 		nukeFile tmpfile
 		createLink file tmpfile
 		return $ KeySource { keyFilename = file , contentLocation = tmpfile }
diff --git a/Utility/FileMode.hs b/Utility/FileMode.hs
--- a/Utility/FileMode.hs
+++ b/Utility/FileMode.hs
@@ -101,3 +101,12 @@
 
 setSticky :: FilePath -> IO ()
 setSticky f = modifyFileMode f $ addModes [stickyMode]
+
+{- Writes a file, ensuring that its modes do not allow it to be read
+ - by anyone other than the current user, before any content is written. -}
+writeFileProtected :: FilePath -> String -> IO ()
+writeFileProtected file content = do
+	h <- openFile file WriteMode
+	modifyFileMode file $ removeModes [groupReadMode, otherReadMode]
+	hPutStr h content
+	hClose h
diff --git a/Utility/WebApp.hs b/Utility/WebApp.hs
--- a/Utility/WebApp.hs
+++ b/Utility/WebApp.hs
@@ -10,6 +10,8 @@
 module Utility.WebApp where
 
 import Common
+import Utility.TempFile
+import Utility.FileMode
 
 import qualified Yesod
 import qualified Network.Wai as Wai
@@ -188,3 +190,23 @@
 	params'
 		| predicate pathbits = authparam:params
 		| otherwise = params
+
+{- Creates a html shim file that's used to redirect into the webapp,
+ - to avoid exposing the secret token when launching the web browser. -}
+writeHtmlShim :: String -> String -> FilePath -> IO ()
+writeHtmlShim title url file = viaTmp writeFileProtected file $ genHtmlShim title url
+
+{- TODO: generate this static file using Yesod. -}
+genHtmlShim :: String -> String -> String
+genHtmlShim title url = unlines
+	[ "<html>"
+	, "<head>"
+	, "<title>"++ title ++ "</title>"
+	, "<meta http-equiv=\"refresh\" content=\"1; URL="++url++"\">"
+	, "<body>"
+	, "<p>"
+	, "<a href=\"" ++ url ++ "\">" ++ title ++ "</a>"
+	, "</p>"
+	, "</body>"
+	, "</html>"
+	]
diff --git a/debian/changelog b/debian/changelog
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+git-annex (3.20130103) UNRELEASED; urgency=low
+
+  * webapp: Add UI to stop and restart assistant.
+  * committer: Fix a file handle leak.
+
+ -- Joey Hess <joeyh@debian.org>  Thu, 03 Jan 2013 14:58:45 -0400
+
 git-annex (3.20130102) unstable; urgency=low
 
   * direct, indirect: New commands, that switch a repository to and from
diff --git a/doc/assistant/controlmenu.png b/doc/assistant/controlmenu.png
new file mode 100644
Binary files /dev/null and b/doc/assistant/controlmenu.png differ
diff --git a/doc/backends/comment_2_1f2626eca9004b31a0b7fc1a0df8027b._comment b/doc/backends/comment_2_1f2626eca9004b31a0b7fc1a0df8027b._comment
new file mode 100644
--- /dev/null
+++ b/doc/backends/comment_2_1f2626eca9004b31a0b7fc1a0df8027b._comment
@@ -0,0 +1,24 @@
+[[!comment format=mdwn
+ username="https://www.google.com/accounts/o8/id?id=AItOawm7eqCMh_B7mxE0tnchbr0JoYu11FUAFRY"
+ nickname="Stéphane"
+ subject="Tracking remote copies not even stored locally / URL backend turned into a &quot;special remote&quot;."
+ date="2013-01-03T10:59:35Z"
+ content="""
+In case you came here looking for the URL backend.
+
+## The URL backend
+
+Several documents on the web refer to a special \"URL backend\", e.g. [Large file management with git-annex [LWN.net]](http://lwn.net/Articles/419241/).  Historical content will never be updated yet it drives people to living places.
+
+## Why a URL backend ?
+
+It is interesting because you can:
+
+* let `git-annex` rest on the fact that some documents are available as extra copies available at any time (but from something that is not a git repository).
+* track these documents like your own with all git features, which opens up some truly marvelous combinations, which this margin is too narrow to contain (Pierre d.F. wouldn't disapprove ;-).
+
+## How/Where now ?
+
+`git-annex` used to have a URL backend. It seems that the design changed into a \"special remote\" feature, not limited to the web. You can now track files available through plain directories, rsync, webdav, some cloud storage, etc, even clay tablets. For details see [[special remotes]].
+
+"""]]
diff --git a/doc/bugs/OSX_app_issues/comment_5_0d1df34f83a8dac9c438d93806236818._comment b/doc/bugs/OSX_app_issues/comment_5_0d1df34f83a8dac9c438d93806236818._comment
new file mode 100644
--- /dev/null
+++ b/doc/bugs/OSX_app_issues/comment_5_0d1df34f83a8dac9c438d93806236818._comment
@@ -0,0 +1,8 @@
+[[!comment format=mdwn
+ username="http://joeyh.name/"
+ ip="2001:4978:f:21a::2"
+ subject="comment 5"
+ date="2013-01-02T19:52:28Z"
+ content="""
+The build for today's release is 24 mb.
+"""]]
diff --git a/doc/bugs/OSX_app_issues/comment_6_bc44d5aea5f77e331a32913ada293730._comment b/doc/bugs/OSX_app_issues/comment_6_bc44d5aea5f77e331a32913ada293730._comment
new file mode 100644
--- /dev/null
+++ b/doc/bugs/OSX_app_issues/comment_6_bc44d5aea5f77e331a32913ada293730._comment
@@ -0,0 +1,27 @@
+[[!comment format=mdwn
+ username="https://www.jsilence.org/"
+ nickname="jsilence"
+ subject="Setting up a repository fails on OSX 10.6"
+ date="2013-01-05T11:17:18Z"
+ content="""
+I installed Haskell via MacPorts and managed to compile git-annex as described via cabal.
+
+On the initial start, git-annex webapp starts just fine and the webapp opens in the browser. When I try to configure a local repository, the webapp crashes.
+
+    1 jsilence@zeo ~ % git-annex webapp
+    (Recording state in git...)
+    WebApp crashed: watch mode is not available on this system
+    
+    Launching web browser on file:///var/folders/6b/6bWnFAnbFXSPCLPvCnKNrE+++TI/-Tmp-/webapp1003.html
+    jsilence@zeo ~ % 
+
+\"watch mode is not suported\" suggests that lsof is not in the PATH. lsof resides in /usr/sbin and can be found just fine:
+
+    jsilence@zeo ~ % which lsof
+    /usr/sbin/lsof
+
+Any help would be appreciated.
+
+-jsl
+
+"""]]
diff --git a/doc/bugs/Remote_repositories_have_to_be_setup_encrypted.mdwn b/doc/bugs/Remote_repositories_have_to_be_setup_encrypted.mdwn
new file mode 100644
--- /dev/null
+++ b/doc/bugs/Remote_repositories_have_to_be_setup_encrypted.mdwn
@@ -0,0 +1,25 @@
+What steps will reproduce the problem?
+
+Create a new remote repository in the webapp. Get to the final phase of the setup where it asks you if you want to encrypt it, yet no other option is given to continue.
+
+What is the expected output? What do you see instead?
+
+At least two options:
+
+1. Use an encrypted rsync repository on the server (the existing one)
+2. Use an unencrypted rsync repository on the server
+
+What version of git-annex are you using? On what operating system?
+
+    $ ./git-annex version
+    git-annex version: 3.20130102
+
+    $ uname -a
+    Linux wintermute 3.2.0-35-generic #55-Ubuntu SMP Wed Dec 5 17:45:18 UTC 2012 i686 i686 i386 GNU/Linux
+
+    $ lsb_release -a
+    Distributor ID:	Ubuntu
+    Description:	Ubuntu 12.04.1 LTS
+    Release:	12.04
+    Codename:	precise
+
diff --git a/doc/bugs/Syncing_creates_broken_links_instead_of_proper_files.mdwn b/doc/bugs/Syncing_creates_broken_links_instead_of_proper_files.mdwn
new file mode 100644
--- /dev/null
+++ b/doc/bugs/Syncing_creates_broken_links_instead_of_proper_files.mdwn
@@ -0,0 +1,47 @@
+What steps will reproduce the problem?
+
+Create two repositories by running git annex webapp. Sync them by linking them to the same xmpp account. Add files on both sides.
+
+What is the expected output? What do you see instead?
+
+I expect the same file to show up on both sides with the same contents. Instead adding a file on any side creates a broken link with the same name on the other side. For example:
+
+Side A:
+
+    $ ls -la
+    total 20
+    drwxrwxr-x  3 pedrocr pedrocr 4096 Jan  3 19:24 .
+    drwxr-xr-x 55 pedrocr pedrocr 4096 Jan  3 19:19 ..
+    lrwxrwxrwx  1 pedrocr pedrocr  178 Jan  3 19:22 bar -> .git/annex/objects/FQ/vV/SHA256E-s8--12a61f4e173fb3a11c05d6471f74728f76231b4a5fcd9667cef3af87a3ae4dc2/SHA256E-s8--12a61f4e173fb3a11c05d6471f74728f76231b4a5fcd9667cef3af87a3ae4dc2
+    lrwxrwxrwx  1 pedrocr pedrocr  178 Jan  3 19:20 foo -> .git/annex/objects/g7/9v/SHA256E-s4--7d865e959b2466918c9863afca942d0fb89d7c9ac0c99bafc3749504ded97730/SHA256E-s4--7d865e959b2466918c9863afca942d0fb89d7c9ac0c99bafc3749504ded97730
+    drwxrwxr-x  7 pedrocr pedrocr 4096 Jan  3 19:24 .git
+    -rw-r--r--  1 pedrocr pedrocr    0 Jan  3 19:24 testing
+
+"foo" and "bar" are broken links that were created on Side B
+
+Side B:
+
+    $ ls -la
+    total 24
+    drwxrwxr-x  3 pedrocr pedrocr 4096 Jan  3 19:24 .
+    drwx------ 42 pedrocr pedrocr 4096 Jan  3 19:18 ..
+    -rw-r--r--  1 pedrocr pedrocr    8 Jan  3 19:22 bar
+    -rw-r--r--  1 pedrocr pedrocr    4 Jan  3 19:20 foo
+    drwxrwxr-x  7 pedrocr pedrocr 4096 Jan  3 19:24 .git
+    lrwxrwxrwx  1 pedrocr pedrocr  178 Jan  3 19:24 testing -> .git/annex/objects/pX/ZJ/SHA256E-s0--e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855/SHA256E-s0--e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
+
+In this case "testing" is a broken link and was created on Side A.
+
+What version of git-annex are you using? On what operating system?
+
+    $ ./git-annex version
+    git-annex version: 3.20130102
+
+    $ uname -a
+    Linux wintermute 3.2.0-35-generic #55-Ubuntu SMP Wed Dec 5 17:45:18 UTC 2012 i686 i686 i386 GNU/Linux
+
+    $ lsb_release -a
+    Distributor ID:	Ubuntu
+    Description:	Ubuntu 12.04.1 LTS
+    Release:	12.04
+    Codename:	precise
diff --git a/doc/bugs/The_webapp_doesn__39__t_allow_deleting_repositories.mdwn b/doc/bugs/The_webapp_doesn__39__t_allow_deleting_repositories.mdwn
new file mode 100644
--- /dev/null
+++ b/doc/bugs/The_webapp_doesn__39__t_allow_deleting_repositories.mdwn
@@ -0,0 +1,21 @@
+What steps will reproduce the problem?
+
+After creating new remote repositories in the webapp there's no option to delete them
+
+What is the expected output? What do you see instead?
+
+Some option to delete a repository, just like I can disable sync or change the config of a remote
+
+What version of git-annex are you using? On what operating system?
+
+    $ ./git-annex version
+    git-annex version: 3.20130102
+
+    $ uname -a
+    Linux wintermute 3.2.0-35-generic #55-Ubuntu SMP Wed Dec 5 17:45:18 UTC 2012 i686 i686 i386 GNU/Linux
+
+    $ lsb_release -a
+    Distributor ID:	Ubuntu
+    Description:	Ubuntu 12.04.1 LTS
+    Release:	12.04
+    Codename:	precise
diff --git a/doc/bugs/typo_in___34__ready_to_add_remote_server__34___message.mdwn b/doc/bugs/typo_in___34__ready_to_add_remote_server__34___message.mdwn
new file mode 100644
--- /dev/null
+++ b/doc/bugs/typo_in___34__ready_to_add_remote_server__34___message.mdwn
@@ -0,0 +1,16 @@
+What steps will reproduce the problem?
+Add a ssh remote to an existing git annex repository. The word "sensitive" is misspelled.
+
+What is the expected output? What do you see instead?
+I expect to see:
+"The contents of your files will be stored, fully encrypted, on the server. The server will not store other information about your git repository. This is the best choice if you don't run the server yourself, or have sensitive data."
+
+But instead I see:
+"The contents of your files will be stored, fully encrypted, on the server. The server will not store other information about your git repository. This is the best choice if you don't run the server yourself, or have sensative data."
+
+What version of git-annex are you using? On what operating system?
+3.20130102, Fedora 17 x86_64
+
+Please provide any additional information below.
+
+> [[done]] --[[Joey]] 
diff --git a/doc/design/assistant/blog/day_161__release_day.mdwn b/doc/design/assistant/blog/day_161__release_day.mdwn
new file mode 100644
--- /dev/null
+++ b/doc/design/assistant/blog/day_161__release_day.mdwn
@@ -0,0 +1,8 @@
+Released the first git-annex with direct mode today. Notably, the assistant
+enables direct mode in repositories it creates. All builds are updated to
+3.20130102 now.
+
+My plan for this month is to fix whatever things currently might be
+preventing you from using the git-annex assistant. So bugfixes and
+whatever other important gaps need to be filled, but no major new
+feature developments.
diff --git a/doc/design/assistant/blog/day_162__UI.mdwn b/doc/design/assistant/blog/day_162__UI.mdwn
new file mode 100644
--- /dev/null
+++ b/doc/design/assistant/blog/day_162__UI.mdwn
@@ -0,0 +1,17 @@
+[Installed a generator](http://joeyh.name/blog/entry/overcast/),
+so I'll have more power and less hibernation.
+
+Added UI in the webapp to shut down the daemon. Would like to also have
+restart UI, but that's rather harder to do, seems it'd need to start
+another copy of the webapp (and so, of the assistant), and redirect the
+browser to its new url. ... But running two assistants in the same repo at
+the same time isn't good. Anyway, users can now use the UI to shut it down,
+and then use their native desktop UI to start it back up.
+
+[[!img /assistant/controlmenu.png]]
+
+Spiffed up the control menu. Had to stop listing other local repositories
+in the menu, because there was no way to notice when a new one was added
+(without checking a file on every page load, which is way overkill for this
+minor feature). Instead added a new page that lists local repositories it
+can switch to.
diff --git a/doc/sync/comment_2_9301ff5e81d37475f594e74fbe32f24e._comment b/doc/sync/comment_2_9301ff5e81d37475f594e74fbe32f24e._comment
new file mode 100644
--- /dev/null
+++ b/doc/sync/comment_2_9301ff5e81d37475f594e74fbe32f24e._comment
@@ -0,0 +1,11 @@
+[[!comment format=mdwn
+ username="https://www.google.com/accounts/o8/id?id=AItOawlDDW-g2WLLsLpcnCm4LykAquFY_nwbIrU"
+ nickname="Daniel"
+ subject="Its just grand"
+ date="2013-01-04T14:45:35Z"
+ content="""
+I cam upon git-annex a few months ago. I saw immidiately how it could help with some frustrations I've been having. One in particlar is keeping my vimrc in sync accross multiple locations and platforms. I finally took the time to give it a try after I finally hit my boiling point this morning. I went through the [walkthrough](http://git-annex.branchable.com/walkthrough/) and now I have an annax everywhere I need it. `git annex sync` and my vimrc is up-to-date, simply grand!
+
+Thanks so much for making git-annex, 
+[Daniel Wozniak](http://woz.io)
+"""]]
diff --git a/doc/tips/setup_a_public_repository_on_a_web_site.mdwn b/doc/tips/setup_a_public_repository_on_a_web_site.mdwn
--- a/doc/tips/setup_a_public_repository_on_a_web_site.mdwn
+++ b/doc/tips/setup_a_public_repository_on_a_web_site.mdwn
@@ -12,8 +12,9 @@
 4. `git init; git annex init`
 3. We want users to be able to clone the git repository over http, because
    git-annex can download files from it over http as well. For this to
-   work, `git update-server-info` needs to get run after commits. So
-   put it in the git `post-update` hook.
+   work, `git update-server-info` needs to get run after commits. The
+   git `post-update` hook will take care of this, you just need to enable
+   the hook. `chmod +x .git/hooks/post-update`
 5. `git annex add; git commit -m added`
 6. Make sure users can still download files from the site directly.
 7. Instruct advanced users to clone a http url that ends with the "/.git/"
diff --git a/git-annex.cabal b/git-annex.cabal
--- a/git-annex.cabal
+++ b/git-annex.cabal
@@ -1,5 +1,5 @@
 Name: git-annex
-Version: 3.20130102
+Version: 3.20130105
 Cabal-Version: >= 1.8
 License: GPL
 Maintainer: Joey Hess <joey@kitenet.net>
@@ -86,7 +86,7 @@
   else
     if os(darwin)
       Build-Depends: hfsevents
-      CPP-Options: -DWITH_HFSEVENTS
+      CPP-Options: -DWITH_FSEVENTS
     else
       if (! os(windows) && ! os(solaris) && ! os(linux))
         CPP-Options: -DWITH_KQUEUE
diff --git a/templates/configurators/ssh/confirm.hamlet b/templates/configurators/ssh/confirm.hamlet
--- a/templates/configurators/ssh/confirm.hamlet
+++ b/templates/configurators/ssh/confirm.hamlet
@@ -25,7 +25,7 @@
         The contents of your files will be stored, fully encrypted, on the #
         server. The server will not store other information about your #
         git repository. This is the best choice if you don't run the server #
-        yourself, or have sensative data.
+        yourself, or have sensitive data.
     <div .span4>
       $if needsPubKey sshdata
         <div .alert .alert-info>
diff --git a/templates/control/repositoryswitcher.hamlet b/templates/control/repositoryswitcher.hamlet
new file mode 100644
--- /dev/null
+++ b/templates/control/repositoryswitcher.hamlet
@@ -0,0 +1,14 @@
+<div .span9 .hero-unit>
+  <h2>
+    Switch repository
+  <p>
+    $if null repolist
+      There are no other local repositories. Want to #
+      <a href="@{NewRepositoryR}">add one</a>?
+    $else
+      You can switch to any of these other local repositories:
+      <ul>
+        $forall (name, path) <- repolist
+          <li>
+            <a href="@{SwitchToRepositoryR path}">
+              #{name}
diff --git a/templates/control/restarting.hamlet b/templates/control/restarting.hamlet
new file mode 100644
--- /dev/null
+++ b/templates/control/restarting.hamlet
@@ -0,0 +1,2 @@
+<div .span9 .hero-unit>
+  Restarting...
diff --git a/templates/control/shutdown.hamlet b/templates/control/shutdown.hamlet
new file mode 100644
--- /dev/null
+++ b/templates/control/shutdown.hamlet
@@ -0,0 +1,8 @@
+<div .span9 .hero-unit>
+  <h2>
+    Shutdown daemon?
+  <p>
+    <a .btn .btn-danger href="@{ShutdownConfirmedR}">
+      <i .icon-off></i> Confirm shutdown
+    <a .btn href="@{HomeR}">
+      Keep running
diff --git a/templates/control/shutdownconfirmed.hamlet b/templates/control/shutdownconfirmed.hamlet
new file mode 100644
--- /dev/null
+++ b/templates/control/shutdownconfirmed.hamlet
@@ -0,0 +1,2 @@
+<div .span9 .hero-unit>
+  Shutting down...
diff --git a/templates/controlmenu.hamlet b/templates/controlmenu.hamlet
new file mode 100644
--- /dev/null
+++ b/templates/controlmenu.hamlet
@@ -0,0 +1,10 @@
+<ul .dropdown-menu>
+  <li>
+    <a href="@{NewRepositoryR}">
+      <i .icon-plus-sign></i> Add another local repository
+    <a href="@{RepositorySwitcherR}">
+      <i .icon-folder-close></i> Switch repository
+    <a href="@{RestartR}">
+      <i .icon-repeat></i> Restart daemon
+    <a href="@{ShutdownR}">
+      <i .icon-off></i> Shutdown daemon
diff --git a/templates/otherrepos.hamlet b/templates/otherrepos.hamlet
deleted file mode 100644
--- a/templates/otherrepos.hamlet
+++ /dev/null
@@ -1,10 +0,0 @@
-<ul .dropdown-menu>
-  $forall (name, path) <- repolist
-    <li>
-      <a href="@{SwitchToRepositoryR path}">
-        #{name}
-  $if not (null repolist)
-    <li .divider></li>
-  <li>
-    <a href="@{NewRepositoryR}">
-      Add another repository
diff --git a/templates/page.hamlet b/templates/page.hamlet
--- a/templates/page.hamlet
+++ b/templates/page.hamlet
@@ -16,7 +16,7 @@
             <a .dropdown-toggle data-toggle="dropdown" href="#menu1">
               Current Repository: #{reldir}
               <b .caret></b>
-            ^{otherReposWidget}
+            ^{controlMenu}
       $nothing
 <div .container-fluid>
   <div .row-fluid>
