From d04e023dedd665ab615b9a9a47c7408099985b07 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 5 Aug 2012 17:06:35 -0400 Subject: blog for the weekend --- .../blog/day_54__adding_removable_drives.mdwn | 99 ++++++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 doc/design/assistant/blog/day_54__adding_removable_drives.mdwn diff --git a/doc/design/assistant/blog/day_54__adding_removable_drives.mdwn b/doc/design/assistant/blog/day_54__adding_removable_drives.mdwn new file mode 100644 index 000000000..8d57518bb --- /dev/null +++ b/doc/design/assistant/blog/day_54__adding_removable_drives.mdwn @@ -0,0 +1,99 @@ +Spent yesterday and today making the WebApp handle adding removable drives. + +While it needs more testing, I think that it's now possible to use the WebApp +for a complete sneakernet usage scenario. + +* Start up the webapp, let it make a local repo. +* Add some files, by clicking to open the file manager, and dragging them in. +* Plug in a drive, and tell the webapp to add it. +* Wait while files sync.. +* Take the drive to another computer, and repeat the process there. + +No command-line needed, and files will automatically be synced between +two or more computers using the drive. + +Sneakernet is only one usage scenario for the git-annex assistant, but I'm +really happy to have one scenario 100% working! + +Indeed, since the assistant and webapp can now actually do something +useful, I'll probably be merging them into `master` soon. + +Details follow.. + +--- + +So, yesterday's part of this was building the configuration page to add +a removable drive. That needs to be as simple as possible, and it currently +consists of a list of things git-annex thinks might be mount points of +removable drives, along with how much free space they have. Pick a drive, +click the pretty button, and away it goes.. + +(I decided to make the page so simple it doesn't even ask where you want +to put the directory on the removable drive. It always puts it in +a "annex" directory. I might add an expert screen later, but experts can +always set this up themselves at the command line too.) + +I also fought with Yesod and Bootstrap rather a lot to make the form look good. +Didn't entirely succeed, and had to file a bug on Yesod about its handling of +check boxes. (Bootstrap also has a bug, IMHO; its drop down lists are not +always sized wide enough for their contents.) + +Ideally this configuration page would listen for mount events, and refresh +its list. I may add that eventually; I didn't have a handy channel it +could use to do that, so defferred it. Another idea is to have the mount +event listener detect removable drives that don't have an annex on them yet, +and pop up an alert with a link to this configuration page. + +---- + +Making the form led to a somewhat interesting problem: How to tell if a mounted +filesystem is a removable drive, or some random thing like `/proc` or +a fuse filesystem. My answer, besides checking that the user can +write to it, was various heuristics, which seem to work ok, at least here.. + +[[!format haskell """ + sane Mntent { mnt_dir = dir, mnt_fsname = dev } + {- We want real disks like /dev/foo, not + - dummy mount points like proc or tmpfs or + - gvfs-fuse-daemon. -} + | not ('/' `elem` dev) = False + {- Just in case: These mount points are surely not + - removable disks. -} + | dir == "/" = False + | dir == "/tmp" = False + | dir == "/run/shm" = False + | dir == "/run/lock" = False +"""]] + +---- + +Today I did all the gritty coding to make it create a git repository on the +removable drive, and tell the Annex monad about it, and ensure it gets synced. + +As part of that, it detects when the removable drive's filesystem doesn't +support symlinks, and makes a bare repository in that case. Another expert +level config option that's left out for now is to always make a bare +repository, or even to make a directory special remote rather than a git +repository at all. (But directory special remotes cannot support the +sneakernet use case by themselves...) + +---- + +Another somewhat interesting problem was what to call the git remotes +that it sets up on the removable drive and the local repository. +Again this could have an expert-level configuration, but the defaults +I chose are to use the hostname as the remote name on the removable drive, +and to use the basename of the mount point of the removable drive as the +remote name in the local annex. + +---- + +Originally, I had thought of this as cloning the repository to the drive. +But, partly due to luck, I started out just doing a `git init` to make +the repository (I had a function lying around to do that..). + +And as I worked on it some more, I realized this is not as simple as a +clone. It's a bi-directional sync/merge, and indeed the removable drive may +have all the data already in it, and the local repository have just been +created. Handling all the edge cases of that (like, the local repository +may not have a "master" branch yet..) was fun! -- cgit v1.2.3 From e3f4abba408e5c6632df864f482f66b33bb66ff8 Mon Sep 17 00:00:00 2001 From: "https://www.google.com/accounts/o8/id?id=AItOawl9sYlePmv1xK-VvjBdN-5doOa_Xw-jH4U" Date: Sun, 5 Aug 2012 23:50:57 +0000 Subject: Added a comment --- .../comment_1_5de4f220a3534f55b1f2208d1d812d63._comment | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 doc/design/assistant/blog/day_54__adding_removable_drives/comment_1_5de4f220a3534f55b1f2208d1d812d63._comment diff --git a/doc/design/assistant/blog/day_54__adding_removable_drives/comment_1_5de4f220a3534f55b1f2208d1d812d63._comment b/doc/design/assistant/blog/day_54__adding_removable_drives/comment_1_5de4f220a3534f55b1f2208d1d812d63._comment new file mode 100644 index 000000000..56f513a38 --- /dev/null +++ b/doc/design/assistant/blog/day_54__adding_removable_drives/comment_1_5de4f220a3534f55b1f2208d1d812d63._comment @@ -0,0 +1,10 @@ +[[!comment format=mdwn + username="https://www.google.com/accounts/o8/id?id=AItOawl9sYlePmv1xK-VvjBdN-5doOa_Xw-jH4U" + nickname="Richard" + subject="comment 1" + date="2012-08-05T23:50:57Z" + content=""" +Using `annex` as default is fine, but even non-technical users will need a way to create different annexes for different usage. Or if two users share one thumb drive and each has their own annex. Long story short, I don't think this is an expert option, but something every user should be able to change immediately. + +A pre-populated text area makes most sense, imo. +"""]] -- cgit v1.2.3 From 34522c1fd8e88c82a6ae06166d1e8107e2f00597 Mon Sep 17 00:00:00 2001 From: "http://dieter-be.myopenid.com/" Date: Mon, 6 Aug 2012 08:30:47 +0000 Subject: Added a comment --- .../comment_2_8dae1ed0a70acf9628b88692dc32ac5f._comment | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 doc/design/assistant/blog/day_54__adding_removable_drives/comment_2_8dae1ed0a70acf9628b88692dc32ac5f._comment diff --git a/doc/design/assistant/blog/day_54__adding_removable_drives/comment_2_8dae1ed0a70acf9628b88692dc32ac5f._comment b/doc/design/assistant/blog/day_54__adding_removable_drives/comment_2_8dae1ed0a70acf9628b88692dc32ac5f._comment new file mode 100644 index 000000000..b26d9b85f --- /dev/null +++ b/doc/design/assistant/blog/day_54__adding_removable_drives/comment_2_8dae1ed0a70acf9628b88692dc32ac5f._comment @@ -0,0 +1,10 @@ +[[!comment format=mdwn + username="http://dieter-be.myopenid.com/" + nickname="dieter" + subject="comment 2" + date="2012-08-06T08:30:47Z" + content=""" ++1 on what Richard said +about the correctly figuring out what are valid mountpoints / devices that can be used, your current code doesn't seem very robust. +check this out https://github.com/Dieterbe/aif/blob/develop/src/core/libs/lib-blockdevices-filesystems.sh#L213 +"""]] -- cgit v1.2.3 From 28d9ba18d64286f79ce1c1483681c6822c21f648 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 6 Aug 2012 18:50:10 -0400 Subject: blog for the day --- doc/design/assistant/blog/day_55__alerts.mdwn | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 doc/design/assistant/blog/day_55__alerts.mdwn diff --git a/doc/design/assistant/blog/day_55__alerts.mdwn b/doc/design/assistant/blog/day_55__alerts.mdwn new file mode 100644 index 000000000..95e52e8ad --- /dev/null +++ b/doc/design/assistant/blog/day_55__alerts.mdwn @@ -0,0 +1,10 @@ +Nothing flashy today; I was up all night trying to download photos taken +by a robot lowered onto Mars by a skycrane. + +Some work on alerts. Added an alert when a file transfer succeeds or fails. +Improved the alert combining code so it handles those alerts, and +simplified it a lot, and made it more efficient. + +Also made the text of action alerts change from present to past tense when +the action finishes. To support that I wrote a fun data type, a `TenseString` +that can be rendered in either tense. -- cgit v1.2.3 From 4037c7f82807c15a46cb7a9298e3fd9f674ef16b Mon Sep 17 00:00:00 2001 From: "https://www.google.com/accounts/o8/id?id=AItOawlJ2utMQgMEYAOs3Dfc6eZRyUzt4acNXUU" Date: Mon, 6 Aug 2012 23:48:28 +0000 Subject: Added a comment --- .../comment_1_6319045500a8a5e049304fdec5ff4cf4._comment | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 doc/design/assistant/blog/day_55__alerts/comment_1_6319045500a8a5e049304fdec5ff4cf4._comment diff --git a/doc/design/assistant/blog/day_55__alerts/comment_1_6319045500a8a5e049304fdec5ff4cf4._comment b/doc/design/assistant/blog/day_55__alerts/comment_1_6319045500a8a5e049304fdec5ff4cf4._comment new file mode 100644 index 000000000..67259bf1e --- /dev/null +++ b/doc/design/assistant/blog/day_55__alerts/comment_1_6319045500a8a5e049304fdec5ff4cf4._comment @@ -0,0 +1,8 @@ +[[!comment format=mdwn + username="https://www.google.com/accounts/o8/id?id=AItOawlJ2utMQgMEYAOs3Dfc6eZRyUzt4acNXUU" + nickname="David" + subject="comment 1" + date="2012-08-06T23:48:28Z" + content=""" +I see you are a regular XKCD reader +"""]] -- cgit v1.2.3 From 0a857248f46a8f332c8a4247a340638e292efd5e Mon Sep 17 00:00:00 2001 From: "https://www.google.com/accounts/o8/id?id=AItOawlCGROoy62svBUy6P24x1KoGoDWrBq2ErA" Date: Tue, 7 Aug 2012 04:15:43 +0000 Subject: Added a comment --- .../comment_1_f4b829318b182e1cec29f13babb6498e._comment | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 doc/design/assistant/windows/comment_1_f4b829318b182e1cec29f13babb6498e._comment diff --git a/doc/design/assistant/windows/comment_1_f4b829318b182e1cec29f13babb6498e._comment b/doc/design/assistant/windows/comment_1_f4b829318b182e1cec29f13babb6498e._comment new file mode 100644 index 000000000..0bccc3a35 --- /dev/null +++ b/doc/design/assistant/windows/comment_1_f4b829318b182e1cec29f13babb6498e._comment @@ -0,0 +1,10 @@ +[[!comment format=mdwn + username="https://www.google.com/accounts/o8/id?id=AItOawlCGROoy62svBUy6P24x1KoGoDWrBq2ErA" + nickname="Steve" + subject="comment 1" + date="2012-08-07T04:15:43Z" + content=""" +NTFS symbolic links should do exactly what you would expect them to do. They can point to files or directories. Junction points are legacy NTFS functionality and reparse points are more like the POSIX mount functionality. + +NTFS symbolic links should work for you, junction point should be avoided, and reparse points would be like using a nuke to kill a fly. The only hang up you might have is that I think all three features require elevated privileges to manage. +"""]] -- cgit v1.2.3 From bde42b60dc582e287e5ec04c06567dfaee35a9ac Mon Sep 17 00:00:00 2001 From: "https://www.google.com/accounts/o8/id?id=AItOawnnIQkoUQo4RYzjUNyiB3v6yJ5aR41WG8k" Date: Tue, 7 Aug 2012 06:46:47 +0000 Subject: Added a comment: Updated install instructions with homebrew --- .../comment_3_733147cebe501c60f2141b711f1d7f24._comment | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 doc/install/OSX/comment_3_733147cebe501c60f2141b711f1d7f24._comment diff --git a/doc/install/OSX/comment_3_733147cebe501c60f2141b711f1d7f24._comment b/doc/install/OSX/comment_3_733147cebe501c60f2141b711f1d7f24._comment new file mode 100644 index 000000000..51e667ab6 --- /dev/null +++ b/doc/install/OSX/comment_3_733147cebe501c60f2141b711f1d7f24._comment @@ -0,0 +1,16 @@ +[[!comment format=mdwn + username="https://www.google.com/accounts/o8/id?id=AItOawnnIQkoUQo4RYzjUNyiB3v6yJ5aR41WG8k" + nickname="Markus" + subject="Updated install instructions with homebrew" + date="2012-08-07T06:46:47Z" + content=""" +To install git annex with homebrew simply do: + + brew update + brew install haskell-platform git ossp-uuid md5sha1sum coreutils pcre + cabal install git-annex + +Then link the binary to your `PATH` e.g. with + + ln -s ~/.cabal/bin/git-annex* /usr/local/bin/ +"""]] -- cgit v1.2.3 From 921c9e7bc99153c9702756553e9061d32cee2ce5 Mon Sep 17 00:00:00 2001 From: hannes Date: Tue, 7 Aug 2012 12:13:24 +0000 Subject: --- ...m___40__gpg-encrypted__41___rsync_remote_on_MacOSX.mdwn | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 doc/forum/cannot_fetch_from___40__gpg-encrypted__41___rsync_remote_on_MacOSX.mdwn diff --git a/doc/forum/cannot_fetch_from___40__gpg-encrypted__41___rsync_remote_on_MacOSX.mdwn b/doc/forum/cannot_fetch_from___40__gpg-encrypted__41___rsync_remote_on_MacOSX.mdwn new file mode 100644 index 000000000..648d24ea4 --- /dev/null +++ b/doc/forum/cannot_fetch_from___40__gpg-encrypted__41___rsync_remote_on_MacOSX.mdwn @@ -0,0 +1,14 @@ +I have a remote rsync with gpg encryption and can restore without problems on my thinkpad (FreeBSD) - but not on my MacOSX: + +$ git annex whereis DSC_7615.JPG +whereis DSC_7615.JPG (2 copies) + 6855de17-c8fb-11e1-9948-f0def1c18073 -- thinkpad + e388bcf6-c8fc-11e1-a96f-6ffcbceb4af4 -- backup (rsync xxxx) +ok + +$ git annex get --from backup DSC_7615.JPG +fatal: Could not switch to '../../../.git/annex/objects/Pw/XP/SHA256-s1028494--SHA256': No such file or directory + +git-annex: : hGetLine: end of file +failed +git-annex: get: 1 failed -- cgit v1.2.3 From 9c43aa337ffab5ffb23a08371929d1667b3715d7 Mon Sep 17 00:00:00 2001 From: hannes Date: Tue, 7 Aug 2012 12:27:37 +0000 Subject: --- ...t_fetch_from___40__gpg-encrypted__41___rsync_remote_on_MacOSX.mdwn | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/forum/cannot_fetch_from___40__gpg-encrypted__41___rsync_remote_on_MacOSX.mdwn b/doc/forum/cannot_fetch_from___40__gpg-encrypted__41___rsync_remote_on_MacOSX.mdwn index 648d24ea4..59ca2e9fc 100644 --- a/doc/forum/cannot_fetch_from___40__gpg-encrypted__41___rsync_remote_on_MacOSX.mdwn +++ b/doc/forum/cannot_fetch_from___40__gpg-encrypted__41___rsync_remote_on_MacOSX.mdwn @@ -12,3 +12,7 @@ fatal: Could not switch to '../../../.git/annex/objects/Pw/XP/SHA256-s1028494--S git-annex: : hGetLine: end of file failed git-annex: get: 1 failed + +$ git annex version +git-annex version: 3.20120629 +local repository version: 3 -- cgit v1.2.3 From 60e6575252920d78dabeaa30bd2ed6e4e0dca307 Mon Sep 17 00:00:00 2001 From: "https://www.google.com/accounts/o8/id?id=AItOawmBUR4O9mofxVbpb8JV9mEbVfIYv670uJo" Date: Tue, 7 Aug 2012 13:11:48 +0000 Subject: Added a comment --- .../comment_1_21f0101447623f5a0cf9e72c3ff463bb._comment | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 doc/forum/cannot_fetch_from___40__gpg-encrypted__41___rsync_remote_on_MacOSX/comment_1_21f0101447623f5a0cf9e72c3ff463bb._comment diff --git a/doc/forum/cannot_fetch_from___40__gpg-encrypted__41___rsync_remote_on_MacOSX/comment_1_21f0101447623f5a0cf9e72c3ff463bb._comment b/doc/forum/cannot_fetch_from___40__gpg-encrypted__41___rsync_remote_on_MacOSX/comment_1_21f0101447623f5a0cf9e72c3ff463bb._comment new file mode 100644 index 000000000..c6c962c40 --- /dev/null +++ b/doc/forum/cannot_fetch_from___40__gpg-encrypted__41___rsync_remote_on_MacOSX/comment_1_21f0101447623f5a0cf9e72c3ff463bb._comment @@ -0,0 +1,8 @@ +[[!comment format=mdwn + username="https://www.google.com/accounts/o8/id?id=AItOawmBUR4O9mofxVbpb8JV9mEbVfIYv670uJo" + nickname="Justin" + subject="comment 1" + date="2012-08-07T13:11:48Z" + content=""" +Do the remotes in `.git/config` look the same? +"""]] -- cgit v1.2.3 From 46f75bf092a021abf45adb0a3b264ffdf646fd25 Mon Sep 17 00:00:00 2001 From: hannes Date: Tue, 7 Aug 2012 14:06:56 +0000 Subject: Added a comment: they do --- .../comment_2_6234ca64bd03a0e15efbe8f5c204338a._comment | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 doc/forum/cannot_fetch_from___40__gpg-encrypted__41___rsync_remote_on_MacOSX/comment_2_6234ca64bd03a0e15efbe8f5c204338a._comment diff --git a/doc/forum/cannot_fetch_from___40__gpg-encrypted__41___rsync_remote_on_MacOSX/comment_2_6234ca64bd03a0e15efbe8f5c204338a._comment b/doc/forum/cannot_fetch_from___40__gpg-encrypted__41___rsync_remote_on_MacOSX/comment_2_6234ca64bd03a0e15efbe8f5c204338a._comment new file mode 100644 index 000000000..5ae18235b --- /dev/null +++ b/doc/forum/cannot_fetch_from___40__gpg-encrypted__41___rsync_remote_on_MacOSX/comment_2_6234ca64bd03a0e15efbe8f5c204338a._comment @@ -0,0 +1,8 @@ +[[!comment format=mdwn + username="hannes" + ip="130.226.133.37" + subject="they do" + date="2012-08-07T14:06:55Z" + content=""" +I was also able to copy from the macosx to the rsync backup... +"""]] -- cgit v1.2.3 From a0516946ea56ee3ebcce6df0a1c709fc5bae3dc4 Mon Sep 17 00:00:00 2001 From: hannes Date: Tue, 7 Aug 2012 14:12:20 +0000 Subject: Added a comment: also, fsck works --- .../comment_3_5ac2b520a907e232984eb513ce088054._comment | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 doc/forum/cannot_fetch_from___40__gpg-encrypted__41___rsync_remote_on_MacOSX/comment_3_5ac2b520a907e232984eb513ce088054._comment diff --git a/doc/forum/cannot_fetch_from___40__gpg-encrypted__41___rsync_remote_on_MacOSX/comment_3_5ac2b520a907e232984eb513ce088054._comment b/doc/forum/cannot_fetch_from___40__gpg-encrypted__41___rsync_remote_on_MacOSX/comment_3_5ac2b520a907e232984eb513ce088054._comment new file mode 100644 index 000000000..d80a01a0b --- /dev/null +++ b/doc/forum/cannot_fetch_from___40__gpg-encrypted__41___rsync_remote_on_MacOSX/comment_3_5ac2b520a907e232984eb513ce088054._comment @@ -0,0 +1,8 @@ +[[!comment format=mdwn + username="hannes" + ip="130.226.133.37" + subject="also, fsck works" + date="2012-08-07T14:12:20Z" + content=""" +git annex fsck -fbackup some-local-and-remote-file works fine. +"""]] -- cgit v1.2.3 From 96d0a36f8589ef1ee4f23adaae7ea512adb7a617 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 7 Aug 2012 11:10:41 -0400 Subject: move comment --- Utility/DataUnits.hs | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/Utility/DataUnits.hs b/Utility/DataUnits.hs index 5d80a04b9..101d64c5a 100644 --- a/Utility/DataUnits.hs +++ b/Utility/DataUnits.hs @@ -3,30 +3,9 @@ - Copyright 2011 Joey Hess - - Licensed under the GNU GPL version 3 or higher. - -} - -module Utility.DataUnits ( - dataUnits, - storageUnits, - memoryUnits, - bandwidthUnits, - oldSchoolUnits, - - roughSize, - compareSizes, - readSize -) where - -import Data.List -import Data.Char - -type ByteSize = Integer -type Name = String -type Abbrev = String -data Unit = Unit ByteSize Abbrev Name - deriving (Ord, Show, Eq) - -{- And now a rant: + - + - + - And now a rant: - - In the beginning, we had powers of two, and they were good. - @@ -56,6 +35,27 @@ data Unit = Unit ByteSize Abbrev Name - progress? -} +module Utility.DataUnits ( + dataUnits, + storageUnits, + memoryUnits, + bandwidthUnits, + oldSchoolUnits, + + roughSize, + compareSizes, + readSize +) where + +import Data.List +import Data.Char + +type ByteSize = Integer +type Name = String +type Abbrev = String +data Unit = Unit ByteSize Abbrev Name + deriving (Ord, Show, Eq) + dataUnits :: [Unit] dataUnits = storageUnits ++ memoryUnits -- cgit v1.2.3 From 2a9077f4e92b588200eafcda4d485e95998917a2 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 7 Aug 2012 13:27:50 -0400 Subject: fix transfer log cleanup crash Avoid crashing when "git annex get" fails to download from one location, and falls back to downloading from a second location. The problem is that git annex get calls download recursively from within itself if the first download attempt fails. So the first time through, it writes a transfer info file, which is then overwritten on the second, recursive call. Then on cleanup, it tries to delete the file twice, which of course doesn't work. Fixed both by not crashing if the transfer file is removed, and by changing Get to not run download recursively like that. It's the only thing that did so, and it just seems like a bad idea. --- Command/Get.hs | 9 +++++---- Logs/Transfer.hs | 4 ++-- debian/changelog | 2 ++ git-annex.cabal | 2 +- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/Command/Get.hs b/Command/Get.hs index 95a7040bb..18153ce88 100644 --- a/Command/Get.hs +++ b/Command/Get.hs @@ -65,7 +65,8 @@ getKeyFile key file dest = dispatch =<< Remote.keyPossibilities key | Remote.hasKeyCheap r = either (const False) id <$> Remote.hasKey r key | otherwise = return True - docopy r continue = download (Remote.uuid r) key (Just file) $ do - showAction $ "from " ++ Remote.name r - ifM (Remote.retrieveKeyFile r key (Just file) dest) - ( return True , continue) + docopy r continue = do + ok <- download (Remote.uuid r) key (Just file) $ do + showAction $ "from " ++ Remote.name r + Remote.retrieveKeyFile r key (Just file) dest + if ok then return ok else continue diff --git a/Logs/Transfer.hs b/Logs/Transfer.hs index b6962262d..e7f35ccb7 100644 --- a/Logs/Transfer.hs +++ b/Logs/Transfer.hs @@ -98,8 +98,8 @@ transfer t file a = do writeFile tfile $ writeTransferInfo info return fd cleanup tfile fd = do - removeFile tfile - removeFile $ transferLockFile tfile + void $ tryIO $ removeFile tfile + void $ tryIO $ removeFile $ transferLockFile tfile closeFd fd {- If a transfer is still running, returns its TransferInfo. -} diff --git a/debian/changelog b/debian/changelog index 9b2ff3f14..f24326dd2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,8 @@ 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. + * Avoid crashing when "git annex get" fails to download from one + location, and falls back to downloading from a second location. -- Joey Hess Fri, 27 Jul 2012 21:04:47 -0400 diff --git a/git-annex.cabal b/git-annex.cabal index 15ac1e3d5..275388d59 100644 --- a/git-annex.cabal +++ b/git-annex.cabal @@ -1,5 +1,5 @@ Name: git-annex -Version: 3.20120721 +Version: 3.20120722 Cabal-Version: >= 1.8 License: GPL Maintainer: Joey Hess -- cgit v1.2.3