Commit graph

300 commits

Author SHA1 Message Date
Joey Hess
6acc4fa83f avoid excessive debugging 2012-11-09 17:51:26 -04:00
Joey Hess
47c032a748 run xmpp push actions in separate thread from xmpp client
Took me a while to figure out why the xmpp client was not receiving git xmpp
push messages after a push started.
2012-11-09 16:04:55 -04:00
Joey Hess
13547aa659 add canpush xmpp command 2012-11-09 14:34:06 -04:00
Joey Hess
fb3b9412e4 xmpp push control flow
It might even work, although nothing yet triggers XMPP pushes.

Also added a set of deferred push messages. Only one push can run at a
time, and unrelated push messages get deferred. The set will never grow
very large, because it only puts two types of messages in there, that
can only vary in the client doing the push.
2012-11-08 16:46:29 -04:00
Joey Hess
0238e4ba07 hooked up XMPP git push send/receive (but not yet control flow) 2012-11-08 14:04:41 -04:00
Joey Hess
b827afba03 rename another 'close' 2012-11-07 14:56:32 -04:00
Joey Hess
b8585a9452 NetManager is only currently used with dbus 2012-11-07 14:56:32 -04:00
Joey Hess
8f08aa3f45 better handling of lifting from XMPP -> Assistant 2012-11-05 19:39:08 -04:00
Joey Hess
fdb6a88877 ignore Messages from our client's own jid
shouldn't ever happen, but hey
2012-11-05 17:54:21 -04:00
Joey Hess
da6fb44446 finished XMPP pairing!
This includes keeping track of which buddies we're pairing with, to know
which PairAck are legitimate.
2012-11-05 17:43:17 -04:00
Joey Hess
da65c5c1d1 tweak 2012-11-05 16:00:55 -04:00
Joey Hess
db36b11e28 switch to silent chat messages for XMPP pairing
Along the way, significantly cleaned up Assistant.XMPP, and made XMPP
message decoding more efficient.
2012-11-05 15:40:56 -04:00
Joey Hess
0b8027e527 webapp: When setting up authorized_keys, use GIT_ANNEX_SHELL_DIRECTORY. 2012-11-05 12:35:05 -04:00
Joey Hess
a6cecfcf33 workaround for Google Talk's insane handling of self-directed presence
Maybe the spec allows it, but broadcasting self-directed presence info to
all buddies is just insane.

I had to bring back the IQ messages for self-pairing, while still using
directed presence for other pairing. Ugly.
2012-11-03 22:52:41 -04:00
Joey Hess
9cff286ea3 avoid repeated pairing alerts 2012-11-03 21:38:27 -04:00
Joey Hess
17e84a8096 switch to directed presence for pair requests
Testing between Google Talk and prosody, the directed IQ messages
were not received. Google Talk probably only relays them between
clients using the same account.

I first tried even more directed presence, with each client JID being sent
a separate presence, but that didn't work on Google Talk, particularly
it was ignored when one client sent it to another client using the same
account.

So, presence directed at the user@host of the client to pair with. Tested
working between Google Talk and prosody (in both directions), as well
as between two clients with the same account on Google Talk, and
two clients with the same account on prosody.

