summaryrefslogtreecommitdiff
path: root/Utility
Commit message (Collapse)AuthorAge
* add git annex view commandGravatar Joey Hess2014-02-18
| | | | | | | | | | | | | | | | | | (And a vpop command, which is still a bit buggy.) Still need to do vadd and vrm, though this also adds their documentation. Currently not very happy with the view log data serialization. I had to lose the TDFA regexps temporarily, so I can have Read/Show instances of View. I expect the view log format will change in some incompatable way later, probably adding last known refs for the parent branch to View or something like that. Anyway, it basically works, although it's a bit slow looking up the metadata. The actual git branch construction is about as fast as it can be using the current git plumbing. This commit was sponsored by Peter Hogg.
* filter branches (incomplete)Gravatar Joey Hess2014-02-16
| | | | | | | | Promosing work toward metadata driven filter branches. A few methods to construct them are stubbed out; all the data types and pure code seems good. This commit was sponsored by Walter Somerville.
* windows: Fix start for already running daemonGravatar Joey Hess2014-02-13
|
* windows: Fix daemon pid file locking.Gravatar Joey Hess2014-02-13
| | | | | Well, as much as it can be fixed on windows. Not atomic; not entirely guarded against the wrong process having the pid file locked.
* 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.
* data types and serialization for metadataGravatar Joey Hess2014-02-12
| | | | | | | A very haskell commit! Just data types, instances to serialize the metadata to a nice format, and QuickCheck tests. This commit was sponsored by Andreas Leha.
* cleanup thanks to Utility.PIDGravatar Joey Hess2014-02-11
|
* fix windows build (and make --stop work on windows, incidentially)Gravatar Joey Hess2014-02-11
| | | | The Utility.PID will clean up other code soon.
* remove unimplemented windows stubsGravatar Joey Hess2014-02-11
|
* eliminating absNormPathGravatar Joey Hess2014-02-07
| | | | | | | | | | | | | | | | git-annex has been using MissingH's `abdNormPath` forever, but that's unmaintained and possibly buggy, and doesn't work on Windows. I've been wanting to get rid of it for some time, and finally did today, writing a `simplifyPath` that does the things git-annex needs and will work with all the Windows filename craziness, and takes advantage of the more modern System.FilePath to be quite a simple peice of code. A QuickCheck test found no important divergences from absNormPath. A good first step to making git-annex not depend on MissingH at all. And it fixed some weird behaviors on Windows like `git annex add ..\subdir\file` not working. Note that absNormPathUnix has been left alone for now.
* Android: Avoid crashing when unable to set file mode for ssh config file due ↵Gravatar Joey Hess2014-02-07
| | | | to Android filesystem horribleness.
* add regression test for symlink calculationGravatar Joey Hess2014-02-06
| | | | | Note: Test reordered because running git-annex sync early broke the environment for some other tests.
* wiiindddoowwsGravatar Joey Hess2014-02-06
|
* fix windows code again (argh)Gravatar Joey Hess2014-02-06
|
* work around absNormPath not working on WindowsGravatar Joey Hess2014-02-06
| | | | When making git-annex links, we want unix-style paths in the link targets.
* Revert "work around absNormPath not working on Windows"Gravatar Joey Hess2014-02-06
| | | | | | | This reverts commit 595e9a41cedbed40dfc6680d34ef6de5e3a2ff8e. That caused 2 other test cases to fail. Windows path slash issues are horrible.
* work around absNormPath not working on WindowsGravatar Joey Hess2014-02-06
| | | | | | Seems I punted on this while porting before. This hack relies on DOS not using / in filenames, it's effectively an alternate path separatr in at least current versions of windows..
* avoid using openFile when withFile can be usedGravatar Joey Hess2014-02-03
| | | | | | Potentially fixes some FD leak if an action on an opened file handle fails for some reason. There have been some hard to reproduce reports of git-annex leaking FDs, and this may solve them.
* factor out utility functionGravatar Joey Hess2014-02-03
|
* comment spellingGravatar Joey Hess2014-02-03
|
* tell moveFile to overwrite existing filesGravatar Joey Hess2014-01-29
|
* fix windows buildGravatar Joey Hess2014-01-29
|
* change a few renameFile's to renameGravatar Joey Hess2014-01-29
| | | | | AFAIK, none of these ever operate on directories, but nor do I want to explicitly check if they're files and fail if not.
* Windows: Avoid using unix-compat's rename, which refuses to rename directories.Gravatar Joey Hess2014-01-29
| | | | Opened a bug about this: https://github.com/jystic/unix-compat/issues/10
* use locking on WindowsGravatar Joey Hess2014-01-28
| | | | This is all the easy cases, where there was already a separate lock file.
* Windows file locking (atrociously horrible)Gravatar Joey Hess2014-01-28
|
* add webapp UI to manage unused filesGravatar Joey Hess2014-01-23
|
* add getDiskSizeGravatar Joey Hess2014-01-22
| | | | Couldn't find anything that exposed this for Windows.
* avoid needing a build-dep on hxt for Data.AssocListGravatar Joey Hess2014-01-14
|
* Android: Avoid passing --clobber to busybox wget.Gravatar Joey Hess2014-01-13
|
* commentGravatar Joey Hess2014-01-07
|
* work around a strance change in gpg behavior; needs a trustdb to exist even ↵Gravatar Joey Hess2014-01-07
| | | | when using --trust-model=always
* assistant: Start a new git-annex transferkeys process after a network ↵Gravatar Joey Hess2014-01-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | connection change So that remotes that use a persistent network connection are restarted. A remote might keep open a long duration network connection, and could fail to deal well with losing the connection. This is particularly a concern now that we have external special reotes. An external special remote that is implemented naively might open the connection only when PREPARE is sent, and if it loses connection, throw errors on each request that is made. (Note that the ssh connection caching should not have this problem; if the long-duration ssh process loses connection, the named pipe is disconnected and the next ssh attempt will reconnect. Also, XMPP already deals with disconnection robustly in its own way.) There's no way for git-annex to know if a lost network connection actually affects a given remote, which might have a transfer in process. It does not make sense to force kill the transferkeys process every time the NetWatcher detects a change. (Especially because the NetWatcher sometimes polls 1 change per hour.) In any case, the NetWatcher only detects connection to a network, not disconnection. So if a transfer is in progress over the network, and the network goes down, that will need to time out on its own. An alternate approch that was considered is to use a separate transferkeys process for each remote, and detect when a request fails, and assume that means that process is in a failing state and restart it. The problem with that approach is that if a resource is not available and a remote fails every time, it degrades to starting a new transferkeys process for every file transfer, which is too expensive. Instead, this commit only handles the network reconnection case, and restarts transferkeys only once the network has reconnected and another transfer needs to be made. So, a transferkeys process will be reused for 1 hour, or until the next network connection. ---- The NotificationBroadcaster was rewritten to use TMVars rather than MSampleVars, to allow checking without blocking if a notification has been received. ---- This commit was sponsored by Tobias Brunner.
* assistant: Ensure that .ssh/config and .ssh/authorized_keys are not group or ↵Gravatar Joey Hess2014-01-03
| | | | world writable when writing to those files, as that can make ssh refuse to use them, if it allows another user to write to them.
* Avoid looping if long-running git cat-file or git hash-object crashes and ↵Gravatar Joey Hess2014-01-01
| | | | keeps crashing when restarted.
* fixGravatar Joey Hess2013-12-30
|
* fixGravatar Joey Hess2013-12-30
|
* fix build failure in windows codeGravatar Joey Hess2013-12-30
|
* typoGravatar Joey Hess2013-12-29
|
* Android: Avoid trying to use Android's own ionice, which does not allow ↵Gravatar Joey Hess2013-12-29
| | | | specifying a command to run. Fixes transferring files to/from android and probably a few other things.
* work around windows insanity that is 97.61% more brain-damaged than normalGravatar Joey Hess2013-12-29
|
* addurl, importfeed: Sanitize | and some other symbols and special characters.Gravatar Joey Hess2013-12-27
|
* external special remotes mostly implemented (untested)Gravatar Joey Hess2013-12-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This has not been tested at all. It compiles! The only known missing things are support for encryption, and for get/set of special remote configuration, and of key state. (The latter needs separate work to add a new per-key log file to store that state.) Only thing I don't much like is that initremote needs to be passed both type=external and externaltype=foo. It would be better to have just type=foo Most of this is quite straightforward code, that largely wrote itself given the types. The only tricky parts were: * Need to lock the remote when using it to eg make a request, because in theory git-annex could have multiple threads that each try to use a remote at the same time. I don't think that git-annex ever does that currently, but better safe than sorry. * Rather than starting up every external special remote program when git-annex starts, they are started only on demand, when first used. This will avoid slowdown, especially when running fast git-annex query commands. Once started, they keep running until git-annex stops, currently, which may not be ideal, but it's hard to know a better time to stop them. * Bit of a chicken and egg problem with caching the cost of the remote, because setting annex-cost in the git config needs the remote to already be set up. Managed to finesse that. This commit was sponsored by Lukas Anzinger.
* convert hacky shell linux mklibs code to haskell ; fixing symlink bugGravatar Joey Hess2013-12-24
| | | | | | The shell code was nasty, and buggy. New haskell code is much nicer, and it's easy to do complicated calculations to properly convert possibly absolute symlinks between libraries into relative links using it.
* assistant: Set StrictHostKeyChecking yes when creating ssh remotes, and add ↵Gravatar Joey Hess2013-12-20
| | | | it to the configuration for any ssh remotes previously created by the assistant. This avoids repeated prompts by ssh if the host key changes, instead syncing with such a remote will fail. Closes: #732602
* need to stat symlinkGravatar Joey Hess2013-12-18
|
* assistant: Fix OSX-specific bug that caused the startup scan to try to ↵Gravatar Joey Hess2013-12-18
| | | | follow symlinks to other directories, and add their contents to the annex.
* switch define used, not android specificGravatar Joey Hess2013-12-18
|
* port transferkeys to windows; make stopping in progress transfers work too ↵Gravatar Joey Hess2013-12-10
| | | | | | | | | | | | | | | (probably) transferkeys had used special FDs for communication, but that would be quite annoying to do in Windows. Instead, use stdin and stdout. But, to avoid commands like rsync stomping on them and messing up the communications channel, they're duplicated to a different handle; stdin is replaced with a null handle, and stdout is replaced with a copy of stderr. This should all work in windows too. Stopping in progress transfers may work on windows.. if the types unify anyway. ;) May need some more porting.
* warningGravatar Joey Hess2013-12-10
|