From 5b87007dad323c02b50d396583861ca8eb0c8d4e Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 3 Aug 2012 09:00:03 -0400 Subject: [PATCH 01/11] done --- doc/design/assistant/webapp.mdwn | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/doc/design/assistant/webapp.mdwn b/doc/design/assistant/webapp.mdwn index 7df93cf401..5a206f20fa 100644 --- a/doc/design/assistant/webapp.mdwn +++ b/doc/design/assistant/webapp.mdwn @@ -29,6 +29,11 @@ The webapp is a web server that displays a shiny interface. over http by the web app * Display any relevant warning messages. One is the `inotify max_user_watches` exceeded message. +* possibly add a desktop file to the top of the repository that can be used + to open the webapp (rather than using the menus). Would be complicated + some by the path to git-annex sometimes needing to be hardcoded and varying + across systems, so it would need to be a symlink to `.git/annex/desktop` + which would be per-system. ## first start From 68802901ba5859d8d0fe888e13c4d606416a5671 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 3 Aug 2012 10:45:58 -0400 Subject: [PATCH 02/11] update --- doc/design/assistant/webapp.mdwn | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/doc/design/assistant/webapp.mdwn b/doc/design/assistant/webapp.mdwn index 5a206f20fa..ddcc661536 100644 --- a/doc/design/assistant/webapp.mdwn +++ b/doc/design/assistant/webapp.mdwn @@ -17,10 +17,10 @@ The webapp is a web server that displays a shiny interface. ## interface * list of files uploading and downloading **done** -* progress bars for each file +* button to open file browser on repo (`xdg-open $DIR`) **done** +* progress bars for each file (see [[progressbars]]) * drag and drop to reorder * cancel and pause -* button to open file browser on repo (`xdg-open $DIR`) * keep it usable w/o javascript, and accessible to blind, etc ## other features @@ -35,17 +35,10 @@ The webapp is a web server that displays a shiny interface. across systems, so it would need to be a symlink to `.git/annex/desktop` which would be per-system. -## first start +## first start **done** * make git repo **done** -* generate a nice description like "joey@hostname Desktop/annex" -* record repository that was made, and use it next time run +* generate a nice description like "joey@hostname Desktop/annex" **done** +* record repository that was made, and use it next time run **done** * write a pid file, to prevent more than one first-start process running - at once - -## implementation - -* possibly lose the ugly auth= token past the first page, - and use a client-side session. It could be encrypted using the token - as the `encryptKey`. Note: Would need to set the session duration - to infinite (how?) + at once **done** From 98aa929f0271631ba5ee1fc430cd177bd886d9ef Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 3 Aug 2012 20:49:40 -0400 Subject: [PATCH 03/11] blog for the day --- .../assistant/blog/day_52__file_browser.mdwn | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 doc/design/assistant/blog/day_52__file_browser.mdwn diff --git a/doc/design/assistant/blog/day_52__file_browser.mdwn b/doc/design/assistant/blog/day_52__file_browser.mdwn new file mode 100644 index 0000000000..a9762cc096 --- /dev/null +++ b/doc/design/assistant/blog/day_52__file_browser.mdwn @@ -0,0 +1,21 @@ +Today I added a "Files" link in the navbar of the WebApp. It looks like a +regular hyperlink, but clicking on it opens up your desktop's native file +manager, to manage the files in the repository! + +Quite fun to be able to do this kind of thing from a web page. :) + +--- + +Made `git annex init` (and the WebApp) automatically generate a description +of the repo when none is provided. + +--- + +Also worked on the configuration pages some. I don't want to get ahead +of myself by diving into the full configuration stage yet, but I am at +least going to add a configuration screen to clone the repo to a removable +drive. + +After that, the list of transfers on the dashboard needs some love. +I'll probably start by adding UI to cancel running transfers, and then +try to get drag and drop reordering of transfers working. From 0ca85a94283a0ec067fc498747f246ef63dce993 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 3 Aug 2012 23:51:49 -0400 Subject: [PATCH 04/11] Revert "init: If no description is provided for a new repository, one will automatically be generated, like "joey@gnu:~/foo"" This reverts commit abde98cda21d5deeb16ed3baf736b06fdc2fce2f. Temporarily dropping from master, since this actually uses stuff that's only currently availble in the assistant branch. Will come back when I merge that, and can wait.. --- Init.hs | 22 +--------------------- debian/changelog | 2 -- doc/git-annex.mdwn | 3 +-- 3 files changed, 2 insertions(+), 25 deletions(-) diff --git a/Init.hs b/Init.hs index 291e346f5f..bddcc696e0 100644 --- a/Init.hs +++ b/Init.hs @@ -19,26 +19,6 @@ import Logs.UUID import Annex.Version import Annex.UUID -import System.Posix.User - -genDescription :: Maybe String -> Annex String -genDescription (Just d) = return d -genDescription Nothing = do - hostname <- getHostname - let at = if null hostname then "" else "@" - username <- clicketyclickety - reldir <- liftIO . relHome =<< fromRepo Git.repoPath - return $ concat [username, at, hostname, ":", reldir] - where - {- Haskell lacks uname(2) bindings, except in the - - Bindings.Uname addon. Rather than depend on that, - - use uname -n when available. -} - getHostname = liftIO $ catchDefaultIO uname_node "" - uname_node = takeWhile (/= '\n') <$> - readProcess "uname" ["-n"] - clicketyclickety = liftIO $ userName <$> - (getUserEntryForID =<< getEffectiveUserID) - initialize :: Maybe String -> Annex () initialize mdescription = do prepUUID @@ -46,7 +26,7 @@ initialize mdescription = do setVersion gitPreCommitHookWrite u <- getUUID - describeUUID u =<< genDescription mdescription + maybe (recordUUID u) (describeUUID u) mdescription uninitialize :: Annex () uninitialize = do diff --git a/debian/changelog b/debian/changelog index 081d1ac9f8..82bf5009a1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,8 +2,6 @@ git-annex (3.20120722) UNRELEASED; urgency=low * initremote: Avoid recording remote's description before checking that its config is valid. - * init: If no description is provided for a new repository, one will - automatically be generated, like "joey@gnu:~/foo" -- Joey Hess Fri, 27 Jul 2012 21:04:47 -0400 diff --git a/doc/git-annex.mdwn b/doc/git-annex.mdwn index a3fc82b55f..c52a5f3bf9 100644 --- a/doc/git-annex.mdwn +++ b/doc/git-annex.mdwn @@ -194,8 +194,7 @@ subdirectories). using it in a repository that was not intended to have an annex. It's useful, but not mandatory, to initialize each new clone - of a repository with its own description. If you don't provide one, - one will be generated. + of a repository with its own description. * describe repository description From 3733a4194b59ec233671d8deb279eda52497ed07 Mon Sep 17 00:00:00 2001 From: "https://www.google.com/accounts/o8/id?id=AItOawnIsjgK_cdfZcIAumVRwTvNXS4cD0zNnaI" Date: Sun, 5 Aug 2012 16:33:35 +0000 Subject: [PATCH 05/11] --- doc/forum/public-web-frontend.mdwn | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 doc/forum/public-web-frontend.mdwn diff --git a/doc/forum/public-web-frontend.mdwn b/doc/forum/public-web-frontend.mdwn new file mode 100644 index 0000000000..76345313ae --- /dev/null +++ b/doc/forum/public-web-frontend.mdwn @@ -0,0 +1,16 @@ +Hi, + +Use case: I would like to have a "Public" top-level directory in my annex, which gets files in there published over HTTP on a particular server. + +How I see doing this: + +1. Put my annex to an http server with exported-over-http /Public/ directory. +2. Configure a post-update hook with the following: + + $ git annex fix + +3. Push files on /Public/ to that annex. + +Does it make sense? If yes, are there any gotchas I should beware of? + +Thanks. From 2f5ba720091036ebbc82c5250ab47ee7f7d80755 Mon Sep 17 00:00:00 2001 From: "https://www.google.com/accounts/o8/id?id=AItOawnIsjgK_cdfZcIAumVRwTvNXS4cD0zNnaI" Date: Sun, 5 Aug 2012 16:33:55 +0000 Subject: [PATCH 06/11] indentation --- doc/forum/public-web-frontend.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/forum/public-web-frontend.mdwn b/doc/forum/public-web-frontend.mdwn index 76345313ae..948663ecd2 100644 --- a/doc/forum/public-web-frontend.mdwn +++ b/doc/forum/public-web-frontend.mdwn @@ -7,7 +7,7 @@ How I see doing this: 1. Put my annex to an http server with exported-over-http /Public/ directory. 2. Configure a post-update hook with the following: - $ git annex fix + $ git annex fix 3. Push files on /Public/ to that annex. From 7635d0a424489b7fdc4ea9111312c257f247709d Mon Sep 17 00:00:00 2001 From: "https://www.google.com/accounts/o8/id?id=AItOawnIsjgK_cdfZcIAumVRwTvNXS4cD0zNnaI" Date: Sun, 5 Aug 2012 16:34:34 +0000 Subject: [PATCH 07/11] `Code` --- doc/forum/public-web-frontend.mdwn | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/forum/public-web-frontend.mdwn b/doc/forum/public-web-frontend.mdwn index 948663ecd2..d3fdb9b94a 100644 --- a/doc/forum/public-web-frontend.mdwn +++ b/doc/forum/public-web-frontend.mdwn @@ -4,12 +4,12 @@ Use case: I would like to have a "Public" top-level directory in my annex, which How I see doing this: -1. Put my annex to an http server with exported-over-http /Public/ directory. -2. Configure a post-update hook with the following: +1. Put my annex to an http server with exported-over-http `/Public/` directory. +2. Configure a `post-update` hook with the following: $ git annex fix -3. Push files on /Public/ to that annex. +3. Push files on `/Public/` to that annex. Does it make sense? If yes, are there any gotchas I should beware of? From b5a9fec31e5fbef553c208433e58a673ff0d68ec Mon Sep 17 00:00:00 2001 From: "http://joeyh.name/" Date: Sun, 5 Aug 2012 17:17:13 +0000 Subject: [PATCH 08/11] Added a comment --- .../comment_1_bc4a4b17b543de4828fae5a1fcf05870._comment | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 doc/forum/public-web-frontend/comment_1_bc4a4b17b543de4828fae5a1fcf05870._comment diff --git a/doc/forum/public-web-frontend/comment_1_bc4a4b17b543de4828fae5a1fcf05870._comment b/doc/forum/public-web-frontend/comment_1_bc4a4b17b543de4828fae5a1fcf05870._comment new file mode 100644 index 0000000000..7283a68b71 --- /dev/null +++ b/doc/forum/public-web-frontend/comment_1_bc4a4b17b543de4828fae5a1fcf05870._comment @@ -0,0 +1,7 @@ +[[!comment format=mdwn + username="http://joeyh.name/" + subject="comment 1" + date="2012-08-05T17:17:13Z" + content=""" +I see no need for `git annex fix +"""]] From 367c1fd3b84cf85aeba52f0e397726510fda729a Mon Sep 17 00:00:00 2001 From: "http://joeyh.name/" Date: Sun, 5 Aug 2012 17:17:26 +0000 Subject: [PATCH 09/11] removed --- .../comment_1_bc4a4b17b543de4828fae5a1fcf05870._comment | 7 ------- 1 file changed, 7 deletions(-) delete mode 100644 doc/forum/public-web-frontend/comment_1_bc4a4b17b543de4828fae5a1fcf05870._comment diff --git a/doc/forum/public-web-frontend/comment_1_bc4a4b17b543de4828fae5a1fcf05870._comment b/doc/forum/public-web-frontend/comment_1_bc4a4b17b543de4828fae5a1fcf05870._comment deleted file mode 100644 index 7283a68b71..0000000000 --- a/doc/forum/public-web-frontend/comment_1_bc4a4b17b543de4828fae5a1fcf05870._comment +++ /dev/null @@ -1,7 +0,0 @@ -[[!comment format=mdwn - username="http://joeyh.name/" - subject="comment 1" - date="2012-08-05T17:17:13Z" - content=""" -I see no need for `git annex fix -"""]] From 39c2f1ed04cdd43f26391d1db5d89ae27b1c8cc1 Mon Sep 17 00:00:00 2001 From: "http://joeyh.name/" Date: Sun, 5 Aug 2012 17:18:48 +0000 Subject: [PATCH 10/11] Added a comment: should work.. --- .../comment_1_c73bd2dfe020c25eaad1c0707dd2db01._comment | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 doc/forum/public-web-frontend/comment_1_c73bd2dfe020c25eaad1c0707dd2db01._comment diff --git a/doc/forum/public-web-frontend/comment_1_c73bd2dfe020c25eaad1c0707dd2db01._comment b/doc/forum/public-web-frontend/comment_1_c73bd2dfe020c25eaad1c0707dd2db01._comment new file mode 100644 index 0000000000..b9f6c98676 --- /dev/null +++ b/doc/forum/public-web-frontend/comment_1_c73bd2dfe020c25eaad1c0707dd2db01._comment @@ -0,0 +1,9 @@ +[[!comment format=mdwn + username="http://joeyh.name/" + subject="should work.." + date="2012-08-05T17:18:47Z" + content=""" +I see no need for `git annex fix` here. + +Web server default configurations may not allow following symlinks outside the web server document root. On apache, it can be enabled with `Options FollowSymLinks` +"""]] From b885c0c6c8faa0c56e5f8cbdaa031652df6b26b4 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 5 Aug 2012 15:01:26 -0400 Subject: [PATCH 11/11] unused, status: Avoid crashing when ran in bare repo. --- Command/Unused.hs | 9 ++++++--- debian/changelog | 1 + 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Command/Unused.hs b/Command/Unused.hs index b115eee831..09b4be5dfe 100644 --- a/Command/Unused.hs +++ b/Command/Unused.hs @@ -229,9 +229,12 @@ withKeysReferencedM a = withKeysReferenced' () calla withKeysReferenced' :: v -> (Key -> v -> Annex v) -> Annex v withKeysReferenced' initial a = go initial =<< files where - files = do - top <- fromRepo Git.repoPath - inRepo $ LsFiles.inRepo [top] + files = ifM isBareRepo + ( return [] + , do + top <- fromRepo Git.repoPath + inRepo $ LsFiles.inRepo [top] + ) go v [] = return v go v (f:fs) = do x <- Backend.lookupFile f diff --git a/debian/changelog b/debian/changelog index 82bf5009a1..9b2ff3f14c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,7 @@ git-annex (3.20120722) UNRELEASED; urgency=low * initremote: Avoid recording remote's description before checking that its config is valid. + * unused, status: Avoid crashing when ran in bare repo. -- Joey Hess Fri, 27 Jul 2012 21:04:47 -0400