summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--Git/Construct.hs2
-rw-r--r--Utility/Directory.hs6
-rw-r--r--Utility/Exception.hs7
-rw-r--r--debian/changelog7
-rw-r--r--doc/assistant/release_notes.mdwn4
-rw-r--r--doc/design/assistant/more_cloud_providers.mdwn3
-rw-r--r--doc/install/Windows.mdwn2
-rw-r--r--doc/news/version_4.20130323.mdwn37
-rw-r--r--doc/news/version_4.20130521.mdwn24
-rw-r--r--doc/special_remotes.mdwn1
-rw-r--r--doc/tips/megaannex.mdwn45
-rw-r--r--doc/todo/wishlist:_special_remote_mega.co.nz.mdwn2
-rw-r--r--git-annex.cabal2
14 files changed, 97 insertions, 46 deletions
diff --git a/.gitignore b/.gitignore
index a9c93d96a..deb0f79e8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -25,3 +25,4 @@ cabal-dev
.DS_Store
.virthualenv
tags
+Setup
diff --git a/Git/Construct.hs b/Git/Construct.hs
index 5b2ec6f12..6f58e9b28 100644
--- a/Git/Construct.hs
+++ b/Git/Construct.hs
@@ -27,6 +27,8 @@ module Git.Construct (
#ifndef __WINDOWS__
import System.Posix.User
+#else
+import Git.FilePath
#endif
import qualified Data.Map as M hiding (map, split)
import Network.URI
diff --git a/Utility/Directory.hs b/Utility/Directory.hs
index 0a7690b44..13e6168cb 100644
--- a/Utility/Directory.hs
+++ b/Utility/Directory.hs
@@ -93,8 +93,10 @@ moveFile src dest = tryIO (rename src dest) >>= onrename
- Note that an exception is thrown if the file exists but
- cannot be removed. -}
nukeFile :: FilePath -> IO ()
+nukeFile file = void $ tryWhenExists go
+ where
#ifndef mingw32_HOST_OS
-nukeFile = removeLink
+ go = removeLink file
#else
-nukeFile = removeFile
+ go = removeFile file
#endif
diff --git a/Utility/Exception.hs b/Utility/Exception.hs
index 45f2aecec..bc928e18e 100644
--- a/Utility/Exception.hs
+++ b/Utility/Exception.hs
@@ -12,6 +12,8 @@ module Utility.Exception where
import Prelude hiding (catch)
import Control.Exception
import Control.Applicative
+import Control.Monad
+import System.IO.Error (isDoesNotExistError)
{- Catches IO errors and returns a Bool -}
catchBoolIO :: IO Bool -> IO Bool
@@ -49,3 +51,8 @@ catchNonAsync a onerr = a `catches`
tryNonAsync :: IO a -> IO (Either SomeException a)
tryNonAsync a = (Right <$> a) `catchNonAsync` (return . Left)
+
+{- Catches only DoesNotExist exceptions, and lets all others through. -}
+tryWhenExists :: IO a -> IO (Maybe a)
+tryWhenExists a = either (const Nothing) Just <$>
+ tryJust (guard . isDoesNotExistError) a
diff --git a/debian/changelog b/debian/changelog
index 7b8476727..02a246e37 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-git-annex (4.20130517) UNRELEASED; urgency=low
+git-annex (4.20130521) unstable; urgency=low
* Sanitize debian changelog version before putting it into cabal file.
Closes: #708619
@@ -22,11 +22,8 @@ git-annex (4.20130517) UNRELEASED; urgency=low
* OSX: Fixed gpg included in dmg.
* Linux standalone: Back to being built with glibc 2.13 for maximum
portability.
- * XMPP: Ignore duplicate messages received when pushing.
- * XMPP: Be better at responding to CanPush messages when busy with
- something else.
- -- Joey Hess <joeyh@debian.org> Fri, 17 May 2013 11:17:03 -0400
+ -- Joey Hess <joeyh@debian.org> Tue, 21 May 2013 13:10:26 -0400
git-annex (4.20130516) unstable; urgency=low
diff --git a/doc/assistant/release_notes.mdwn b/doc/assistant/release_notes.mdwn
index 7f793be71..6ce8bac76 100644
--- a/doc/assistant/release_notes.mdwn
+++ b/doc/assistant/release_notes.mdwn
@@ -1,3 +1,7 @@
+## version 4.20130521
+
+This is a bugfix release. Recommended upgrade.
+
## version 4.20130516
This version contains numerous bug fixes, and improvements.
diff --git a/doc/design/assistant/more_cloud_providers.mdwn b/doc/design/assistant/more_cloud_providers.mdwn
index 52372e06d..16e727657 100644
--- a/doc/design/assistant/more_cloud_providers.mdwn
+++ b/doc/design/assistant/more_cloud_providers.mdwn
@@ -17,5 +17,8 @@ More should be added, such as:
* Flickr provides 1 tb (!!!!) to free accounts, and can store at least
photos and videos. <https://github.com/ricardobeat/filr> is a hack
to allow storing any type of file on Flickr.
+* mega.co.nz. Already supported via [[tips/megaannex]], would just need
+ webapp modifications to configure it. May want to use megaannex as-is to
+ build a non-hook special remote in haskell.
See poll at [[polls/prioritizing_special_remotes]].
diff --git a/doc/install/Windows.mdwn b/doc/install/Windows.mdwn
index 573f823c2..90568a863 100644
--- a/doc/install/Windows.mdwn
+++ b/doc/install/Windows.mdwn
@@ -13,7 +13,7 @@ on Windows.
A daily build is also available, thanks to Yury V. Zaytsev and
[NEST](http://nest-initiative.org/).
-* [download](https://qa.nest-initiative.org/view/msysGit/job/msysgit-git-annex-assistant-test/lastSuccessfulBuild/artifact/git-annex-installer.exe) ([build logs](https://qa.nest-initiative.org/view/msysGit/job/msysgit-git-annex-assistant-test/))
+* [download](https://qa.nest-initiative.org/view/msysGit/job/msysgit-git-annex-assistant-test/lastSuccessfulBuild/artifact/git-annex/git-annex-installer.exe) ([build logs](https://qa.nest-initiative.org/view/msysGit/job/msysgit-git-annex-assistant-test/))
## building it yourself
diff --git a/doc/news/version_4.20130323.mdwn b/doc/news/version_4.20130323.mdwn
deleted file mode 100644
index 1ccdf90d1..000000000
--- a/doc/news/version_4.20130323.mdwn
+++ /dev/null
@@ -1,37 +0,0 @@
-git-annex 4.20130323 released with [[!toggle text="these changes"]]
-[[!toggleable text="""
- * webapp: Repository list is now included in the dashboard, and other
- UI tweaks.
- * webapp: Improved UI for pairing your own devices together using XMPP.
- * webapp: Display an alert when there are XMPP remotes, and a cloud
- transfer repository needs to be configured.
- * Add incrementalbackup repository group.
- * webapp: Encourage user to install git-annex on a server when adding
- a ssh server, rather than just funneling them through to rsync.
- * xmpp: --debug now enables a sanitized dump of the XMPP protocol
- * xmpp: Try harder to detect presence of clients when there's a git push
- to send.
- * xmpp: Re-enable XA flag, since disabling it did not turn out to help
- with the problems Google Talk has with not always sending presence
- messages to clients.
- * map: Combine duplicate repositories, for a nicer looking map.
- * Fix several bugs caused by a bad Ord instance for Remote.
- * webapp: Switch all forms to POST.
- * assistant: Avoid syncing with annex-ignored remotes when reconnecting
- to the network, or connecting a drive.
- * assistant: Fix OSX bug that prevented committing changed files to a
- repository when in indirect mode.
- * webapp: Improved alerts displayed when syncing with remotes, and
- when syncing with a remote fails.
- * webapp: Force wrap long filenames in transfer display.
- * assistant: The ConfigMonitor left one zombie behind each time
- it checked for changes, now fixed.
- * get, copy, move: Display an error message when an identical transfer
- is already in progress, rather than failing with no indication why.
- * assistant: Several optimisations to file transfers.
- * OSX app and standalone Linux tarball now both support being added to
- PATH; no need to use runshell to start git-annex.
- * webapp: When adding a removable drive, you can now specify the
- directory inside it to use.
- * webapp: Confirm whether user wants to combine repositories when
- adding a removable drive that already has a repository on it."""]] \ No newline at end of file
diff --git a/doc/news/version_4.20130521.mdwn b/doc/news/version_4.20130521.mdwn
new file mode 100644
index 000000000..af4f25bfa
--- /dev/null
+++ b/doc/news/version_4.20130521.mdwn
@@ -0,0 +1,24 @@
+git-annex 4.20130521 released with [[!toggle text="these changes"]]
+[[!toggleable text="""
+ * Sanitize debian changelog version before putting it into cabal file.
+ Closes: #[708619](http://bugs.debian.org/708619)
+ * Switch to MonadCatchIO-transformers for better handling of state while
+ catching exceptions.
+ * Fix a zombie that could result when running a process like gpg to
+ read and write to it.
+ * Allow building with gpg2.
+ * Disable building with the haskell threaded runtime when the webapp
+ is not built. This may fix builds on mips, s390x and sparc, which are
+ failing to link -lHSrts\_thr
+ * Temporarily build without webapp on kfreebsd-i386, until yesod is
+ installable there again.
+ * Direct mode bug fix: After a conflicted merge was automatically resolved,
+ the content of a file that was already present could incorrectly
+ be replaced with a symlink.
+ * Fix a bug in the git-annex branch handling code that could
+ cause info from a remote to not be merged and take effect immediately.
+ * Direct mode is now fully tested by the test suite.
+ * Detect bad content in ~/.config/git-annex/program and look in PATH instead.
+ * OSX: Fixed gpg included in dmg.
+ * Linux standalone: Back to being built with glibc 2.13 for maximum
+ portability."""]] \ No newline at end of file
diff --git a/doc/special_remotes.mdwn b/doc/special_remotes.mdwn
index 6c33b5268..96cc7790c 100644
--- a/doc/special_remotes.mdwn
+++ b/doc/special_remotes.mdwn
@@ -26,6 +26,7 @@ for various cloud things:
* [[tips/Internet_Archive_via_S3]]
* [[tahoe-lafs|forum/tips:_special__95__remotes__47__hook_with_tahoe-lafs]]
* [[tips/using_box.com_as_a_special_remote]]
+* [[tips/using_mega.co.nz_as_a_special_remote|tips/megaannex]]
* [[forum/special_remote_for_IMAP]]
* [[forum/nntp__47__usenet special remote]]
diff --git a/doc/tips/megaannex.mdwn b/doc/tips/megaannex.mdwn
new file mode 100644
index 000000000..96f6f8a52
--- /dev/null
+++ b/doc/tips/megaannex.mdwn
@@ -0,0 +1,45 @@
+[Megaannex](https://github.com/TobiasTheViking/megaannex)
+is a hook program for git-annex to use mega.co.nz as backend
+
+# Requirements:
+
+ requests>=0.10
+ pycrypto
+
+Credit for the mega api interface goes to:
+<https://github.com/richardasaurus/mega.py>
+
+## Install
+
+Clone the git repository in your home folder.
+
+ git clone git://github.com/TobiasTheViking/megaannex.git
+
+This should make a ~/megannex folder
+
+## Setup
+
+Run the program once to make an empty config file.
+
+ cd ~/megaannex; python2 megaannex.py
+
+Edit the megaannex.conf file. Add your mega.co.nz username and password
+
+Note: The folder option in the megaannex.conf file isn't yet used.
+
+## Configuring git-annex
+
+ git config annex.mega-store-hook 'python2 ~/megaannex/megaannex.py store --subject $ANNEX_KEY --file $ANNEX_FILE'
+ git config annex.mega-retrieve-hook 'python2 ~/megaannex/megaannex.py getfile --subject $ANNEX_KEY --file $ANNEX_FILE'
+ git config annex.mega-checkpresent-hook 'python2 ~/megaannex/megaannex.py fileexists --subject $ANNEX_KEY'
+ git config annex.mega-remove-hook 'python2 ~/megaannex/megaannex.py delete --subject $ANNEX_KEY'
+
+ git annex initremote mega type=hook hooktype=mega encryption=shared
+ git annex describe mega "the mega.co.nz library"
+
+## Notes
+
+You may need to use a different command than "python2", depending
+on your python installation.
+
+-- Tobias
diff --git a/doc/todo/wishlist:_special_remote_mega.co.nz.mdwn b/doc/todo/wishlist:_special_remote_mega.co.nz.mdwn
index 788a3a43f..41164084a 100644
--- a/doc/todo/wishlist:_special_remote_mega.co.nz.mdwn
+++ b/doc/todo/wishlist:_special_remote_mega.co.nz.mdwn
@@ -1 +1,3 @@
mega.co.nz has 50gb for free accounts. They also have an API, so I guess it wouldn't be too hard to use it as a special remote.
+
+[[done]], see [[tips/megaannex]].
diff --git a/git-annex.cabal b/git-annex.cabal
index 0652fb275..284cd73c7 100644
--- a/git-annex.cabal
+++ b/git-annex.cabal
@@ -1,5 +1,5 @@
Name: git-annex
-Version: 4.20130516
+Version: 4.20130521
Cabal-Version: >= 1.8
License: GPL
Maintainer: Joey Hess <joey@kitenet.net>