Merge lp:~mandel/ubuntuone-client/correct-namespace into lp:ubuntuone-client

Proposed by Manuel de la Peña on 2012-07-23
Status: Merged
Approved by: Manuel de la Peña on 2012-08-01
Approved revision: 1281
Merged at revision: 1284
Proposed branch: lp:~mandel/ubuntuone-client/correct-namespace
Merge into: lp:ubuntuone-client
Diff against target: 178 lines (+28/-28)
2 files modified
tests/platform/filesystem_notifications/test_fsevents_daemon.py (+8/-8)
ubuntuone/platform/filesystem_notifications/monitor/darwin/fsevents_daemon.py (+20/-20)
To merge this branch: bzr merge lp:~mandel/ubuntuone-client/correct-namespace
Reviewer Review Type Date Requested Status
Alejandro J. Cura (community) Approve on 2012-07-31
Roberto Alsina (community) 2012-07-23 Approve on 2012-07-30
Review via email: mp+116264@code.launchpad.net

Commit Message

- Use the correct name space (LP: 1026209).

Description of the Change

- Use the correct name space (LP: 1026209).

To post a comment you must log in.
Roberto Alsina (ralsina) :
review: Approve
Alejandro J. Cura (alecu) wrote :

Looks good!

Please make sure that lp:~mandel/ubuntuone-fsevents-daemon/correct-namespace gets merged before this one.

review: Approve
Ubuntu One Auto Pilot (otto-pilot) wrote :
Download full text (254.2 KiB)

The attempt to merge lp:~mandel/ubuntuone-client/correct-namespace into lp:ubuntuone-client failed. Below is the output from the failed tests.

/usr/bin/gnome-autogen.sh
checking for autoconf >= 2.53...
  testing autoconf2.50... not found.
  testing autoconf... found 2.69
checking for automake >= 1.10...
  testing automake-1.11... found 1.11.5
checking for libtool >= 1.5...
  testing libtoolize... found 2.4.2
checking for intltool >= 0.30...
  testing intltoolize... found 0.50.2
checking for pkg-config >= 0.14.0...
  testing pkg-config... found 0.26
checking for gtk-doc >= 1.0...
  testing gtkdocize... found 1.18
