Commit graph

40 commits

Author SHA1 Message Date
Joey Hess
965e106f24 made parentDir return a Maybe FilePath; removed most uses of it
parentDir is less safe than takeDirectory, especially when working
with relative FilePaths. It's really only useful in loops that
want to terminate at /

This commit was sponsored by Audric SCHILTKNECHT.
2015-01-06 18:55:56 -04:00
Joey Hess
7e422269a6 move dummy uuids to Annex.UUID 2014-12-17 13:57:52 -04:00
Joey Hess
30bf112185 Urls can now be claimed by remotes. This will allow creating, for example, a external special remote that handles magnet: and *.torrent urls. 2014-12-08 19:15:07 -04:00
Joey Hess
1e59df083d Use haskell setenv library to clean up several ugly workarounds for inability to manipulate the environment on windows.
Didn't know that this library existed!

This includes making git-annex not re-exec itself on start on windows, and
making the test suite on Windows run tests without forking.
2014-10-15 20:33:52 -04:00
Joey Hess
7b50b3c057 fix some mixed space+tab indentation
This fixes all instances of " \t" in the code base. Most common case
seems to be after a "where" line; probably vim copied the two space layout
of that line.

Done as a background task while listening to episode 2 of the Type Theory
podcast.
2014-10-09 15:09:11 -04:00
Joey Hess
aebcc395ff use types to enforce that removeAnnex can only be called inside lockContent
This fixed one bug where it needed to be and wasn't (in Assistant.Unused).
And also found one place where lockContent was used unnecessarily (by
drop --from remote).

A few other places like uninit probably don't really need to lockContent,
but it doesn't hurt to do call it anyway.

This commit was sponsored by David Wagner.
2014-08-20 20:13:47 -04:00
Joey Hess
c4e718d1f5
missing import 2014-07-03 19:49:26 -04:00
Joey Hess
51d6ec6744
force a sane umask when making temp gpg home dir
Someone reported:

gpg: WARNING: unsafe permissions on homedir `/var/folders/m6/zkd11n111m38ff37zbtgq0lr0000gp/T/git-annex-gpg.tmp.0'

Just a warning, but let's fix it anyway. Preumably the user has one of the
many insane and delightful umasks users sometimes use to shoot themselves
in their feet.
2014-07-03 15:43:09 -04:00
Joey Hess
c6d690f350 include path in "Cannot find old distribution bundle; not upgrading" message 2014-05-21 13:27:40 -04:00
Joey Hess
ca496b6a97 Standalone builds now check gpg signatures before upgrading. 2014-04-23 13:30:30 -04:00
Joey Hess
1d3e60830d remove debug print 2014-01-17 15:09:03 -04:00
Joey Hess
215fe3c028 one more wrong dir 2013-11-25 14:52:04 -04:00
Joey Hess
ee3ff0e584 typo 2013-11-25 14:47:56 -04:00
Joey Hess
85a82957ea fix sanity check on OSX 2013-11-25 14:46:33 -04:00
Joey Hess
3b2468c824 path somehow wrong 2013-11-25 14:37:44 -04:00
Joey Hess
38a1259813 improve upgrade paths for OSX 2013-11-25 14:29:14 -04:00
Joey Hess
dabae084e8 fix hdiutil eject 2013-11-25 14:01:41 -04:00
Joey Hess
2398f0983d fix hdiutil mount 2013-11-25 13:53:28 -04:00
Joey Hess
6ee56ce685 move sanity check 2013-11-25 13:46:24 -04:00
Joey Hess
dfdffecacf typo 2013-11-25 13:28:52 -04:00
Joey Hess
e21019eac1 only copy git-annex.app directory
The .Trashes directory is not readable.
2013-11-25 13:24:36 -04:00
Joey Hess
88991c4eb2 fix copying of files from mounted dmg 2013-11-25 13:15:27 -04:00
Joey Hess
a9f2785b86 fix hdutil syntax 2013-11-25 13:10:45 -04:00
Joey Hess
dd7310bcfa osx build fix 2013-11-24 16:08:52 -04:00
Joey Hess
5e470957c6 fix osx build 2013-11-24 16:04:12 -04:00
Joey Hess
f913deab78 move programPath out of Config.Files to Annex.Path
This works around horribleness in the Mavericks cpp, which falls over on
the #if when configure is running. Moving it avoids the file being built at
that point.

But it's also a location that makes sense..
2013-11-24 16:03:03 -04:00
Joey Hess
399ef340f3 completely untested OSX upgrade code 2013-11-24 15:53:15 -04:00
Joey Hess
95feec24d1 create directory for upgraded versio early as a locking mechanism 2013-11-24 15:03:50 -04:00
Joey Hess
5ff5d0a854 cleanup on failed upgrade 2013-11-24 14:04:03 -04:00
Joey Hess
f04786f984 recusive rmdir 2013-11-24 12:56:49 -04:00
Joey Hess
b59998f73d better handling of upgrade directory 2013-11-24 12:49:03 -04:00
Joey Hess
4776e1d7b7 use manifest file instead of blindly removing the whole git-annex.linux directory
FIXME: dirContentsRecursive does not find empty directories
2013-11-24 01:41:13 -04:00
Joey Hess
fead2941cd linux upgrade code debugged and working 2013-11-24 00:26:20 -04:00
Joey Hess
fdc10b9436 completely untested linux upgrade code 2013-11-23 23:45:49 -04:00
Joey Hess
fda641d27b improve android upgrade interface
and refactor
2013-11-23 22:12:36 -04:00
Joey Hess
e563c7e6f4 fsck distribution key 2013-11-23 21:58:39 -04:00
Joey Hess
b1a89c448a replace horrible old daemon restart code with new method 2013-11-23 15:50:17 -04:00
Joey Hess
183f7355cd global webapp redirects, to finish upgrades
When an automatic upgrade completes, or when the user clicks on the upgrade
button in one webapp, but also has it open in another browser window/tab,
we have a problem: The current web server is going to stop running in
minutes, but there is no way to send a redirect to the web browser to the
new url.

To solve this, used long polling, so the webapp is always listening for
urls it should redirect to. This allows globally redirecting every open
webapp. Works great! Tested with 2 web browsers with 2 tabs each.
May be useful for other purposes later too, dunno.

The overhead is 2 http requests per page load in the webapp. Due to yesod's
speed, this does not seem to noticibly delay it. Only 1 of the requests
could possibly block the page load, the other is async.
2013-11-23 14:47:38 -04:00
Joey Hess
d24f7f94fe better UI flow through upgrade process
Move button to enable automatic upgrades to an alert displayed after
successful upgrade. Unclutters the UI and makes psychological sense.
2013-11-23 13:27:52 -04:00
Joey Hess
6abaf19c41 restart on upgrade is working, including automatic restart
Made alerts be able to have multiple buttons, so the alerts about upgrading
can have a button that enables automatic upgrades.

Implemented automatic upgrading when the program file has changed.

Note that when an automatic upgrade happens, the webapp displays an alert
about it for a few minutes, and then closes. This still needs work.
2013-11-23 00:54:08 -04:00