Commit graph

880 commits

Author SHA1 Message Date
Joey Hess
ad6fee422a fix warning 2013-05-04 16:36:51 -04:00
Joey Hess
001d82f953 fix warning 2013-05-04 16:35:54 -04:00
Joey Hess
d35132810a Got removable media mount detection working on Android.
Bionic has an amusing stub for `getmntent` that prints out
"FIX ME! implement getmntent()"

But, `/proc/mounts` is there, so I just parse it.
2013-05-04 16:19:25 -04:00
Joey Hess
d994f35937 disable hostname validation and canonicalization on android 2013-05-04 14:26:49 -04:00
Joey Hess
33334bfe2e added special camera repository to start screen for android 2013-05-03 15:21:31 -04:00
Joey Hess
ce47f4cb20 --listen is not supported on Android 2013-05-02 16:47:42 -04:00
Joey Hess
e92f04f9cc build fix for -XMPP 2013-05-02 13:04:49 -04:00
Joey Hess
d9e288b0fd fix build with S3 disabled (for Android) 2013-05-01 13:27:51 -04:00
Joey Hess
50a8ea4cdc avoid auto-accepting pair requests from friends already paired with
Unless the request is for repo uuid we already know. This way, if A1 pairs
with friend B1, and B1 pairs with device B2, then B1 can request A1 pair
with it and no confirmation is needed. (In future, may want to try to do
that automatically, to make a more robust network.)
2013-04-30 17:38:58 -04:00
Joey Hess
e363cefcb3 assistant: Fix bug that could cause incoming pushes to not get merged into the local tree.
Observed that the pushed refs were received, but not merged into master.
The merger never saw an add event for these refs. Either git is not writing
to a new file and renaming it into place, or the inotify code didn't notice
that. Changed it to also watch for modify events and that seems to have
fixed it!
2013-04-30 16:37:13 -04:00
Joey Hess
e06a4e12b5 more xmpp debugging 2013-04-30 15:56:33 -04:00
Joey Hess
017f62654f stop using UltDest, doesn't seem to reliably work 2013-04-30 15:21:49 -04:00
Joey Hess
df88c51334 add uuid to all xmpp messages
(Except for the actual streaming of receive-pack through XMPP, which
can only run once we've gotten an appropriate uuid in a push initiation
message.)

Pushes are now only initiated when the initiation message comes from a
known uuid. This allows multiple distinct repositories to use the same xmpp
address.

