Commit graph

40 commits

Author SHA1 Message Date
Joey Hess
88d1907278 where indentation 2012-10-31 02:34:03 -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
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
3eecb5b7bb converted 2 more threads.. only 2 more to go 2012-10-29 13:09:58 -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
d1e5f2d596 Merge branch 'master' into xmpp
Conflicts:
	Assistant/Threads/NetWatcher.hs
2012-10-26 19:42:24 -04:00
Joey Hess
8e4620a6c7 NetWatcher: When dbus connection is lost, try to reconnect.
MountWatcher can't do this, because it uses the session dbus,
and won't have access to the new DBUS_SESSION_BUS_ADDRESS if a new session
is started.

Bumped dbus library version, FD leak in it is fixed.
2012-10-26 19:38:27 -04:00
Joey Hess
0b1cf3a766 Merge branch 'master' into xmpp
Conflicts:
	Assistant/Threads/MountWatcher.hs
	Assistant/Threads/NetWatcher.hs
2012-10-26 00:10:41 -04:00
Joey Hess
ef7b53e784 improved dbus error handling
Now when the dbus connection is dropped, it'll fall back to polling.

I could make it try to reconnect, but there's a FD leak in the dbus
library, so not yet.
2012-10-26 00:02:03 -04:00
Joey Hess
ae8a3ab31e added push notifier thread, currently a no-op
Hooked up everything that needs to notify on pushes. Note that
syncNewRemote does not notify. This is probably ok, and I'd need to thread
more state through to make it do so.

This is only set up to support a single push notification method; I didn't
use a NotificationBroadcaster. Partly because I don't yet know what info
about pushes needs to be communicated, so my data types are only
preliminary.
2012-10-24 13:38:28 -04:00
Joey Hess
6ea6a2e71c better variable name 2012-10-14 14:50:03 -04:00
Joey Hess
74a6e8ff60 avoid some warnings when built w/o dbus 2012-09-29 16:09:07 -04:00
Joey Hess
a00f1d26bc display errors when any named thread crashes 2012-09-06 14:56:04 -04:00
Joey Hess
78d3add86b tweak field name 2012-08-26 14:26:43 -04:00
Joey Hess
f3721d89bc also notice dbus unmount events 2012-08-23 18:58:54 -04:00
Joey Hess
546ba8b7e1 better name 2012-08-22 15:37:26 -04:00
Joey Hess
68659f4998 refactor 2012-08-22 14:32:17 -04:00
Joey Hess
5a68acb521 add NetWatcher thread
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
2012-08-21 19:58:53 -04:00
Joey Hess
8f1a9ef8b5 added an alert after a file transfer 2012-08-06 17:09:23 -04:00
Joey Hess
5ae1f75a39 handle case of adding populated drive to just created repo
The just created repo has no master branch commits yet. This is now
handled, merging in the master branch from the populated drive.
2012-08-05 16:35:30 -04:00
Joey Hess
34fc0d358e fix crashes when run in a git repo that has been initted but has no master branch yet 2012-08-05 15:53:47 -04:00
Joey Hess
ac71ab7bd7 avoid head 2012-08-05 15:10:26 -04:00
Joey Hess
cb0f435d94 adding removable drive repos now basically works 2012-08-05 14:49:47 -04:00
Joey Hess
3add2cd3ba wire up scan and transfer to newly added removable drive
remote setup still todo
2012-08-04 21:18:57 -04:00
Joey Hess
3dce75fb23 make old activiy alerts stay visible
They're updated to show whether the activity succeeded or failed.

This adds several TODOs to the code to fix later.
2012-07-30 02:39:24 -04:00
Joey Hess
d52c932424 moved all alert messages into one file
Makes it easier to edit for consistent voice etc.
2012-07-29 18:09:24 -04:00
Joey Hess
09e77a0cf0 add some alerts 2012-07-29 13:22:08 -04:00
Joey Hess
522f568450 add TransferScanner thread
Efficiently finding transfers that need to be done to get two repos back
in sync seems like an interesting problem.
2012-07-22 23:16:56 -04:00
Joey Hess
26e4e65307 filter out special remotes when pulling 2012-07-22 15:09:40 -04:00
Joey Hess
e4f714d1be pull from newly mounted git remotes 2012-07-22 15:06:18 -04:00
Joey Hess
b48d7747a3 debugging improvements
add timestamps to debug messages

Add lots of debug output in the assistant's threads.
2012-07-20 19:29:59 -04:00
Joey Hess
42e73537d1 detect KDE automounting
Best dbus events I could find were setupDone from org.kde.Solid.Device.
There may be some spurious events, but that's ok, the code will only
check to see if new mounts are available.

It does not try to auto-start this service if it's not running.
2012-07-20 18:14:57 -04:00
Joey Hess
2fce3940b5 catch all errors 2012-07-20 02:16:09 -04:00
Joey Hess
d9f26115c3 use dbus to activate GduVolumeMonitor if it's not already running 2012-07-20 01:59:21 -04:00
Joey Hess
6b4fe507f6 only use dbus when there's a client connected we know will send mount events 2012-07-19 23:34:33 -04:00
Joey Hess
0496a3971d store whole Mntents
This way, if a mount point was already mounted, but something else
gets mounted there, it'll be seen as a new mount.
2012-07-19 21:25:26 -04:00
Joey Hess
107a7b9388 try to make Utility.Mounts portable
This is an unholy mashup, but it just might work. It works on Linux,
that's all I've tested. :)
2012-07-19 20:38:58 -04:00
Joey Hess
f20a40f9d4 MountWatcher thread
Currently only prints mount points when mounts happen.
2012-07-19 13:04:33 -04:00