summaryrefslogtreecommitdiff
path: root/Command
Commit message (Collapse)AuthorAge
* add back debug loggingGravatar Joey Hess2012-07-19
| | | | | | | | | | | | | Make Utility.Process wrap the parts of System.Process that I use, and add debug logging to them. Also wrote some higher-level code that allows running an action with handles to a processes stdin or stdout (or both), and checking its exit status, all in a single function call. As a bonus, the debug logging now indicates whether the process is being run to read from it, feed it data, chat with it (writing and reading), or just call it for its side effect.
* Merge branch 'threaded' into assistantGravatar Joey Hess2012-07-18
|\
| * switch from System.Cmd.Utils to System.ProcessGravatar Joey Hess2012-07-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Test suite now passes with -threaded! I traced back all the hangs with -threaded to System.Cmd.Utils. It seems it's just crappy/unsafe/outdated, and should not be used. System.Process seems to be the cool new thing, so converted all the code to use it instead. In the process, --debug stopped printing commands it runs. I may try to bring that back later. Note that even SafeSystem was switched to use System.Process. Since that was a modified version of code from System.Cmd.Utils, it needed to be converted too. I also got rid of nearly all calls to forkProcess, and all calls to executeFile, which I'm also doubtful about working well with -threaded.
* | Merge branch 'master' into assistantGravatar Joey Hess2012-07-17
|\|
| * map: Write map.dot to .git/annex, which avoids watch trying to annex it.Gravatar Joey Hess2012-07-17
| |
* | Merge branch 'master' into assistantGravatar Joey Hess2012-07-16
|\|
| * copy, drop: Avoid checking numcopies attribute unnecessarilyGravatar Joey Hess2012-07-10
| |
* | wrote transfer threadGravatar Joey Hess2012-07-05
| | | | | | | | finally!
* | Merge branch 'master' into assistantGravatar Joey Hess2012-07-02
|\|
| * pass associatedfile and remoteuuid to git-annex-shellGravatar Joey Hess2012-07-02
| | | | | | | | | | | | | | | | This *almost* works. Along the way, I noticed that the --uuid parameter was being accidentially passed after the --, so that has never been actually used by git-annex-shell to verify it's running in the expected repository. Oops. Fixed.
| * record transfers for git-annex-shellGravatar Joey Hess2012-07-02
| | | | | | | | | | | | | | | | | | Not yet tested and places git-annex-shell is run need to be modified to pass the new field settings. Note that rsyncServerSend was changed to fork, rather than directly exec rsync, because it needs to keep the transfer lock held, and clean up the transfer log when done.
* | Merge branch 'master' into assistantGravatar Joey Hess2012-07-01
|\|
| * record transfer information on local git remotesGravatar Joey Hess2012-07-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to record a semi-useful filename associated with the key, this required plumbing the filename all the way through to the remotes' storeKey and retrieveKeyFile. Note that there is potential for deadlock here, narrowly avoided. Suppose the repos are A and B. A sends file foo to B, and at the same time, B gets file foo from A. So, A locks its upload transfer info file, and then locks B's download transfer info file. At the same time, B is taking the two locks in the opposite order. This is only not a deadlock because the lock code does not wait, and aborts. So one of A or B's transfers will be aborted and the other transfer will continue. Whew!
| * get, move, copy: Now refuse to do anything when the requested file transfer ↵Gravatar Joey Hess2012-07-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | is already in progress by another process. Note this is per-remote, so trying to get the same file from multiple remotes can still let duplicate downloads run. (And uploading the same file to multiple remotes is not duplicate at all of course.) get, move, and copy are the only git-annex subcommands that transfer files, but there's still git-annex-shell recvkey and sendkey to deal with too. I considered modifying retrieveKeyFile or getViaTmp, but they are called by other code that does not involve expensive file transfers (migrate) or that does file transfers that should not be checked by this (fsck --from).
* | Merge branch 'master' into assistantGravatar Joey Hess2012-06-27
|\|
| * typoGravatar Joey Hess2012-06-27
| |
* | Merge branch 'master' into assistantGravatar Joey Hess2012-06-27
|\|
| * use "variant" rather than "version"Gravatar Joey Hess2012-06-27
| | | | | | | | | | | | While this word may be less familiar to some users, it avoids the connotation that version 2 is better than version 1, which is wrong when the two variants were conflicting.
| * better filenames for conflict resolution filesGravatar Joey Hess2012-06-27
| |
| * commit merge resolutionGravatar Joey Hess2012-06-27
| | | | | | | | this is necessary so the sync can continue successfully with its push phase
| * fix file nameGravatar Joey Hess2012-06-27
| |
| * don't automerge when the symlinks cannot be parsed as keysGravatar Joey Hess2012-06-27
| |
| * sync: Automatically resolves merge conflicts.Gravatar Joey Hess2012-06-27
| | | | | | | | untested, but it compiles :)
| * properly handle deleted files when processing ls-files --unmergedGravatar Joey Hess2012-06-27
| |
* | Merge branch 'master' into assistantGravatar Joey Hess2012-06-23
|\|
| * sync: Avoid recent git's interactive merge.Gravatar Joey Hess2012-06-23
| |
* | the syncer now pushes out changes to remotes, in parallelGravatar Joey Hess2012-06-22
| | | | | | | | | | | | | | | | | | Note that, since this always pushes branch synced/master to the remote, it assumes that master has already gotten all the commits that are on the remote merged in. Otherwise, fast-forward prevention may prevent the push. That's probably ok, because the next stage is to automatically detect incoming pushes and merge.
* | add assistant commandGravatar Joey Hess2012-06-22
|/ | | | like watch, but more magic
* maintain set of files pendingAddGravatar Joey Hess2012-06-20
| | | | | | | | Kqueue needs to remember which files failed to be added due to being open, and retry them. This commit gets the data in place for such a retry thread. Broke KeySource out into its own file, and added Eq and Ord instances so it can be stored in a Set.
* Merge branch 'master' into watchGravatar Joey Hess2012-06-20
|\
| * unused: Fix crash when file names contain invalid utf8.Gravatar Joey Hess2012-06-20
| | | | | | | | | | | | Was decoding the git-cat-file of the symlink target as utf8, but that can't do, unix filenames are from the 70's and need this shiny disco fileSystemEncoding.
* | fix kevent symlink creationGravatar Joey Hess2012-06-19
|/
* remove newly created tmp file before linkingGravatar Joey Hess2012-06-15
|
* better temp file handlingGravatar Joey Hess2012-06-15
|
* tweakGravatar Joey Hess2012-06-15
|
* Merge branch 'master' into watchGravatar Joey Hess2012-06-15
|\
| * addurl: Was broken by a typo introduced 2 released ago, now fixed. Closes: ↵Gravatar Joey Hess2012-06-14
| | | | | | | | #677576
* | fishy commitGravatar Joey Hess2012-06-14
| |
* | reorganizeGravatar Joey Hess2012-06-13
| |
* | optimise link staging at startupGravatar Joey Hess2012-06-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now it starts really, really fast! Down from 15 minutes or so on my big tree to around 1 minute. The trick is to remember the last time the daemon was running. Links with a ctime from before that point don't need to be restaged on startup (as long as they are correct), since the old daemon would have handled them already. We also assume that if the daemon has never run before, any links that already exist are good. The pre-commit hook fixes links, so this should be a safe assumption. Adds another MVar holding a DaemonStatus data structure. Also allowed getting rid of the Annex.Fast hack. This data structure will probably grow a lot of details about the daemon's status, that will later be used by the webapp's UI. The code to actually track when the daemon was last running is not written yet. It's 3 am.
* | plumb file status through to event handlersGravatar Joey Hess2012-06-13
| | | | | | | | | | | | | | | | | | | | | | | | | | The idea, not yet done, is to use this to detect when a file has an old change time, and avoid expensive restaging of the file. If git-annex watch keeps track of the last time it finished a full scan, then any symlink that is older than that time must have been scanned before, so need not be added. (Relying on moving, copying, etc of a file all updating its change time.) Anyway, this info is available for free since inotify already checks it, so it might as well make it available.
* | move commentGravatar Joey Hess2012-06-13
| |
* | tweakGravatar Joey Hess2012-06-12
| |
* | do fewer commits during long batch jobsGravatar Joey Hess2012-06-12
| | | | | | | | 10 thousand queue size does not use appreciable memory in my testing.
* | better optimisation of add checkGravatar Joey Hess2012-06-12
| | | | | | | | | | | | | | | | | | | | | | | | | | Now really only done in the startup scan. It turns out to be quite hard for event handlers to know when the startup scan is complete. I tried to make addWatch pass that info, but found threading the state very difficult. For now, a quick hack, using the fast flag. Note that it's actually possible for inotify events to come in while the startup scan is still ongoing. Due to my hack, the expensive check will be done for files added in such inotify events.
* | fix bug that turned files already in git into symlinksGravatar Joey Hess2012-06-12
| | | | | | | | | | | | This requires a relatively expensive test at file add time to see if it's in git already. But it can be optimised to only happen during the startup scan.
* | add a flag indicating if an event was synthesized during initial dir scanGravatar Joey Hess2012-06-12
| |
* | cleanupGravatar Joey Hess2012-06-12
| |
* | hlintGravatar Joey Hess2012-06-12
| |
* | updateGravatar Joey Hess2012-06-11
| |