summaryrefslogtreecommitdiff
path: root/Assistant.hs
Commit message (Collapse)AuthorAge
* unused import on windowsGravatar Joey Hess2015-04-20
|
* fix windows buildGravatar Joey Hess2015-03-16
|
* When re-execing git-annex, use current program location, rather than ↵Gravatar Joey Hess2015-02-28
| | | | | | | | | | | | | | | | | | ~/.config/git-annex/program, when possible. Most of the time, there will be no discreprancy between programPath and readProgramFile. But, the programFile might have been written by an old version of git-annex that is still installed, while a newer one is currently running. In this case, we want to run the same one that's currently running. This is especially important for things like the GIT_SSH=git-annex used for ssh connection caching. The only code that still uses readProgramFile directly is the upgrade code, which needs to know where the standalone git-annex was installed, in order to upgrade it.
* commentGravatar Joey Hess2015-02-09
|
* update my email address and homepage urlGravatar Joey Hess2015-01-21
|
* revert parentDir changeGravatar Joey Hess2015-01-09
| | | | | | | | Reverts 2bba5bc22d049272d3328bfa6c452d3e2e50e86c Unfortunately, this caused breakage on Windows, and possibly elsewhere, because parentDir and takeDirectory do not behave the same when there is a trailing directory separator.
* made parentDir return a Maybe FilePath; removed most uses of itGravatar Joey Hess2015-01-06
| | | | | | | | 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.
* hlintGravatar Joey Hess2014-10-09
|
* fix some mixed space+tab indentationGravatar Joey Hess2014-10-09
| | | | | | | | | 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.
* missing liftGravatar Joey Hess2014-07-16
|
* always debug where logging to on startupGravatar Joey Hess2014-07-16
|
* Windows: Fix locking issue that prevented the webapp starting (since ↵Gravatar Joey Hess2014-07-14
| | | | | | | | 5.20140707). Reversion introduced in 89c188fac37c20c40b0a9dabeb35403cfa4e4f52. The locking code was wrong; the webapp re-ran itself, saw pid was locked, and so didn't start!
* Windows: Assistant now logs to daemon.log.Gravatar Joey Hess2014-06-17
| | | | | | | Yes, this means that git annex webapp on windows execs git-annex, which execs itself to set env, and the execs itself again to redirect logs. This is disgusting. This is Windows(TM).
* setsid when running webapp in foreground tooGravatar Joey Hess2014-05-14
| | | | | | | | This avoids ssh prompting for passwords on stdin, ever. It may also change other behavior of other programs, as there is no controlling terminal now. However, setsid was already done when running the assistant in daemon mode, so any behavior changes should not be really new.
* assistant: Now detects immediately when other repositories push changes toGravatar Joey Hess2014-04-08
| | | | | | | | | | | | a ssh remote, and pulls. XMPP is no longer needed in this configuration! Requires the remote server have git-annex-shell with notifychanges support. (untested) This commit was sponsored by Geog Wechslberger.
* warn when various build flags are unsetGravatar Joey Hess2014-03-07
|
* annex.listen can be configured, instead of using --listenGravatar Joey Hess2014-03-01
|
* fix all remaining -Wall warnings on WindowsGravatar Joey Hess2014-02-25
|
* windows: Fix process termination code.Gravatar Joey Hess2014-02-13
| | | | | | | | | | | The ctrl-c hack used before didn't actually seem to work. No haskell libraries expose TerminateProcess. I tried just calling it via FFI, but got segfaults, probably to do with the wacky process handle not being managed correctly. Moving it all into one C function worked. This was hell. The EvilLinker hack was just final icing on the cake. We all know what the cake was made of.
* assistant unused file handlingGravatar Joey Hess2014-01-22
| | | | | | | | | | | | | | | | | | | Make sanity checker run git annex unused daily, and queue up transfers of unused files to any remotes that will have them. The transfer retrying code works for us here, so eg when a backup disk remote is plugged in, any transfers to it are done. Once the unused files reach a remote, they'll be removed locally as unwanted. If the setup does not cause unused files to go to a remote, they'll pile up, and the sanity checker detects this using some heuristics that are pretty good -- 1000 unused files, or 10% of disk used by unused files, or more disk wasted by unused files than is left free. Once it detects this, it pops up an alert in the webapp, with a button to take action. TODO: Webapp UI to configure this, and also the ability to launch an immediate cleanup of all unused files. This commit was sponsored by Simon Michael.
* add support for fully automatic upgradesGravatar Joey Hess2013-11-24
| | | | | | | | | The Upgrader avoids checking for upgrades on startup when it was just upgraded. This avoids an upgrade loop if something goes wrong. One example of something going wrong would be if the upgrade info file and the distribution file get out of sync (or the distribution file is cached in a proxy), so it thinks it has upgraded to a new version, but has really not.
* assistant restart on upgradeGravatar Joey Hess2013-11-22
|
* watch git-annex program file to detect upgradesGravatar Joey Hess2013-11-22
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* upgrade alertsGravatar Joey Hess2013-11-21
| | | | | | | | | | | | | | | | | | The webapp will check twice a day, when the network is connected, to see if it can download a distributon upgrade file. If a newer version is found, display an upgrade alert. This will need the autobuilders to set UPGRADE_LOCATION to the url it can be downloaded from when building git-annex. Only builds with that set need automatic upgrade alerts. Currently, the upgrade page just requests the user manually download and upgrade it. But, all the info is provided to do automated upgrades in the future. Note that urls used will need to all be https. This commit was sponsored by Dirk Kraft.
* webapp: Check annex.version.Gravatar Joey Hess2013-11-17
|
* ensure .git/annex exists before opening log file when starting assistantGravatar Joey Hess2013-11-13
|
* no openLog on windowsGravatar Joey Hess2013-11-12
|
* build assistant and watcher on windows (doesn't work yet)Gravatar Joey Hess2013-11-12
|
* webapp: remind user when using repositories that lack consistency checksGravatar Joey Hess2013-10-29
| | | | | | | | | | When starting up the assistant, it'll remind about the current repository, if it doesn't have checks. And when a removable drive is plugged in, it will remind if a repository on it lacks checks. Since that might be annoying, the reminders can be turned off. This commit was sponsored by Nedialko Andreev.
* add post-repair actionsGravatar Joey Hess2013-10-29
|
* move code around and rename thread; no functional changesGravatar Joey Hess2013-10-29
|
* automatically launch git repository repairGravatar Joey Hess2013-10-27
| | | | | | | | | | | | | | | | | | Added a RemoteChecker thread, that waits for problems to be reported with remotes, and checks if their git repository is in need of repair. Currently, only failures to sync with the remote cause a problem to be reported. This seems enough, but we'll see. Plugging in a removable drive with a repository on it that is corrupted does automatically repair the repository, as long as the corruption causes git push or git pull to fail. Some types of corruption do not, eg missing/corrupt objects for blobs that git push doesn't need to look at. So, this is not really a replacement for scheduled git repository fscking. But it does make the assistant more robust. This commit is sponsored by Fernando Jimenez.
* assistant: When autostarted, wait 5 seconds before running the startup scan, ↵Gravatar Joey Hess2013-10-26
| | | | to avoid contending with the user's desktop login process.
* add config page for fsck, and alert with button when a fsck is runningGravatar Joey Hess2013-10-10
|
* half way complete cronner thread to run scheduled activitiesGravatar Joey Hess2013-10-08
|
* assistant: Detect stale git lock files at startup time, and remove them.Gravatar Joey Hess2013-10-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Extends the index.lock handling to other git lock files. I surveyed all lock files used by git, and found more than I expected. All are handled the same in git; it leaves them open while doing the operation, possibly writing the new file content to the lock file, and then closes them when done. The gc.pid file is excluded because it won't affect the normal operation of the assistant, and waiting for a gc to finish on startup wouldn't be good. All threads except the webapp thread wait on the new startup sanity checker thread to complete, so they won't try to do things with git that fail due to stale lock files. The webapp thread mostly avoids doing that kind of thing itself. A few configurators might fail on lock files, but only if the user is explicitly trying to run them. The webapp needs to start immediately when the user has opened it, even if there are stale lock files. Arranging for the threads to wait on the startup sanity checker was a bit of a bear. Have to get all the NotificationHandles set up before the startup sanity checker runs, or they won't see its signal. Perhaps the NotificationBroadcaster is not the best interface to have used for this. Oh well, it works. This commit was sponsored by Michael Jakl
* assistant: Work around git-cat-file's not reloading the index after files ↵Gravatar Joey Hess2013-05-25
| | | | | | are staged. Argh.
* add two long-running XMPP push threads, no more inversion of controlGravatar Joey Hess2013-05-22
| | | | | | | | | I hope this will be easier to reason about, and less buggy. It was certianly easier to write! An immediate benefit is that with a traversable queue of push requests to select from, the threads can be a lot fairer about choosing which client to service next.
* remove overview of threads an mvarsGravatar Joey Hess2013-05-22
| | | | | has become too long to be useful, and I find I don't need it anymore to keep things straight
* reomove showStart, unnecessaryGravatar Joey Hess2013-05-09
|
* run checkCanWatch before redirecting errors to logGravatar Joey Hess2013-05-09
| | | | This was handled ok in daemon mode, but not in foreground mode.
* Detect systems that have no user name set in GECOS, and also don't have ↵Gravatar Joey Hess2013-04-22
| | | | user.name set in git config, and put in a workaround so that commits to the git-annex branch (and the assistant) will still succeed despite git not liking the system configuration.
* webapp: New --listen= option allows running the webapp on one computer and ↵Gravatar Joey Hess2013-04-08
| | | | | | | connecting to it from another. Does not yet use HTTPS. I'd need to generate a certificate, and I'm not sure what's the best way to do that.
* refactor alert button creation codeGravatar Joey Hess2013-04-04
|
* streamline deletion process and improve UIGravatar Joey Hess2013-04-03
|
* clean up urlrenderer handling when the webapp is not builtGravatar Joey Hess2013-04-03
|
* detect when unwanted remote is empty and remove itGravatar Joey Hess2013-04-03
| | | | Needs fixes to build when the webapp is disabled.
* hlintGravatar Joey Hess2013-04-03
|
* add a debug message about where logging goesGravatar Joey Hess2013-03-27
|
* add a startup notice in the log, with version numberGravatar Joey Hess2013-03-17
|