Merge lp:~mandel/ubuntuone-client/daemon-options into lp:ubuntuone-client
| Status: | Merged |
|---|---|
| Approved by: | Manuel de la Peña on 2012-07-19 |
| Approved revision: | 1320 |
| Merged at revision: | 1280 |
| Proposed branch: | lp:~mandel/ubuntuone-client/daemon-options |
| Merge into: | lp:ubuntuone-client |
| Prerequisite: | lp:~mandel/ubuntuone-client/unify-filemonitors |
| Diff against target: |
789 lines (+254/-225) 17 files modified
bin/ubuntuone-syncdaemon (+6/-1) data/syncdaemon.conf (+6/-0) tests/platform/filesystem_notifications/test_darwin.py (+7/-0) tests/platform/filesystem_notifications/test_fsevents_daemon.py (+51/-7) tests/platform/filesystem_notifications/test_linux.py (+8/-0) tests/platform/filesystem_notifications/test_windows.py (+7/-0) tests/syncdaemon/test_config.py (+13/-0) tests/syncdaemon/test_eventqueue.py (+17/-0) ubuntuone/platform/__init__.py (+6/-0) ubuntuone/platform/filesystem_notifications/__init__.py (+1/-0) ubuntuone/platform/filesystem_notifications/monitor/__init__.py (+59/-6) ubuntuone/platform/filesystem_notifications/monitor/common.py (+7/-0) ubuntuone/platform/filesystem_notifications/monitor/darwin/fsevents_daemon.py (+51/-206) ubuntuone/platform/filesystem_notifications/monitor/linux.py (+6/-0) ubuntuone/syncdaemon/event_queue.py (+6/-2) ubuntuone/syncdaemon/filesystem_notifications.py (+0/-1) ubuntuone/syncdaemon/main.py (+3/-2) |
| To merge this branch: | bzr merge lp:~mandel/ubuntuone-client/daemon-options |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Mike McCracken (community) | 2012-07-17 | Approve on 2012-07-18 | |
| Diego Sarmentero (community) | Approve on 2012-07-18 | ||
|
Review via email:
|
|||
Commit Message
- Provides an extra command line that allows to choose which filemonitor implementation to use with the ubuntuone sync daemon (LP: 1025689).
Description of the Change
Provides an extra command line that allows to choose which filemonitor implementation to use with the ubuntuone sync daemon. Right now on Windows and Linux there is only one implementation while on Darwin there are two of them.
The test results should be:
Linux => all pass
Windows => atm one failure (currently present in trunk).
Darwin => tests/platform/
| Manuel de la Peña (mandel) wrote : | # |
> A couple minor things I think should change and a few comments about
> importing at the end that you can feel free to argue with...
>
> # typos:
> - "test test" in a couple docstrings
> - get_filemonitor
> you mean "no active…"?
> (or "no available", see below)
>
>
Fixed!
> # naming issue:
> - is_active_monitor is a little confusing in english. It's intended to
> tell us if the monitor is usable (ie, installed, for the daemon),
> right?
> "Is active monitor" sounds like it's telling us if this monitor is
> currently active, which it isn't doing.
>
> How about "is_available" or "is_installed" instead?
> Since it's a method on the monitor class, I left out "monitor" in
> those suggestions intentionally.
>
Fixed !
> -----> up for discussion: lots of assignments in __init__ files from
> submodules that don't seem platform-specific:
>
> I looked at the assignment to get_filemonitor
> a bit - some of this isn't new in this diff, but might be
> nice to fix here, instead of adding code that does the same thing:
> (Feel free to disagree if you think it's not productive)
>
> # why is get_filemonitor
> platform/
> it looks like it's never accessed as
> filesystem_
> filesystem_
> platform/
>
> So, that assignment is unnecessary, and
>
> # importing filesystemMonitor - there are a lot of ways to import
> it. I think we could remove the assignments in platform/
> and filesystem_
> just get it from platform.
> everywhere - we already do this in a few places.
>
> - syncdaemon/
> platform.
> from platform. (seems like those should be the same)
>
> - test_windows and test_darwin import it from
> u.platform.
> gets it from platform.
>
> # related to the above: _GeneralINotify
> used in test_filesystem
> remove the assignment in filesystem_
Completely agree with this but is maybe better to create a bug and do it in a diff branch to keep things easier, what do you think?
| Diego Sarmentero (diegosarmentero) wrote : | # |
== Python Lint Notices ==
./tests/
399: local variable 'is_available' is assigned to but never used
400: undefined name 'is_availabe'
make: *** [lint] Error 2
| Mike McCracken (mikemc) wrote : | # |
A couple more places where s/active/available/ needs to happen:
- the NoActiveMonitor
- the assertion messages in filesystem_
| Ubuntu One Auto Pilot (otto-pilot) wrote : | # |
The prerequisite https:/
- 1318. By Manuel de la Peña on 2012-07-19
-
Merged with parent.
- 1319. By Manuel de la Peña on 2012-07-19
-
Merged with changes from other platforms work.
- 1320. By Manuel de la Peña on 2012-07-19
-
Merged unify-filemonitors into daemon-options.


A couple minor things I think should change and a few comments about
importing at the end that you can feel free to argue with...
# typos: _class exception strings say "Not active monitor", I think you mean "no active…"?
- "test test" in a couple docstrings
- get_filemonitor
(or "no available", see below)
# naming issue:
- is_active_monitor is a little confusing in english. It's intended to
tell us if the monitor is usable (ie, installed, for the daemon),
right?
"Is active monitor" sounds like it's telling us if this monitor is
currently active, which it isn't doing.
How about "is_available" or "is_installed" instead?
Since it's a method on the monitor class, I left out "monitor" in
those suggestions intentionally.
-----> up for discussion: lots of assignments in __init__ files from
submodules that don't seem platform-specific:
I looked at the assignment to get_filemonitor _class, and poked around
a bit - some of this isn't new in this diff, but might be
nice to fix here, instead of adding code that does the same thing:
(Feel free to disagree if you think it's not productive)
# why is get_filemonitor _class being added to the namespace in platform/ filesystem_ notifications/ __init_ _.py? notifications. get_filemonitor _class, but always as notifications. monitor. get_filemonitor _class, (eg in __init_ _.py).
it looks like it's never accessed as
filesystem_
filesystem_
platform/
So, that assignment is unnecessary, and
# importing filesystemMonitor - there are a lot of ways to import __init_ _.py, notifications/ __init_ _.py, since it's possible to filesystem_ notifications. monitor
it. I think we could remove the assignments in platform/
and filesystem_
just get it from platform.
everywhere - we already do this in a few places.
- syncdaemon/ event_queue. py imports it from filesystem_ notifications, while test_eventqueue imports it
platform.
from platform. (seems like those should be the same)
- test_windows and test_darwin import it from filesystem_ notifications. monitor. common, while test_linux filesystem_ notifications.
u.platform.
gets it from platform.
# related to the above: _GeneralINotify Processor seems like it's only _notifications. maybe we should change that and notifications/ __init_ _.py:36
used in test_filesystem
remove the assignment in filesystem_