summaryrefslogtreecommitdiff
path: root/Utility
Commit message (Collapse)AuthorAge
* 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.
* better nukefileGravatar Joey Hess2013-05-21
| | | | | Fixed handling of case when file does not exist to work like it did before, and avoid an excess stat call.
* better nukeFileGravatar Joey Hess2013-05-21
| | | | This fixes a bug where a direct mode sync fails to delete broken symlinks.
* Allow building with gpg2.Gravatar Joey Hess2013-05-19
|
* Fix a zombie that could result when running a process like gpg to read and ↵Gravatar Joey Hess2013-05-19
| | | | write to it.
* Switch to MonadCatchIO-transformers for better handling of state while ↵Gravatar Joey Hess2013-05-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | catching exceptions. As seen in this bug report, the lifted exception handling using the StateT monad throws away state changes when an action throws an exception. http://git-annex.branchable.com/bugs/git_annex_fork_bombs_on_gpg_file/ .. Which can result in cached values being redundantly calculated, or other possibly worse bugs when the annex state gets out of sync with reality. This switches from a StateT AnnexState to a ReaderT (MVar AnnexState). All changes to the state go via the MVar. So when an Annex action is running inside an exception handler, and it makes some changes, they immediately go into affect in the MVar. If it then throws an exception (or even crashes its thread!), the state changes are still in effect. The MonadCatchIO-transformers change is actually only incidental. I could have kept on using lifted-base for the exception handling. However, I'd have needed to write a new instance of MonadBaseControl for the new monad.. and I didn't write the old instance.. I begged Bas and he kindly sent it to me. Happily, MonadCatchIO-transformers is able to derive a MonadCatchIO instance for my monad. This is a deep level change. It passes the test suite! What could it break? Well.. The most likely breakage would be to code that runs an Annex action in an exception handler, and *wants* state changes to be thrown away. Perhaps the state changes leaves the state inconsistent, or wrong. Since there are relatively few places in git-annex that catch exceptions in the Annex monad, and the AnnexState is generally just used to cache calculated data, this is unlikely to be a problem. Oh yeah, this change also makes Assistant.Types.ThreadedMonad a bit redundant. It's now entirely possible to run concurrent Annex actions in different threads, all sharing access to the same state! The ThreadedMonad just adds some extra work on top of that, with its own MVar, and avoids such actions possibly stepping on one-another's toes. I have not gotten rid of it, but might try that later. Being able to run concurrent Annex actions would simplify parts of the Assistant code.
* fix the day's Windows permissions damageGravatar Joey Hess2013-05-14
|
* better error message for Windows stubGravatar Joey Hess2013-05-14
|
* fill in a few windows stubsGravatar Joey Hess2013-05-14
|
* fix importsGravatar Joey Hess2013-05-14
|
* deal with Cygwin rsync paths issueGravatar Joey Hess2013-05-14
|
* rename moduleGravatar Joey Hess2013-05-12
|
* fix the day's windows permissions damageGravatar Joey Hess2013-05-12
|
* fix buildGravatar Joey Hess2013-05-12
|
* work around MissingH's absNormPath not working on WindowsGravatar Joey Hess2013-05-12
|
* check addition env vars so it works on Windows outside of CygwinGravatar Joey Hess2013-05-12
|
* make work on windowsGravatar Joey Hess2013-05-12
|
* fixes for windowsGravatar Joey Hess2013-05-12
|
* fix windows buildGravatar Joey Hess2013-05-12
|
* fix permission damage (thanks, Windows)Gravatar Joey Hess2013-05-11
|
* refactoringGravatar Joey Hess2013-05-11
|
* clean up from windows portingGravatar Joey Hess2013-05-11
|
* fixes for Unix buildGravatar Joey Hess2013-05-11
|
* no need to stub moveFile, it worksGravatar Joey Hess2013-05-11
|
* git-annex now builds on Windows (doesn't work)Gravatar Joey Hess2013-05-11
|
* use unix-compat, removed a lot of stubs in Utility.FileModeGravatar Joey Hess2013-05-11
|
* fixup #if 0 stubs to use #ifndef mingw32_HOST_OSGravatar Joey Hess2013-05-10
| | | | | | That's needed in files used to build the configure program. For the other files, I'm keeping my __WINDOWS__ define, as I find that much easier to type. I may search and replace it to use the mingw32_HOST_OS thing later.
* stub out POSIX stuffGravatar Joey Hess2013-05-10
|
* stub out posix stuff for WindowsGravatar Joey Hess2013-05-10
| | | | This is enough to let the configure program build.
* rsync special remotes: When sending from a crippled filesystem, use the ↵Gravatar Joey Hess2013-05-09
| | | | destination's default file permissions, as the local ones can be arbitrarily broken. (Ie, ----rwxr-x for files on Android)
* configure: Better checking that sha commands output in the desired format.Gravatar Joey Hess2013-05-08
| | | | | | Run the same code git-annex used to get the sha, including its sanity checking. Much better than old grep. Should detect FreeBSD systems with sha commands that output in stange format.
* fix use of wrong shebang when android is installing git-annex-shell wrapper ↵Gravatar Joey Hess2013-05-06
| | | | on server
* Got removable media mount detection working on Android.Gravatar Joey Hess2013-05-04
| | | | | | | Bionic has an amusing stub for `getmntent` that prints out "FIX ME! implement getmntent()" But, `/proc/mounts` is there, so I just parse it.
* avoid crashing on Android when file mode of .git/annex/url cannot be setGravatar Joey Hess2013-05-03
| | | | | Presumably, if the filesystem doesn't support file permissions, it's not much of a multiuser system.
* work around strange endianness bug in port number on AndroidGravatar Joey Hess2013-05-02
|
* work around getAddrInfo segfault on AndroidGravatar Joey Hess2013-05-02
| | | | | | | | For an unknown reason, getAddrInfo currently is segfaulting. Note that in February, I had used warpDebug, which uses getAddrInfo, and it worked. Don't know if my toolchain has changed and broke it, or it's due to having a different Android device now. Anyway, work around it by hardcoding the address to use.
* stop setting ai_addrconfigGravatar Joey Hess2013-05-02
| | | | | | | This caused the code to fail on Android, which doesn't know that flag. It seems best to let the OS default flags be used. Tested working ok on Linux. The only difference on Linux is it might return a v4mapped ipv6 address sometimes.
* use DList for the transfer queueGravatar Joey Hess2013-04-25
| | | | | Some nice efficiency gains here for list appending, although mostly the small size of the transfer queue makes them irrelivant.
* remove last use of TSetGravatar Joey Hess2013-04-24
|
* add TList, built on DListGravatar Joey Hess2013-04-24
|
* whups, I didn't mean to commit this, it was in to more quickly test out of ↵Gravatar Joey Hess2013-04-24
| | | | limit behavior
* improve display of multiline messages in alertsGravatar Joey Hess2013-04-24
| | | | | | | | This better handles error messages formatted for console display, by adding a <br> after each line. Hmm, I wonder if it'd be worth pulling in a markdown formatter, and running the messages through it?
* include sys/types.hGravatar Joey Hess2013-04-24
| | | | | | | I have a report that this is necessary for freebsd. It seemed not necessary for OSX, but even there the kqueue man page says to include this header (along with sys/time.h which it already does).
* expose Control.Monad.joinGravatar Joey Hess2013-04-22
| | | | | I think I've been looking for that function for some time. Ie, I remember wanting to collapse Just Nothing to Nothing.
* untested browser opening on AndroidGravatar Joey Hess2013-04-18
| | | | | I've found multiple references to using the `am` command from the adb shell to open a browser. So I assume it also works in a terminal emulator.
* Fall back to internal url downloader when built without curl.Gravatar Joey Hess2013-04-16
|
* don't need any of this on androidGravatar Joey Hess2013-04-15
|
* quiet android build warningsGravatar Joey Hess2013-04-15
|
* avoid TH stuff on AndroidGravatar Joey Hess2013-04-15
|
* seems I need PackageImports here for configureGravatar Joey Hess2013-04-14
|