Commit graph

13 commits

Author SHA1 Message Date
Joey Hess
f7cdc40f7b reorg 2014-01-21 18:08:56 -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
766c31c95c watch git-annex program file to detect upgrades
Not yet wired up to restart the assistant on upgrade; that needs careful
sanity checking to wait until the upgrade is done before restarting.

Used the DirWatcher here, so it gets events for any changes to the
directory containing the program file. (But not subdirs.) This is necessary
in order to detect when the file is renamed as part of the upgrade, which
an inotify on a single file would not detect. (Also, I have DirWatcher code,
but not FileWatcher code.)

Note that upgrades that remove or rename a whole directory tree containing
the executable will *not* trigger this code. So eg, deleting and replacing
the whole standalone tarball dir tree won't work -- but untarring it
over top will. So should dpkg package upgrades.

Added programPath, using a new GHC feature to find the full path to the
executable. The fallback code for old GHC or unsupported OS is less good;
its worst failure mode would be either failing to find the program, and so
not checking for upgrades, or finding a git-annex that's in PATH, but is
not the one running.

This commit was sponsored by John Roepke.
2013-11-22 18:46:45 -04:00
Joey Hess
b405295aee hlint
test suite still passes
2013-09-25 03:09:06 -04:00
Joey Hess
680d3b5120 webapp: When the user switches to display a different repository, that repository becomes the default repository to be displayed next time the webapp gets started. 2013-06-11 00:06:06 -04:00
Joey Hess
e0327eaafc Detect bad content in ~/.config/git-annex/program and look in PATH instead. 2013-05-20 17:42:40 -04:00
Joey Hess
25a8d4b11c rename module 2013-05-12 19:19:28 -04:00
Joey Hess
834ce10ced better autostart file modification
As well as just being nicer, and less code, this uses nubBy equalFilePath
to ensure that the autostart file never gets dups.

Also, removing from the file no longer needs to be a perfect string match;
it also uses equalFilePath.
2013-04-23 12:36:37 -04:00
Joey Hess
f3ef6fe6a7 strip newlines in programfile
Indeed, ignore lines after the first.

Use might create it with echo..
2013-04-23 11:41:52 -04:00
Joey Hess
2c42e70f6c rename module 2013-04-23 11:38:52 -04:00
Joey Hess
69cc8e83ce minor robustness fixes in repo cost reordering code 2013-03-18 13:13:33 -04:00
Joey Hess
e0e01ee671 better costBetween; avoid unnecessary fractional values 2013-03-14 08:59:35 -04:00
Joey Hess
19c0a0d5b1 split cost out into its own module
Added a function to insert a new cost into a list, which could be used to
asjust costs after a drag and drop.
2013-03-13 16:30:34 -04:00