Only problem with this form of directed presence is that if I also use it
for git pushes, more clients than are interested in a push's data will
receive it. So I may need some better approach, or a hybrid between
directed IQ and directed presence.
2012-11-03 21:19:59 -04:00
Joey Hess
42f030c905 XMPP pair requests are now received, and an alert displayed 2012-11-03 17:46:22 -04:00
Joey Hess
b95c255b6d XMPP pairing notifications are now sent
Rest of pairing process still to do.
2012-11-03 16:01:09 -04:00
Joey Hess
cbbfd4d00b bugfix 2012-11-03 14:32:59 -04:00
Joey Hess
9a8d0be866 send a presence query when the buddy list is displayed
This ensures that clients that have not sent presence in a while will show
up in the list.
2012-11-03 14:25:06 -04:00
Joey Hess
a1228e27ed refactor XMPP client 2012-11-03 14:16:17 -04:00
Joey Hess
bf17262986 ignore our own client presence 2012-11-02 21:23:58 -04:00
Joey Hess
6a61829e2d add buddy list to pairing UI 2012-11-02 21:13:06 -04:00
Joey Hess
2ae43e71e0 xmpp buddy list tracking 2012-11-02 14:28:36 -04:00
Joey Hess
88d1907278 where indentation 2012-10-31 02:34:03 -04:00
Joey Hess
a1bd5b1fa0 don't delay at startup
Still wait 1 minute after a change before waiting on the next change, but don't
wait at the start, when we might get a pull that contains config changes
right away.
2012-10-30 17:23:42 -04:00
Joey Hess
93ffd47d76 finished pushing Assistant monad into all relevant files
All temporary and old functions are removed.
2012-10-30 17:14:51 -04:00
Joey Hess
47d94eb9a4 pushed Assistant monad down into DaemonStatus code
Currently have three old versions of functions that more reworking is
needed to remove: getDaemonStatusOld, modifyDaemonStatusOld_, and
modifyDaemonStatusOld
2012-10-30 15:39:15 -04:00
Joey Hess
ea8df8fe9f cleanup daemonStatus accessors 2012-10-30 14:44:18 -04:00
Joey Hess
68118b8986 split remaining assistant types 2012-10-30 14:34:48 -04:00
Joey Hess
f78ca9bc58 split out daemonstatus types 2012-10-30 14:11:14 -04:00
Joey Hess
42babf5012 split Commits and lifted 2012-10-29 19:35:18 -04:00
Joey Hess
d2294f0dfa split Changes and lifted 2012-10-29 19:30:23 -04:00
Joey Hess
39a3adf434 split BranchChange and lifted 2012-10-29 19:20:54 -04:00
Joey Hess
0c584bf70d split ScanRemotes and lifted 2012-10-29 19:14:30 -04:00
Joey Hess
86cb3faf51 moved ThreadedMonad to Types 2012-10-29 19:07:10 -04:00
Joey Hess
87ba4f8677 split and lift Assistant.Pushes 2012-10-29 17:52:43 -04:00
Joey Hess
d5a5c05a79 tweak 2012-10-29 17:02:50 -04:00
Joey Hess
1852eddce6 lift alertWhile 2012-10-29 16:49:47 -04:00
Joey Hess
e18b733c81 move alert display functions 2012-10-29 16:34:11 -04:00
Joey Hess
94ae5d14e5 more lifting 2012-10-29 16:28:45 -04:00
Joey Hess
5d57b28a34 lifted Assistant.Sync into Assistant monad
lots of nice cleanups
2012-10-29 16:22:14 -04:00
Joey Hess
0ffce4a942 tweak 2012-10-29 14:30:10 -04:00
Joey Hess
67ce7929a5 Assistant monad, stage 3
All toplevel named threads are converted to the Assistant monad.

Some utility functions still need to be converted.
2012-10-29 14:07:12 -04:00
Joey Hess
3eecb5b7bb converted 2 more threads.. only 2 more to go 2012-10-29 13:09:58 -04:00
Joey Hess
0ba4df3c1a tweak 2012-10-29 11:58:29 -04:00
Joey Hess
76768ad977 converted 6 more threads 2012-10-29 11:40:22 -04:00
Joey Hess
bad88e404a convert Watcher thread to Assistant monad
This is a nice win; much less code runs in Annex, so other threads have
more chances to run concurrently.

I do notice that renaming a file has gone from 1 to 2 commits. I think this
is due to the above improvement letting the committer run more frequently,
so it commits the rm first.
2012-10-29 09:55:40 -04:00
Joey Hess
4dbdc2b666 Assistant monad, stage 2.5
Converted several threads to run in the monad.

Added a lot of useful combinators for working with the monad.

Now the monad includes the name of the thread.

Some debugging messages are disabled pending converting other threads.
2012-10-29 02:21:04 -04:00
Joey Hess
4e765327ca Assistant monad, stage 1
This adds the Assistant monad, and an AssistantData structure.
So far, none of the assistant's threads run in the monad yet.
2012-10-29 00:15:43 -04:00