Note: This probably breaks initial push after xmpp pairing, because at that
point we may not know about the paired uuid, and so reject the push from
it. It won't break in simple cases, because the annex-uuid of the remote
is checked. However, when there are multiple clients behind a single xmpp
address, only uuid of the first is recorded in annex-uuid, and so any
pushes from the others will be rejected (unless the first remote pushes their
uuids to us beforehand.
2013-04-30 13:22:55 -04:00
Joey Hess
c3498042fd webapp: Now automatically fills in any creds used by an existing remote when creating a new remote of the same type. Done for Internet Archive, S3, Glacier, and Box.com remotes. 2013-04-27 15:16:06 -04:00
Joey Hess
85d83e7756 To enable an existing special remote, the new enableremote command must be used. The initremote command now is used only to create new special remotes. 2013-04-26 18:22:52 -04:00
Joey Hess
8a7e059f54 fix build w/o s3 2013-04-26 16:12:23 -04:00
Joey Hess
440d6e331f tweak
This works around a bug in the EvilSplicer
2013-04-26 15:20:31 -04:00
Joey Hess
b4f4ed7d93 fix build with newer yesod 2013-04-26 15:06:18 -04:00
Joey Hess
8603109294 allow configuring the preferreddir 2013-04-26 13:01:06 -04:00
Joey Hess
867cba52a0 better default collections 2013-04-26 01:46:07 -04:00
Joey Hess
0ae8c82c53 per-IA-item content directories 2013-04-25 23:44:55 -04:00
Joey Hess
e3ea36174b webapp: Display some additional information about a repository on its edit page. 2013-04-25 16:42:17 -04:00
Joey Hess
8284b310a7 support enabling IA repositories 2013-04-25 13:14:49 -04:00
Joey Hess
2810807ca5 Internet Archive!
* Add public repository group.
* webapp: Can now set up Internet Archive repositories.

TODO: Enabling IA repositories.
2013-04-25 12:23:36 -04:00
Joey Hess
362ed9f0e3 use DList for the transfer queue
Some nice efficiency gains here for list appending, although mostly
the small size of the transfer queue makes them irrelivant.
2013-04-25 01:33:44 -04:00
Joey Hess
c6da464051 use a DList for the deferred downloads queue 2013-04-25 01:26:23 -04:00
Joey Hess
82a6db8fe8 committer tweak to wait for Watcher to resume after a max-size commit
Without this, a very large batch add has commits of sizes approx
5000, 2500, 1250, etc down to 10, and then starts over at 5000.
This fixes it so it's 5000+ every time.
2013-04-25 00:48:09 -04:00
Joey Hess
a9081ae473 optimise direct mode startup scan
A recent change made existing symlinks be re-staged. That does not need to
be done during the startup scan though.
2013-04-24 21:20:29 -04:00
Joey Hess
46529c0129 assistant: Sanitize XMPP presence information logged for debugging. 2013-04-24 21:13:10 -04:00
Joey Hess
ebee93a837 get rid of need to run pre-commit hook when assistant commits in direct mode
That hook updates associated file bookkeeping info for direct mode.
But, everything already called addAssociatedFile when adding/changing a
file. It only needed to also call removeAssociatedFile when deleting a file,
or a directory.

This should make bulk adds faster, by some possibly significant amount.
Bulk removals may be a little slower, since it has to use catKeyFile now
on each removed file, but will still be faster than adds.
2013-04-24 18:04:59 -04:00
Joey Hess
cb575cbe91 fix bda237f14a
Converted back to the wrong type, oops.
2013-04-24 17:50:11 -04:00
Joey Hess
b8e45ec9d7 refactoring and minor performance tweak 2013-04-24 17:46:46 -04:00
Joey Hess
7fa2d255da remove last use of TSet 2013-04-24 17:16:04 -04:00
Joey Hess
cd7055631f batch commit every 5 thousand changes, not 10 thousand
There's a tradeoff between making less frequent commits, and
needing to use memory to store all the changes that are coming
in. At 10 thousand, it needs 150 mb of memory. 5 thousand drops
that down to 90 mb or so.

This also turns out to have significant imact on total run time.
I benchmarked 10k changes taking 27 minutes. But two 5k batches
took only 21 minutes.
2013-04-24 16:40:35 -04:00
Joey Hess
bda237f14a convert PendingAddChange back to Change when an add fails
If an add failed, we should lose the KeySource, since it, presumably,
differs due to a change that was made to the file.

(The locked down file is already deleted.)
2013-04-24 16:29:25 -04:00
Joey Hess
76431520e4 use TList for ChangePool 2013-04-24 16:13:22 -04:00
Joey Hess
a929e6641a show one alert when bulk adding files
Turns out that a lot of the time spent in a bulk add was just updating the
add alert to rotate through each file that was added. Showing one alert
makes for a significant speedup.

Also, when the webapp is open, this makes it take quite a lot less cpu
during bulk adds.

Also, it lets the user know when a bulk add happened, which is sorta
nice..
2013-04-24 13:04:46 -04:00
Joey Hess
01bedb54c6 improve display of multiline messages in alerts
This better handles error messages formatted for console display, by
adding a <br> after each line.

Hmm, I wonder if it'd be worth pulling in a markdown formatter, and running
the messages through it?
2013-04-24 11:45:41 -04:00
Joey Hess
e72f0b2898 only show latest warning, rather than combining warning alerts
In the case of the inotify limit warning, particularly, if it happens once
it will be happening repeatedly, and so combining alerts resulted in a
much too large alert message that took up a lot of memory and was too
large for the webapp to display.
2013-04-24 11:27:30 -04:00
Joey Hess
ca72b1ac7b assistant: when an add fails, requeue it for later
See analysis in bug report for one way this could happen.
2013-04-23 18:23:04 -04:00
Joey Hess
daecfd5bd7 more efficient data type for ChangeChan
Making this a tset of lists of Changes, rather than a tset of Changes
makes refilling it, in batch mode, much more efficient. Rather than needing
to add every Change it's collected one at a time, it can add them in one
fast batch operation.

It would be more efficient yet to use a Set, but that would need an Eq
instance for InodeCache.
2013-04-23 14:54:54 -04:00
Joey Hess
2c42e70f6c rename module 2013-04-23 11:38:52 -04:00
Joey Hess
8a2d1988d3 expose Control.Monad.join
I think I've been looking for that function for some time.
Ie, I remember wanting to collapse Just Nothing to Nothing.
2013-04-22 20:24:53 -04:00
Joey Hess
450baa02e9 assistant: When built with git before 1.8.0, use git remote rm to delete a remote. Newer git uses git remote remove. 2013-04-22 16:53:09 -04:00
Joey Hess
e92a207df5 webapp: When told to add a git repository on a remote server, and the repository already exists as a non-bare repository, use it, rather than initializing a bare repository in the same directory. 2013-04-22 16:21:37 -04:00
Joey Hess
9cb223a8b3 Detect systems that have no user name set in GECOS, and also don't have user.name set in git config, and put in a workaround so that commits to the git-annex branch (and the assistant) will still succeed despite git not liking the system configuration. 2013-04-22 15:36:34 -04:00
Joey Hess
8861e270be sync, assistant: Sync with remotes that have annex-ignore set
This is so git remotes on servers without git-annex installed can be used
to keep clients' git repos in sync.

This is a behavior change, but since annex-sync can be set to disable
syncing with a remote, I think it's acceptable.
2013-04-22 14:57:09 -04:00
Joey Hess
1579c98d4d fix osx build 2013-04-22 11:24:48 -04:00
Joey Hess
8df5be7804 fix build with xmpp enabled but not local pairing 2013-04-21 13:24:56 -04:00
Joey Hess
580f22f45d forgot to commit this new file 2013-04-20 19:27:36 -04:00