summaryrefslogtreecommitdiff
path: root/Assistant
Commit message (Collapse)AuthorAge
* fix a transfers display glitchGravatar Joey Hess2012-08-28
| | | | | | | | Run code that pops off the next queued transfer and adds it to the active transfer map within an allocated transfer slot, rather than before allocating a slot. Fixes the transfers display, which had been displaying the next transfer as a running transfer, while the previous transfer was still running.
* avoid possibly re-adding a removed transfer when updating its infoGravatar Joey Hess2012-08-28
| | | | Doesn't fix the bug I thought it'd fix, but is clearly correct.
* add download progress polling threadGravatar Joey Hess2012-08-28
|
* look up Remote when a transfer appearsGravatar Joey Hess2012-08-27
| | | | Fixes display of the remote name in the dashboard.
* improve display of failed transfer alertGravatar Joey Hess2012-08-27
|
* use the ~/.config/git-annex/program file to find command when running transfersGravatar Joey Hess2012-08-27
|
* avoid some confusing alertsGravatar Joey Hess2012-08-26
|
* add support for readonly remotesGravatar Joey Hess2012-08-26
| | | | | | | Currently only the web special remote is readonly, but it'd be possible to also have readonly drives, or other remotes. These are handled in the assistant by only downloading from them, and never trying to upload to them.
* don't exclude special remotes from the knownRemotes list used by the assistantGravatar Joey Hess2012-08-26
| | | | But do exclude them when pushing out changes.
* tweak field nameGravatar Joey Hess2012-08-26
|
* cleanupGravatar Joey Hess2012-08-26
|
* scan multiple remotes in one passGravatar Joey Hess2012-08-26
| | | | | | | | | | | | | | | | | | | | | | | | | The expensive transfer scan now scans a whole set of remotes in one pass. So at startup, or when network comes up, it will run only once. Note that this can result in transfers from/to higher cost remotes being queued before other transfers of other content from/to lower cost remotes. Before, low cost remotes were scanned first and all their transfers came first. When multiple transfers are queued for a key, the lower cost ones are still queued first. However, this could result in transfers from slow remotes running for a long time while transfers of other data from faster remotes waits. I expect to make the transfer queue smarter about ordering and/or make it allow multiple transfers at a time, which should eliminate this annoyance. (Also, it was already possible to get into that situation, for example if the network was up, lots of transfers from slow remotes might be queued, and then a disk is mounted and its faster transfers have to wait.) Also note that this means I don't need to improve the code in Assistant.Sync that currently checks if any of the reconnected remotes have diverged, and if so, queues scans of all of them. That had been very innefficient, but now doesn't matter.
* add transferkey commandGravatar Joey Hess2012-08-24
| | | | | | | Used by the assistant, rather than copy, this is faster because it avoids using git ls-files, avoids checking the location log redundantly, and runs in oneshot mode, avoiding making a commit to the git-annex branch for every file transferred.
* keep track of which remotes have been scanned in process stateGravatar Joey Hess2012-08-24
| | | | | Since it turned out to make sense to always scan all remotes on startup, there's no need to persist the info about which have been scanned.
* fix priority inversionGravatar Joey Hess2012-08-24
| | | | low cost ==> high priority
* avoid crash when directory doesn't existGravatar Joey Hess2012-08-24
|
* run full transfer scan on all remotes at startupGravatar Joey Hess2012-08-24
| | | | Or when a remote first becomes available after startup.
* make higher priorities and full scans be preserved when addingGravatar Joey Hess2012-08-24
|
* avoid requeueing a download from a remote that no longer has a keyGravatar Joey Hess2012-08-24
|
* remove slightly misleading extended messageGravatar Joey Hess2012-08-23
|
* also notice dbus unmount eventsGravatar Joey Hess2012-08-23
|
* make the NetWatcher always rescan networked remotes every 30 minutesGravatar Joey Hess2012-08-23
| | | | | | | | | There are multiple reasons to do this: * The local network may be up solid, but a route to a networked remote is having trouble. Any transfers to it that fail should be retried. * Someone might have wicd running, but like to bring up new networks by hand too. This way, it'll eventually notice them.
* don't rely on hasKeyCheap in the transfer scanGravatar Joey Hess2012-08-23
| | | | | | | The problem with using it here is that, if a removable drive is scanned and gets disconnected during the scan, testing for all the files will indicate it doesn't have them, and the scan is logged as completed successfully, without necessary transfers being queued.
* remove pointless bracketGravatar Joey Hess2012-08-23
|
* keep logs of failed transfers, and requeue them when doing a non-full scanGravatar Joey Hess2012-08-23
| | | | of a remote
* add transfer scanned flag filesGravatar Joey Hess2012-08-23
|
* scan cheapest remotes firstGravatar Joey Hess2012-08-23
| | | | This way, we get transfers from cheapest remotes.
* better nameGravatar Joey Hess2012-08-22
|
* avoid unnecessary transfer scans when syncing a disconnected remoteGravatar Joey Hess2012-08-22
| | | | | | | | | | | | | | | | | | | | Found a very cheap way to determine when a disconnected remote has diverged, and has new content that needs to be transferred: Piggyback on the git-annex branch update, which already checks for divergence. However, this does not check if new content has appeared locally while disconnected, that should be transferred to the remote. Also, this does not handle cases where the two git repos are in sync, but their content syncing has not caught up yet. This code could have its efficiency improved: * When multiple remotes are synced, if any one has diverged, they're all queued for transfer scans. * The transfer scanner could be told whether the remote has new content, the local repo has new content, or both, and could optimise its scan accordingly.
* move some git operations outside the annex monad to avoid blocking other threadsGravatar Joey Hess2012-08-22
|
* refactorGravatar Joey Hess2012-08-22
|
* add NetWatcher threadGravatar Joey Hess2012-08-21
| | | | | | This deals with interruptions in network connectevity, by listening for a new network interface coming up (using dbus to see when network-manager or wicd do it), and forcing a rescan of
* make canCheckSymlink check in a parent directory if the directory DNEGravatar Joey Hess2012-08-16
|
* run resumed transfers immediately, do not wait for free transfer slotGravatar Joey Hess2012-08-12
| | | | | The resumed transfer still uses a slot, so will delay other, queued transfers from starting.
* implement resuming of paused transfersGravatar Joey Hess2012-08-12
| | | | | Currently waits for a new transfer slot to open up, which probably needs to change..
* fix button display for paused transferGravatar Joey Hess2012-08-10
|
* implement pausing of transfersGravatar Joey Hess2012-08-10
| | | | | | A paused transfer's thread keeps running, keeping the slot in use. This is intentional; pausing a transfer should not let other queued transfers to run in its place.
* send update notificaton when removing a queued transferGravatar Joey Hess2012-08-10
|
* remove dummyGravatar Joey Hess2012-08-10
|
* process group killingGravatar Joey Hess2012-08-10
| | | | | | | | | | | | | | | | | | | | This seems to work pretty well. Handled the process groups like this: - git-annex processes started by the assistant for transfers are run in their own process groups. - otherwise, rely on the shell to allocate a process group for git-annex There is potentially a problem if some other program runs git-annex directly (not using sh -c) The program and git-annex would then be in the same process group. If that git-annex starts a transfer and it's canceled, the program would also get killed. May or may not be a desired result. Also, the new updateTransferInfo probably closes a race where it was possible for the thread id to not be recorded in the transfer info, if the transfer info file from the transfer process is read first.
* fork off git-annex copy for transfersGravatar Joey Hess2012-08-10
| | | | | | | | | | | | | | This doesn't quite work, because canceling a transfer sends a signal to git-annex, but not to rsync (etc). Looked at making git-annex run in its own process group, which could then be killed, and would kill child processes. But, rsync checks if it's process group is the foreground process group and doesn't show progress if not, and when git has run git-annex, if git-annex makes a new process group, that is not the case. Also, if git has run git-annex, ctrl-c wouldn't be propigated to it if it made a new process group. So this seems like a blind alley, but recording it here just in case.
* transfer cancelingGravatar Joey Hess2012-08-08
| | | | | | | | | | Should work (untested) for transfers being run by other processes. Not yet by transfers being run by the assistant. killThread does not kill processes forked off by a thread. To fix this, will probably need to make `git annex getkey` and `git annex sendkey` commands that operate on keys, and write their own transfer info. Then the assistant can run them, and kill them, as needed.
* factor out onclick javascriptGravatar Joey Hess2012-08-08
|
* add routes to pause/start/cancel transfersGravatar Joey Hess2012-08-08
| | | | | | | | | | | | | | | | This commit includes a paydown on technical debt incurred two years ago, when I didn't know that it was bad to make custom Read and Show instances for types. As the routes need Read and Show for Transfer, which includes a Key, and deriving my own Read instance of key was not practical, I had to finally clean that up. So the compact Key read and show functions are now file2key and key2file, and Read and Show are now derived instances. Changed all code that used the old instances, compiler checked. (There were a few places, particularly in Command.Unused, and the test suite where the Show instance continue to be used for legitimate comparisons; ie show key_x == show key_y (though really in a bloom filter))
* fix display of icon in block alert headingGravatar Joey Hess2012-08-06
|
* added an alert after a file transferGravatar Joey Hess2012-08-06
|
* better alert message generationGravatar Joey Hess2012-08-06
|
* make alerts change tense when they finishGravatar Joey Hess2012-08-06
|
* merge two repository screens into oneGravatar Joey Hess2012-08-05
|
* handle case of adding populated drive to just created repoGravatar Joey Hess2012-08-05
| | | | | The just created repo has no master branch commits yet. This is now handled, merging in the master branch from the populated drive.