Commit graph

274 commits

Author SHA1 Message Date
Joey Hess
8a796cfa64 improve syncing support for special remotes
Avoid trying to git push/pull to special remotes, but still do transfer
scans of them, after git pull from any other remotes, so we know about
any values that have been placed on them.
2012-09-04 15:56:37 -04:00
Joey Hess
46fd6b54c7 rsync.net configurator tested and 100% working 2012-09-04 15:27:06 -04:00
Joey Hess
b584d96c13 rsync.net configurator display
Doesn't set up the repo yet.
2012-09-03 00:39:55 -04:00
Joey Hess
b6a91d7a4d defer setting up ssh public key until after confirmation 2012-09-02 20:43:32 -04:00
Joey Hess
014974a7da allow making encrypted rsync special remotes
wow, that was easy!
2012-09-02 17:32:24 -04:00
Joey Hess
9f403113dd make bare repo on server
I think this makes sense.. Unless the assistant is running on the server,
the repo won't be updated, so it might as well be bare.

Non-bare repos will be handled by the pairing configurator, later.
2012-09-02 15:30:32 -04:00
Joey Hess
97ce4d24cb adding ssh remote working
Rsync remote still needs work
2012-09-02 15:27:00 -04:00
Joey Hess
6623a51cf9 run sync in background 2012-09-02 15:20:03 -04:00
Joey Hess
e6f61e5ab9 factored out repository creation code and made more generic
for use by other configurators.. probably should be moved to a utility
module somewhere
2012-09-02 15:06:27 -04:00
Joey Hess
93f29997a9 reduce some boilerplate using ghc extensions 2012-09-02 02:07:15 -04:00
Joey Hess
837cd79e4f add ssh confirmation page
also broke out webapp types into a separate module
2012-09-02 00:49:25 -04:00
Joey Hess
53043999ac don't set up authorized_keys during probe 2012-09-01 21:10:40 -04:00
Joey Hess
32ab049f9c ssh connection testing and key setup 2012-09-01 20:37:35 -04:00
Joey Hess
54a492db5f UI for adding a ssh or rsync remote 2012-08-31 18:59:57 -04:00
Joey Hess
86fb1305dc split out local repo configurators 2012-08-31 15:17:12 -04:00
Joey Hess
38a292fd36 preserve bytesComplete when updating a transfer info
Avoids flicker to 0% when resuming a paused transfer.
2012-08-31 13:06:27 -04:00
Joey Hess
8335a7ff7a remove the TChan component from the data structure
The code to maintain that TChan in parallel with the list was buggy,
the two were not always the same. And all that TChan was needed for was
blocking on the next transfer, which can be accomplished just as well by
checking the size and retrying, thanks to STM.

Also, this is faster, and uses less memory. Total win.
2012-08-31 12:59:00 -04:00
Joey Hess
4004baafaf fix alterTransferInfo
don't want to stomp over fields other than the ones being changed
2012-08-31 12:14:16 -04:00
Joey Hess
34aeecb78a fix bug where resuming a transfer also started one queued transfer 2012-08-31 11:47:35 -04:00
Joey Hess
0e205184bb use only one level of exception handling for transfer slot 2012-08-29 21:28:59 -04:00
Joey Hess
ab6e1221ce bug 2012-08-29 18:25:28 -04:00
Joey Hess
5d5b6c8be2 fix repeated pause and resume of a transfer
I had an intuition that throwTo might be blocking because an exception was
caught and the exception handler was running. This seems to be the case,
and is avoided by using try. However, I can't really find anywhere in
throwTo's documentation that justifies this behavior.
2012-08-29 18:02:52 -04:00
Joey Hess
df2473a476 typoe 2012-08-29 17:32:41 -04:00
Joey Hess
8d32d54320 make start button work on queued transfers
When multiple downloads of a key are queued, it starts the first, but leaves the
other downloads in the queue. This ensures that we don't lose a queued
download if the one that got started failed.
2012-08-29 16:30:40 -04:00
Joey Hess
c21a9fe04a more generic 2012-08-29 15:56:47 -04:00
Joey Hess
0842e99637 forgot to update the tchan when dequeuing transfers 2012-08-29 15:46:42 -04:00
Joey Hess
a4fa31ffa1 remove debug print 2012-08-29 15:45:48 -04:00
Joey Hess
99525f8454 when canceling a transfer, also cancel all other downloads of the same key 2012-08-29 15:24:09 -04:00
Joey Hess
9e54355e8b pausing tweaks 2012-08-29 15:13:12 -04:00
Joey Hess
93037580b6 fix resume button
Change alterTransferInfo to not merge in old values, including
transferPaused.
2012-08-29 14:14:57 -04:00
Joey Hess
c59ba80b5b remove debug prints 2012-08-29 14:06:45 -04:00
Joey Hess
d2a4ffe669 got alterTransferInfo and updateTransferInfo mixed up
The poller only alters, to avoid re-adding transfers that get removed.
The watcher updates, to add new transfers.
2012-08-29 14:05:56 -04:00
Joey Hess
07de26ed7b simple transfer queue display cleanup
Don't display redundant queued downloads. The only problem with this is
that it reduces the total number of queued transfers the webapp displays.
2012-08-29 13:41:47 -04:00
Joey Hess
dd697cbd3e avoid failure alerts for temporary transfer failures
Since a failed transfer gets retried until it succeeds, no point in
bothering the user about them.
2012-08-29 13:00:21 -04:00
Joey Hess
0dd7860393 fix a transfers display glitch
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.
2012-08-28 17:17:09 -04:00
Joey Hess
1296cfb09a avoid possibly re-adding a removed transfer when updating its info
Doesn't fix the bug I thought it'd fix, but is clearly correct.
2012-08-28 14:19:11 -04:00
Joey Hess
7024a973b2 add download progress polling thread 2012-08-28 14:04:28 -04:00
Joey Hess
d21c4094b2 look up Remote when a transfer appears
Fixes display of the remote name in the dashboard.
2012-08-27 14:04:06 -04:00
Joey Hess
11c1f32c51 improve display of failed transfer alert 2012-08-27 13:52:48 -04:00
Joey Hess
2433f6ca5a use the ~/.config/git-annex/program file to find command when running transfers 2012-08-27 13:43:03 -04:00
Joey Hess
347d3892e7 avoid some confusing alerts 2012-08-26 17:45:30 -04:00
Joey Hess
271ea49978 add support for readonly remotes
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.
2012-08-26 15:39:02 -04:00
Joey Hess
4d269db520 don't exclude special remotes from the knownRemotes list used by the assistant
But do exclude them when pushing out changes.
2012-08-26 14:56:56 -04:00
Joey Hess
78d3add86b tweak field name 2012-08-26 14:26:43 -04:00
Joey Hess
20a451a58b cleanup 2012-08-26 14:14:12 -04:00
Joey Hess
ae52efc673 scan multiple remotes in one pass
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.
2012-08-26 14:09:02 -04:00
Joey Hess
8de7699f39 add transferkey command
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.
2012-08-24 17:23:58 -04:00
Joey Hess
ab5e409a95 keep track of which remotes have been scanned in process state
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.
2012-08-24 15:52:23 -04:00
Joey Hess
0b1015370b fix priority inversion
low cost ==> high priority
2012-08-24 13:59:35 -04:00
Joey Hess
a52c552f0b avoid crash when directory doesn't exist 2012-08-24 13:59:24 -04:00