Commit graph

467 commits

Author SHA1 Message Date
Joey Hess
fab7adb161 Windows: Avoid eating stdin when running ssh to add a authorized key, since this is used for password prompting. 2014-01-01 15:49:51 -04:00
Joey Hess
6c565ec905 external special remotes mostly implemented (untested)
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.
2013-12-26 18:23:13 -04:00
Joey Hess
8e58ff7f71 check that ~/Desktop/annex can be written to; fall back to ~/annex when not 2013-12-24 17:04:07 -04:00
Joey Hess
3a6e0d1215 assistant: Set StrictHostKeyChecking yes when creating ssh remotes, and add 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 2013-12-20 20:58:36 -04:00
Joey Hess
adca65b31a remove some unused vars
Warnings for these are normally hidden somehow by TH, but show up when
building with EvilSplicer.
2013-12-18 22:39:15 -04:00
Joey Hess
13f7e51724 add a note about only writable drives being listed 2013-12-12 14:25:50 -04:00
Joey Hess
011b8bc7ec pull in Win32-extras, to be able to get current process id in Windows
Fixed up a number of things that had worked around there not being a way to
get that.

Most notably, transfer info files on windows now include the process id,
since no locking is currently done. This means the file format varies
between windows and unix.
2013-12-11 00:15:10 -04:00
Joey Hess
7c5261efb1 import fixes 2013-12-10 01:26:52 -04:00
Joey Hess
063a183a61 windows disk free space checking 2013-12-10 01:18:04 -04:00
Joey Hess
0bb9ace195 fix drive path so fileAccess will work with it 2013-12-09 17:58:49 -04:00
Joey Hess
98bd6e1f89 Revert "add /dashboard route as an alias for /"
This reverts commit a1880a152c.

Didn't help firefox problem.
2013-12-09 17:26:25 -04:00
Joey Hess
6f8693c59a redirect to /dashboard 2013-12-09 17:24:53 -04:00
Joey Hess
a1880a152c add /dashboard route as an alias for / 2013-12-09 17:14:45 -04:00
Joey Hess
d961985679 fix 2013-12-09 17:13:37 -04:00
Joey Hess
86a4b56db3 fix 2013-12-09 17:11:40 -04:00
Joey Hess
a268ac6c1d comment 2013-12-09 16:59:16 -04:00
Joey Hess
4866ec84df try all drive letters 2013-12-09 16:56:52 -04:00
Joey Hess
51b43f2b68 better default annex location on windows 2013-12-09 16:39:23 -04:00
Joey Hess
fc3a9a8adb make opening file browser work on windows 2013-12-09 16:39:10 -04:00
Joey Hess
8fb1973c76 move all static site files out of subdirectories
Works around yesod-static path bug on windows.
https://github.com/yesodweb/yesod/issues/626
2013-12-09 14:38:22 -04:00
Joey Hess
621ca07119 squash warning 2013-12-05 14:16:07 -04:00
Joey Hess
7a8e47d178 allow building on windows 2013-12-05 14:10:49 -04:00
Joey Hess
8c55003ae4 don't shown non-working file browser opening UI on android 2013-12-03 13:41:23 -04:00
Joey Hess
e425a966ed Deal with box.com changing the url of their webdav endpoint.
Use new url when making new remotes.

Transparently rewrite old url to new for existing remotes.
2013-12-02 16:01:20 -04:00
Joey Hess
a7e1dadf50 fix compat with old yesod 2013-11-25 15:14:34 -04:00
Joey Hess
8a9928742f more build fixes (remove phantom shutdown page) 2013-11-25 14:33:14 -04:00
Joey Hess
5163d5fb39 ensure that Android TH splice is expanded in native side of build 2013-11-25 13:01:53 -04:00
Joey Hess
7dc02b0c91 lifyH getYesod, to work with older version 2013-11-25 12:54:59 -04:00
Joey Hess
fdc10b9436 completely untested linux upgrade code 2013-11-23 23:45:49 -04:00
Joey Hess
fda641d27b improve android upgrade interface
and refactor
2013-11-23 22:12:36 -04:00
Joey Hess
e563c7e6f4 fsck distribution key 2013-11-23 21:58:39 -04:00
Joey Hess
32acf908bb queue and start download of git-annex from web, using git-annex, when upgrade is started 2013-11-23 17:21:04 -04:00
Joey Hess
6802123f7d use global webapp redirects when shutting down 2013-11-23 16:21:09 -04:00
Joey Hess
b1a89c448a replace horrible old daemon restart code with new method 2013-11-23 15:50:17 -04:00
Joey Hess
183f7355cd global webapp redirects, to finish upgrades
When an automatic upgrade completes, or when the user clicks on the upgrade
button in one webapp, but also has it open in another browser window/tab,
we have a problem: The current web server is going to stop running in
minutes, but there is no way to send a redirect to the web browser to the
new url.

