summaryrefslogtreecommitdiff
path: root/Utility
Commit message (Collapse)AuthorAge
* 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).
* finish fixing windows timezone madnessGravatar Joey Hess2014-06-12
| | | | | | | | | | | | | | | | | | | | | Rather than calculating the TSDelta once, and caching it, this now reads the inode sential file's InodeCache file once, and then each time a new InodeCache is generated, looks at the sentinal file to get the current delta. This way, if the time zone changes while git-annex is running, it will adapt. This adds some inneffiency, but only on Windows, and only 1 stat per new file added. The worst innefficiency is that `git annex status` and `git annex sync` will now (on Windows) stat the inode sentinal file once per file in the repo. It would be more efficient to use getCurrentTimeZone, rather than needing to stat the sentinal file. This should be easy to do, once the time package gets my bugfix patch. This commit was sponsored by Jürgen Lüters.
* fix for Windows file timestamp timezone madnessGravatar Joey Hess2014-06-12
| | | | | | | | | | | | | | | | | | | | | | On Windows, changing the time zone causes the apparent mtime of files to change. This confuses git-annex, which natually thinks this means the files have actually been modified (since THAT'S WHAT A MTIME IS FOR, BILL <sheesh>). Work around this stupidity, by using the inode sentinal file to detect if the timezone has changed, and calculate a TSDelta, which will be applied when generating InodeCaches. This should add no overhead at all on unix. Indeed, I sped up a few things slightly in the refactoring. Seems to basically work! But it has a big known problem: If the timezone changes while the assistant (or a long-running command) runs, it won't notice, since it only checks the inode cache once, and so will use the old delta for all new inode caches it generates for new files it's added. Which will result in them seeming changed the next time it runs. This commit was sponsored by Vincent Demeester.
* minimal exportsGravatar Joey Hess2014-06-11
|
* deal with FAT on Linux timestamp issueGravatar Joey Hess2014-06-11
| | | | | | | | | Deal with FAT's low resolution timestamps, which in combination with Linux's caching of higher res timestamps while a FAT is mounted, caused direct mode repositories on FAT to seem to have modified files after they were unmounted and remounted. This commit was sponsored by Fabrice Rossi.
* Fix build with wai 0.3.0.Gravatar Joey Hess2014-06-11
| | | | | | | | | | This version of wai changed the type of Middleware, so I cannot seem to liftIO inside it. So, got rid of a lot of not really needed complexity to use System.Log.Logger's logging stuff, and just use the standard wai stdout logger when debug logging is enabled. Format may change some, and it logs http to stdout instead of stderr now. Doesn't matter for the webapp since both go to the same log anyway.
* export CreateProcess fields from Utility.ProcessGravatar Joey Hess2014-06-10
| | | | update code to avoid cwd and env redefinition warnings
* Windows: Fix opening webapp when repository is in a directory with spaces in ↵Gravatar Joey Hess2014-06-10
| | | | the path.
* Avoid leaving behind .tmp files when failing in some cases, including ↵Gravatar Joey Hess2014-06-09
| | | | importing files to a disk that is full.
* Ignore setsid failures.Gravatar Joey Hess2014-06-09
|
* qualify commentGravatar Joey Hess2014-06-09
|
* fix build with old versions of warpGravatar Joey Hess2014-06-04
|
* lazy bytestring fromStrict is not available in stable; use fromChunks insteadGravatar Joey Hess2014-05-29
|
* fix warning messageGravatar Joey Hess2014-05-29
| | | | This should work even back in debian stable's warp
* get rid of (completely safe) uses of Char8Gravatar Joey Hess2014-05-27
| | | | | Char8 often indicates an encoding bug. It didn't here, but I can avoid it and not worry about it.
* refactorGravatar Joey Hess2014-05-14
|
* fix windows buildGravatar Joey Hess2014-05-14
|
* 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.
* relicense general utility library code to BSDGravatar Joey Hess2014-05-10
| | | | | Omitted a couple of files what have had significant contributions from others.
* Merge branch 'master' into bootstrap3Gravatar Joey Hess2014-05-02
|\ | | | | | | | | Conflicts: debian/changelog
| * hlintGravatar Joey Hess2014-04-26
| |
* | create a local copy of Yesod.Form.Bootstrap3Gravatar Sören Brunk2014-04-25
| |
* | bootstrap3 formsGravatar Sören Brunk2014-04-21
|/
* better approach for building distributionupdateGravatar Joey Hess2014-04-21
| | | | Use cabal include file
* fix distributionupdate buildGravatar Joey Hess2014-04-21
| | | | Including avoiding needing cabal's defines for Utility.URI
* Merge branch 'master' into remotecontrolGravatar Joey Hess2014-04-14
|\ | | | | | | | | Conflicts: doc/devblog/day_152__more_ssh_connection_caching.mdwn
| * adjust to not use cpp in modules used by configureGravatar Joey Hess2014-04-14
| |
| * add missing Network.URI Ord instance for Debian stableGravatar Joey Hess2014-04-14
| |
* | sync, assistant, remotedaemon: Use ssh connection caching for git pushes and ↵Gravatar Joey Hess2014-04-12
|/ | | | | | | | | | | | | | | | | pulls. For sync, saves 1 ssh connection per remote. For remotedaemon, the same ssh connection that is already open to run git-annex-shell notifychanges is reused to pull from the remote. Only potential problem is that this also enables connection caching when the assistant syncs with a ssh remote. Including the sync it does when a network connection has just come up. In that case, cached ssh connections are likely to be stale, and so using them would hang. Until I'm sure such problems have been dealt with, this commit needs to stay on the remotecontrol branch, and not be merged to master. This commit was sponsored by Alexandre Dupas.
* wrote test case; found bugs in date math; fixed and simplified using ↵Gravatar Joey Hess2014-04-12
| | | | Data.Time.Calendar
* Improve handling on monthly/yearly scheduling.Gravatar Joey Hess2014-04-12
| | | | Avoid back-to-back runs.
* Improve handling on monthly/yearly scheduling.Gravatar Joey Hess2014-04-11
| | | | | | | | | | | | | | | | | | | Code was still buggy, it turns out (though the recursion checker caught it). In the case of (Schedule (Monthly Nothing) AnyTime), where the last run was on yyyy-12-31, it looped forever. Also, the handling of (Schedule (Yearly Nothing) AnyTime) was wacky where the last run was yyyy-12-31. It would suggest a window starting on the 3rd for the next run (because 31 mod 28 is 3). I think that originally I was wanted to avoid running on 01-01 if it had just run on 12-31. But the code didn't accomplish this, and it's not necessary anyway. This is supposed to calculate the next window meeting the schedule, and for (Schedule (Monthly Nothing), the window starts at 01-01 and runs through 01-31. If that causes two back-to-back runs, well the next one will not be until 02-01 at the earliest. Also, back-to-back runs can be avoided, if desired, by using Divisible 2.
* guard against any remaining infinite recursion bugs; throw error if no ↵Gravatar Joey Hess2014-04-11
| | | | | | | | candidate cn be found in next hundred years Note that the exception thrown is not visible in the webapp currently because it crashes one of Cronner's 2 worker threads, which is never checked.
* Last release didn't quite fix the high cpu issue in all cases, this should.Gravatar Joey Hess2014-04-11
| | | | | | | This is supposed to look for a day past the last day it ran, not a month past. Seems to work, at least in anarcat's test case.
* rename confusingly named "day"Gravatar Joey Hess2014-04-11
|
* assistant: Fix high CPU usage triggered when a monthly fsck is scheduled, ↵Gravatar Joey Hess2014-04-11
| | | | and the last time the job ran was a day of the month > 12. This caused a runaway loop. Thanks to Anarcat for his assistance, and to Maximiliano Curia for identifying the cause of this bug.
* Fix rsync progress parsing in locales that use comma in number display. ↵Gravatar Joey Hess2014-04-10
| | | | Closes: #744148
* merge from propellorGravatar Joey Hess2014-04-09
|
* remotedaemon: avoid extraneous stdout outputGravatar Joey Hess2014-04-08
|
* factored out Utility.SimpleProtocol from the external special remote ↵Gravatar Joey Hess2014-04-05
| | | | implementation
* factor out library code (also used by propellor)Gravatar Joey Hess2014-04-03
|
* clean up warning in windowsGravatar Joey Hess2014-04-02
|
* windows fix try 2Gravatar Joey Hess2014-04-02
|
* fix windows buildGravatar Joey Hess2014-04-02
|
* merge from propellorGravatar Joey Hess2014-04-01
|
* refactorGravatar Joey Hess2014-03-31
|
* avoid importing CommonGravatar Joey Hess2014-03-30
| | | | it caused a loop when reusing this in propellor
* Added required content configuration.Gravatar Joey Hess2014-03-29
| | | | | | | This includes checking when dropping files that any required content configuration is satisfied. However, it does not yet include an active check on the required content; the location log is trusted when checking the required content expression.
* avoid exception when curl exits nonzero (due to eg, bad domain name)Gravatar Joey Hess2014-03-27
|
* add desktop notificationsGravatar Joey Hess2014-03-22
| | | | | | | Motivation: Hook scripts for nautilus or other file managers need to provide the user with feedback that a file is being downloaded. This commit was sponsored by THM Schoemaker.