summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Annex/Version.hs3
-rw-r--r--Build/InstallDesktopFile.hs2
-rw-r--r--Init.hs1
-rw-r--r--Utility/INotify.hs11
-rw-r--r--Utility/Monad.hs6
-rw-r--r--debian/changelog1
-rw-r--r--doc/design/assistant/blog/day_99_shotgun/comment_1_12bb8f54bb13ea20ac4187a2301d77ca._comment10
-rw-r--r--doc/design/assistant/polls/prioritizing_special_remotes.mdwn2
-rw-r--r--doc/design/assistant/webapp.mdwn3
-rw-r--r--doc/install/OSX/comment_2_7683740a98182de06cb329792e0c0a25._comment25
-rw-r--r--doc/install/OSX/comment_3_b090f40fe5a32e00b472a5ab2b850b4a._comment8
-rw-r--r--doc/todo/wishlist:_an___34__assistant__34___for_web-browsing_--_tracking_the_sources_of_the_downloads.mdwn13
12 files changed, 76 insertions, 9 deletions
diff --git a/Annex/Version.hs b/Annex/Version.hs
index 7c909ae05..00e574929 100644
--- a/Annex/Version.hs
+++ b/Annex/Version.hs
@@ -33,6 +33,9 @@ getVersion = handle <$> getConfig versionField ""
setVersion :: Annex ()
setVersion = setConfig versionField defaultVersion
+removeVersion :: Annex ()
+removeVersion = unsetConfig versionField
+
checkVersion :: Version -> Annex ()
checkVersion v
| v `elem` supportedVersions = noop
diff --git a/Build/InstallDesktopFile.hs b/Build/InstallDesktopFile.hs
index f39237902..1bcba70fd 100644
--- a/Build/InstallDesktopFile.hs
+++ b/Build/InstallDesktopFile.hs
@@ -87,7 +87,7 @@ writeOSXDesktop command = do
installOSXAppFile :: FilePath -> FilePath -> Maybe String -> IO ()
installOSXAppFile appdir appfile mcontent = do
- let src = "standalone" </> "macos" </> appdir </> appfile
+ let src = "standalone" </> "osx" </> appdir </> appfile
home <- myHomeDir
dest <- ifM systemwideInstall
( return $ "/Applications" </> appdir </> appfile
diff --git a/Init.hs b/Init.hs
index ec85b7fe0..aae10160d 100644
--- a/Init.hs
+++ b/Init.hs
@@ -48,6 +48,7 @@ uninitialize :: Annex ()
uninitialize = do
gitPreCommitHookUnWrite
removeRepoUUID
+ removeVersion
{- Will automatically initialize if there is already a git-annex
branch from somewhere. Otherwise, require a manual init
diff --git a/Utility/INotify.hs b/Utility/INotify.hs
index 7934c2446..b55fbc953 100644
--- a/Utility/INotify.hs
+++ b/Utility/INotify.hs
@@ -164,10 +164,11 @@ tooManyWatches hook dir = do
]
querySysctl :: Read a => [CommandParam] -> IO (Maybe a)
-querySysctl ps = do
- v <- catchMaybeIO $ readProcess "sysctl" (toCommand ps)
- case v of
- Nothing -> return Nothing
- Just s -> return $ parsesysctl s
+querySysctl ps = getM go ["sysctl", "/sbin/sysctl", "/usr/sbin/sysctl"]
where
+ go p = do
+ v <- catchMaybeIO $ readProcess p (toCommand ps)
+ case v of
+ Nothing -> return Nothing
+ Just s -> return $ parsesysctl s
parsesysctl s = readish =<< lastMaybe (words s)
diff --git a/Utility/Monad.hs b/Utility/Monad.hs
index 2c9b9e9e0..6abd7ee5d 100644
--- a/Utility/Monad.hs
+++ b/Utility/Monad.hs
@@ -16,6 +16,12 @@ firstM :: Monad m => (a -> m Bool) -> [a] -> m (Maybe a)
firstM _ [] = return Nothing
firstM p (x:xs) = ifM (p x) (return $ Just x , firstM p xs)
+{- Runs the action on values from the list until it succeeds, returning
+ - its result. -}
+getM :: Monad m => (a -> m (Maybe b)) -> [a] -> m (Maybe b)
+getM _ [] = return Nothing
+getM p (x:xs) = maybe (getM p xs) (return . Just) =<< p x
+
{- Returns true if any value in the list satisfies the predicate,
- stopping once one is found. -}
anyM :: Monad m => (a -> m Bool) -> [a] -> m Bool
diff --git a/debian/changelog b/debian/changelog
index 77fcf7bd5..2e14da4a2 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -13,6 +13,7 @@ git-annex (3.20121002) UNRELEASED; urgency=low
* Depend on and use the Haskell SafeSemaphore library, which provides
exception-safe versions of SampleVar and QSemN.
Thanks, Ben Gamari for an excellent patch set.
+ * uninit: Unset annex.version. Closes: #689852
-- Joey Hess <joeyh@debian.org> Mon, 01 Oct 2012 15:09:49 -0400
diff --git a/doc/design/assistant/blog/day_99_shotgun/comment_1_12bb8f54bb13ea20ac4187a2301d77ca._comment b/doc/design/assistant/blog/day_99_shotgun/comment_1_12bb8f54bb13ea20ac4187a2301d77ca._comment
new file mode 100644
index 000000000..eeaefef42
--- /dev/null
+++ b/doc/design/assistant/blog/day_99_shotgun/comment_1_12bb8f54bb13ea20ac4187a2301d77ca._comment
@@ -0,0 +1,10 @@
+[[!comment format=mdwn
+ username="http://meep.pl/"
+ ip="193.23.174.18"
+ subject="Include/exclude"
+ date="2012-10-06T08:40:23Z"
+ content="""
+It seems that example 2 reads weird for filtering because exclude/include say *what to do* while copies/in say *what to test*. An alias (maybe \"glob\") for include should be acceptable both ways (largerthan=10mb or glob=junk/\* or not glob=\*.mp3).
+
+That said, I would vote for keeping PCEs. And actually the simple \"not (copies=trusted:2 or in=usbdrive)\" does not read significantly worse than with \"dontwant\". (In *my bikeshed* we would have \"all\" == \"glob=\*\" and \"except\" == \"and not\").
+"""]]
diff --git a/doc/design/assistant/polls/prioritizing_special_remotes.mdwn b/doc/design/assistant/polls/prioritizing_special_remotes.mdwn
index 316921dd3..3e76a8c75 100644
--- a/doc/design/assistant/polls/prioritizing_special_remotes.mdwn
+++ b/doc/design/assistant/polls/prioritizing_special_remotes.mdwn
@@ -6,7 +6,7 @@ locally paired systems, and remote servers with rsync.
Help me prioritize my work: What special remote would you most like
to use with the git-annex assistant?
-[[!poll open=yes 14 "Amazon S3 (done)" 9 "Amazon Glacier" 6 "Box.com" 52 "My phone (or MP3 player)" 7 "Tahoe-LAFS" 3 "OpenStack SWIFT" 14 "Google Drive"]]
+[[!poll open=yes 14 "Amazon S3 (done)" 9 "Amazon Glacier" 6 "Box.com" 52 "My phone (or MP3 player)" 7 "Tahoe-LAFS" 3 "OpenStack SWIFT" 15 "Google Drive"]]
This poll is ordered with the options I consider easiest to build
listed first. Mostly because git-annex already supports them and they
diff --git a/doc/design/assistant/webapp.mdwn b/doc/design/assistant/webapp.mdwn
index 3d33f805e..a5a970fd1 100644
--- a/doc/design/assistant/webapp.mdwn
+++ b/doc/design/assistant/webapp.mdwn
@@ -23,6 +23,9 @@ The webapp is a web server that displays a shiny interface.
* there could be a UI to export a file, which would make it be served up
over http by the web app
+* there could be a UI (some javascript thing) in the web browser to
+ submit urls to the web app to be added to the annex and downloaded.
+ See: [[todo/wishlist:_an_"assistant"_for_web-browsing_--_tracking_the_sources_of_the_downloads]]
* Display the `inotify max_user_watches` exceeded message. **done**
* Display something sane when kqueue runs out of file descriptors.
* allow renaming git remotes and/or setting git-annex repo descriptions
diff --git a/doc/install/OSX/comment_2_7683740a98182de06cb329792e0c0a25._comment b/doc/install/OSX/comment_2_7683740a98182de06cb329792e0c0a25._comment
new file mode 100644
index 000000000..113ef687a
--- /dev/null
+++ b/doc/install/OSX/comment_2_7683740a98182de06cb329792e0c0a25._comment
@@ -0,0 +1,25 @@
+[[!comment format=mdwn
+ username="https://www.google.com/accounts/o8/id?id=AItOawmYiJgOvC4IDYkr2KIjMlfVD9r_1Sij_jY"
+ nickname="Douglas"
+ subject="setup: standalone/macos/git-annex.app/Contents/Info.plist: does not exist"
+ date="2012-10-06T14:46:55Z"
+ content="""
+I tried installing with cabal and homebrew on Mountain Lion. After cabal install git-annex I get:
+
+ Linking dist/build/git-annex/git-annex ...
+ Installing executable(s) in /Users/dfc/.cabal/bin
+ setup: standalone/macos/git-annex.app/Contents/Info.plist: does not exist
+ cabal: Error: some packages failed to install:
+ git-annex-3.20121001 failed during the final install step. The exception was:
+ ExitFailure 1
+
+
+There is no directory named macos inside of standalone:
+
+ jumbo:git-annex-3.20121001 dfc$ ls -l standalone/
+ total 112
+ -rw-r--r--+ 1 dfc staff 55614 Oct 6 10:40 licences.gz
+ drwxr-xr-x+ 6 dfc staff 204 Oct 6 10:40 linux
+ drwxr-xr-x+ 3 dfc staff 102 Oct 6 10:40 osx
+
+"""]]
diff --git a/doc/install/OSX/comment_3_b090f40fe5a32e00b472a5ab2b850b4a._comment b/doc/install/OSX/comment_3_b090f40fe5a32e00b472a5ab2b850b4a._comment
new file mode 100644
index 000000000..a437704a3
--- /dev/null
+++ b/doc/install/OSX/comment_3_b090f40fe5a32e00b472a5ab2b850b4a._comment
@@ -0,0 +1,8 @@
+[[!comment format=mdwn
+ username="http://joeyh.name/"
+ ip="4.154.0.149"
+ subject="comment 3"
+ date="2012-10-06T21:05:45Z"
+ content="""
+@Douglas, I've fixed that in git. FWIW, the program is installed before that point. Actually, I am leaning toward not having cabal install that plist file at all.
+"""]]
diff --git a/doc/todo/wishlist:_an___34__assistant__34___for_web-browsing_--_tracking_the_sources_of_the_downloads.mdwn b/doc/todo/wishlist:_an___34__assistant__34___for_web-browsing_--_tracking_the_sources_of_the_downloads.mdwn
index c61b32b35..ce79aa6a6 100644
--- a/doc/todo/wishlist:_an___34__assistant__34___for_web-browsing_--_tracking_the_sources_of_the_downloads.mdwn
+++ b/doc/todo/wishlist:_an___34__assistant__34___for_web-browsing_--_tracking_the_sources_of_the_downloads.mdwn
@@ -1,6 +1,6 @@
A replacement for a web-browser's downloads menu that uses git-annex internally ([[`addurl`|tips/using the web as a special remote]] command for the download, and `drop` or `git rm` for the clean up) would be quite helpful:
-say, when working on a topic, writing a paper or similar things, I usually have a Git repo with my text, all relevant data and processing code, and possibly other backround information. It's nice to store the literature you needed at the same place where you work. (So that it is easy to catch up with what I was doing and thinking over when I left this work aside for a while, perhaps after cloning the repo from another location.)
+say, when working on a topic, writing a paper or similar things, I usually have a Git repo with my text, all relevant data and processing code, and possibly other background information. It's nice to store the literature you needed at the same place where you work. (So that it is easy to catch up with what I was doing and thinking over when I left this work aside for a while, perhaps after cloning the repo from another location.)
When I find an interesting literature, I save the file to the directory with my work, and read it. Then I might return to it to re-read it. There might be references to this document from my work, so I'd like them to work as links (perhaps pointing at the local file, but also at the source URL for the case when my document is read by someone else not on my system).
@@ -8,10 +8,19 @@ I need to keep track of the source URLs for the documents I have saved which I r
That's a task that fits well git-annex.
-Note that doing the dull work of copying and pasting the URL and the downloading it and then opening it for reading is a pain to do every time I'm interested in a document I have found on the web. (Of course, I would need to fill out the bibliogrphic information for this document if I want to refer to it, but that can be done later. Initially, I wish I just don't lose the source URL of a documented at the moment when I get interested in it and start reading.)
+Note that doing the dull work of copying and pasting the URL and the downloading it and then opening it for reading is a pain to do every time I'm interested in a document I have found on the web. (Of course, I would need to fill out the bibliogrphic information for this document if I want to refer to it, but that can be done later. Initially, I wish I just don't lose the source URL of a document at the moment when I get interested in it and start reading.)
So, I could be assisted by a replacement of the "downloads" menu of, say, Firefox: whenever I want to open a file for viewing (like a PDF), it should ask me where to save it, and I'd choose the directory with my work, then it should register it with git-annex (so that the source URL is saved, and perhaps it should also write down the referring page's URL somewhere nearby automatically), download it, and open with a viewer for reading.
Then I'll have the interesting literature there when I'm offline; the source URLs would be saved, so that they can be put into the references. Also, if I distribute this work with Git, at another location git-annex can be used to easily get all the literature again.
(Hmmm... probably, the browser that this will be simplest for me to implement for is emacs-w3m; simply, some functions calling git-annex...)
+
+> This seems fairly doable to implement since the git-annex [[design/assistant]]
+> already has a webapp. So a javascript toolbar thing could be made that
+> submits the current url (or maybe links dragged into it?) to the webapp
+> for adding to the annex.
+>
+> The only wrinkle is that the webapp runs under a new url each time
+> it starts, due to using a high port and embedding some auth token in the
+> url. --[[Joey]]