To solve this, used long polling, so the webapp is always listening for
urls it should redirect to. This allows globally redirecting every open
webapp. Works great! Tested with 2 web browsers with 2 tabs each.
May be useful for other purposes later too, dunno.

The overhead is 2 http requests per page load in the webapp. Due to yesod's
speed, this does not seem to noticibly delay it. Only 1 of the requests
could possibly block the page load, the other is async.
2013-11-23 14:47:38 -04:00
Joey Hess
d24f7f94fe better UI flow through upgrade process
Move button to enable automatic upgrades to an alert displayed after
successful upgrade. Unclutters the UI and makes psychological sense.
2013-11-23 13:27:52 -04:00
Joey Hess
6abaf19c41 restart on upgrade is working, including automatic restart
Made alerts be able to have multiple buttons, so the alerts about upgrading
can have a button that enables automatic upgrades.

Implemented automatic upgrading when the program file has changed.

Note that when an automatic upgrade happens, the webapp displays an alert
about it for a few minutes, and then closes. This still needs work.
2013-11-23 00:54:08 -04:00
Joey Hess
7cd9f909e4 restart on upgrade now fully working 2013-11-22 23:42:16 -04:00
Joey Hess
b9cdb55e0c assistant restart on upgrade 2013-11-22 23:12:06 -04:00
Joey Hess
f8a3dd9c3d annex.autoupgrade added to webapp prefs page 2013-11-22 16:21:04 -04:00
Joey Hess
e2f17e9da3 upgrade alerts
The webapp will check twice a day, when the network is connected, to see if
it can download a distributon upgrade file. If a newer version is found,
display an upgrade alert.

This will need the autobuilders to set UPGRADE_LOCATION to the url
it can be downloaded from when building git-annex. Only builds with that
set need automatic upgrade alerts.

Currently, the upgrade page just requests the user manually download
and upgrade it. But, all the info is provided to do automated upgrades
in the future.

Note that urls used will need to all be https.

This commit was sponsored by Dirk Kraft.
2013-11-21 17:49:56 -04:00
Joey Hess
94251de91e add readFileStrictAnyEncoding 2013-11-20 13:41:13 -04:00
Joey Hess
9c20185f55 webapp: Check annex.version. 2013-11-17 14:58:35 -04:00
Joey Hess
f35cc2d4ba Android: Adjust default .gitignore to ignore .thumbnails at any location in the tree, not just at its top. 2013-11-16 18:48:16 -04:00
Joey Hess
69d68f9d53 work around OSX mavericks' broken cpp 2013-11-14 13:49:11 -04:00
Joey Hess
958312885f webapp: Improve UI around remote that have no annex.uuid set, either because setup of them is incomplete, or because the remote git repository is not a git-annex repository.
Complicated by such repositories potentially being repos that should have
an annex.uuid, but it failed to be gotten, perhaps due to the past ssh repo
setup bugs. This is handled now by an Upgrade Repository button.
2013-11-07 18:02:00 -04:00
Joey Hess
b7c15f3b60 webapp: Avoid encoding problems when displaying the daemon log file. 2013-11-07 15:29:20 -04:00
Joey Hess
4510819215 v5 for direct mode, with automatic upgrade
This includes storing the current state of the HEAD ref, which git annex
sync is going to need, but does not make sync use it.
2013-11-05 17:05:03 -04:00
Joey Hess
dfe3162bf5 fix editing unknown uuid
Before, assumed Nothing when getting remote meant it was the local repo,
and showed the edit form for that.
2013-11-05 12:38:54 -04:00
Joey Hess
6ab731f4b0 fix warning when building w/o CLIBS 2013-11-03 12:00:08 -04:00