Checking for required M4 macros...
Checking for forbidden M4 macros...
Processing ./configure.ac
Running libtoolize...
libtoolize: putting auxiliary files in `.'.
libtoolize: copying file `./ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
libtoolize: copying file `m4/libtool.m4'
libtoolize: copying file `m4/ltoptions.m4'
libtoolize: copying file `m4/ltsugar.m4'
libtoolize: copying file `m4/ltversion.m4'
libtoolize: copying file `m4/lt~obsolete.m4'
Running intltoolize...
Running gtkdocize...
Running aclocal-1.11...
Running autoconf...
Running autoheader...
Running automake-1.11...
Running ./configure --enable-gtk-doc --enable-debug ...
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking for library containing strerror... none required
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking dependency style of gcc... (cached) gcc3
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
...

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tests/platform/filesystem_notifications/test_fsevents_daemon.py'
2--- tests/platform/filesystem_notifications/test_fsevents_daemon.py 2012-07-19 14:13:06 +0000
3+++ tests/platform/filesystem_notifications/test_fsevents_daemon.py 2012-07-23 12:28:18 +0000
4@@ -26,14 +26,14 @@
5 # do not wish to do so, delete this exception statement from your
6 # version. If you delete this exception statement from all source
7 # files in the program, then also delete it here.
8-"""Tests for the fsevents daemon integration."""
9+"""Tests for the fseventsd daemon integration."""
10
11 import os
12
13 from twisted.internet import defer, protocol
14
15 from contrib.testing.testcase import BaseTwistedTestCase
16-from ubuntuone.darwin import fsevents
17+from ubuntuone import fseventsd
18 from ubuntuone.devtools.testcases.txsocketserver import TidyUnixServer
19 from ubuntuone.platform.filesystem_notifications.monitor.darwin import (
20 fsevents_daemon,
21@@ -272,7 +272,7 @@
22 head, _ = os.path.split(destination_path)
23 self.factory.watched_paths.append(head)
24 event = FakeDaemonEvent()
25- event.event_type = fsevents.FSE_RENAME
26+ event.event_type = fseventsd.FSE_RENAME
27 event.event_paths.extend([source_path, destination_path])
28 converted_events = self.factory.convert_in_pyinotify_event(event)
29 self.assertEqual(1, len(converted_events))
30@@ -289,7 +289,7 @@
31 head, _ = os.path.split(source_path)
32 self.factory.watched_paths.append(head)
33 event = FakeDaemonEvent()
34- event.event_type = fsevents.FSE_RENAME
35+ event.event_type = fseventsd.FSE_RENAME
36 event.event_paths.extend([source_path, destination_path])
37 converted_events = self.factory.convert_in_pyinotify_event(event)
38 self.assertEqual(1, len(converted_events))
39@@ -306,7 +306,7 @@
40 head, _ = os.path.split(source_path)
41 self.factory.watched_paths.append(head)
42 event = FakeDaemonEvent()
43- event.event_type = fsevents.FSE_RENAME
44+ event.event_type = fseventsd.FSE_RENAME
45 event.event_paths.extend([source_path, destination_path])
46 converted_events = self.factory.convert_in_pyinotify_event(event)
47 self.assertEqual(2, len(converted_events))
48@@ -337,7 +337,7 @@
49 """Test processing the drop of the events."""
50 func_called = []
51 event = FakeDaemonEvent()
52- event.event_type = fsevents.FSE_EVENTS_DROPPED
53+ event.event_type = fseventsd.FSE_EVENTS_DROPPED
54
55 def fake_events_dropped():
56 """A fake events dropped implementation."""
57@@ -354,7 +354,7 @@
58 self.factory.ignored_paths.append(head)
59 event = FakeDaemonEvent()
60 event.event_paths.append(event_path)
61- event.event_type = fsevents.FSE_CREATE_FILE
62+ event.event_type = fseventsd.FSE_CREATE_FILE
63 self.factory.process_event(event)
64 self.assertEqual(0, len(self.processor.processed_events))
65
66@@ -365,7 +365,7 @@
67 self.factory.watched_paths.append(head)
68 event = FakeDaemonEvent()
69 event.event_paths.append(event_path)
70- event.event_type = fsevents.FSE_CREATE_FILE
71+ event.event_type = fseventsd.FSE_CREATE_FILE
72 self.factory.process_event(event)
73 self.assertEqual(1, len(self.processor.processed_events))
74 self.assertEqual(event_path,
75
76=== modified file 'ubuntuone/platform/filesystem_notifications/monitor/darwin/fsevents_daemon.py'
77--- ubuntuone/platform/filesystem_notifications/monitor/darwin/fsevents_daemon.py 2012-07-19 14:13:06 +0000
78+++ ubuntuone/platform/filesystem_notifications/monitor/darwin/fsevents_daemon.py 2012-07-23 12:28:18 +0000
79@@ -25,7 +25,7 @@
80 # do not wish to do so, delete this exception statement from your
81 # version. If you delete this exception statement from all source
82 # files in the program, then also delete it here.
83-"""Filesystem notifications based on the fsevents daemon.."""
84+"""Filesystem notifications based on the fseventsd daemon.."""
85
86 import logging
87 import os
88@@ -42,7 +42,7 @@
89 )
90
91 from ubuntuone import logger
92-from ubuntuone.darwin import fsevents
93+from ubuntuone import fseventsd
94 from ubuntuone.platform.filesystem_notifications.notify_processor import (
95 NotifyProcessor,
96 )
97@@ -61,24 +61,24 @@
98
99 TRACE = logger.TRACE
100
101-# map the fsevents actions to those from pyinotify
102+# map the fseventsd actions to those from pyinotify
103 DARWIN_ACTIONS = {
104- fsevents.FSE_CREATE_FILE: IN_CREATE,
105- fsevents.FSE_DELETE: IN_DELETE,
106- fsevents.FSE_STAT_CHANGED: IN_MODIFY,
107- fsevents.FSE_CONTENT_MODIFIED: IN_MODIFY,
108- fsevents.FSE_CREATE_DIR: IN_CREATE,
109+ fseventsd.FSE_CREATE_FILE: IN_CREATE,
110+ fseventsd.FSE_DELETE: IN_DELETE,
111+ fseventsd.FSE_STAT_CHANGED: IN_MODIFY,
112+ fseventsd.FSE_CONTENT_MODIFIED: IN_MODIFY,
113+ fseventsd.FSE_CREATE_DIR: IN_CREATE,
114 }
115
116 # list of those events from which we do not care
117 DARWIN_IGNORED_ACTIONS = (
118- fsevents.FSE_UNKNOWN,
119- fsevents.FSE_INVALID,
120- fsevents.FSE_EXCHANGE,
121- fsevents.FSE_FINDER_INFO_CHANGED,
122- fsevents.FSE_CHOWN,
123- fsevents.FSE_XATTR_MODIFIED,
124- fsevents.FSE_XATTR_REMOVED,
125+ fseventsd.FSE_UNKNOWN,
126+ fseventsd.FSE_INVALID,
127+ fseventsd.FSE_EXCHANGE,
128+ fseventsd.FSE_FINDER_INFO_CHANGED,
129+ fseventsd.FSE_CHOWN,
130+ fseventsd.FSE_XATTR_MODIFIED,
131+ fseventsd.FSE_XATTR_REMOVED,
132 )
133
134 # translates quickly the event and it's is_dir state to our standard events
135@@ -95,7 +95,7 @@
136 IN_MOVED_TO: 'FS_FILE_CREATE',
137 IN_MOVED_TO | IN_ISDIR: 'FS_DIR_CREATE'}
138
139-# TODO: This should be in fsevents to be imported!
140+# TODO: This should be in fseventsd to be imported!
141 # Path to the socket used by the daemon
142 DAEMON_SOCKET = '/var/run/ubuntuone_fsevents_daemon'
143
144@@ -134,14 +134,14 @@
145 return unicodedata.normalize('NFC', path).encode('utf-8')
146
147
148-class PyInotifyEventsFactory(fsevents.FsEventsFactory):
149+class PyInotifyEventsFactory(fseventsd.FsEventsFactory):
150 """Factory that process events and converts them in pyinotify ones."""
151
152 def __init__(self, processor,
153 ignored_events=DARWIN_IGNORED_ACTIONS):
154 """Create a new instance."""
155 # old style class
156- fsevents.FsEventsFactory.__init__(self)
157+ fseventsd.FsEventsFactory.__init__(self)
158 self._processor = processor
159 self._ignored_events = ignored_events
160 self.watched_paths = []
161@@ -215,7 +215,7 @@
162 """Get an event from the daemon and convert it in a pyinotify one."""
163 # the rename is a special type of event because it has to be either
164 # converted is a pair of events or in a single one (CREATE or DELETE)
165- if event.event_type == fsevents.FSE_RENAME:
166+ if event.event_type == fseventsd.FSE_RENAME:
167 is_create = self.is_create(event)
168 if is_create or self.is_delete(event):
169 mask = IN_CREATE if is_create else IN_DELETE
170@@ -278,7 +278,7 @@
171 if event.event_type in self._ignored_events:
172 # Do nothing because sd does not care about such info
173 return
174- if event.event_type == fsevents.FSE_EVENTS_DROPPED:
175+ if event.event_type == fseventsd.FSE_EVENTS_DROPPED:
176 # this should not be very common but we have to deal with it
177 return self.events_dropper()
178 events = self.convert_in_pyinotify_event(event)

Subscribers

People subscribed via source and target branches