Merge lp:~diegosarmentero/ubuntuone-client/refactor-notification into lp:ubuntuone-client

Proposed by Diego Sarmentero on 2012-04-30
Status: Merged
Approved by: dobey on 2012-05-02
Approved revision: 1239
Merged at revision: 1236
Proposed branch: lp:~diegosarmentero/ubuntuone-client/refactor-notification
Merge into: lp:ubuntuone-client
Prerequisite: lp:~diegosarmentero/ubuntuone-client/refactor-messaging
Diff against target: 110 lines (+34/-10)
6 files modified
tests/platform/__init__.py (+2/-2)
tests/platform/notification/__init__.py (+27/-0)
tests/platform/notification/test_linux.py (+1/-1)
ubuntuone/platform/linux/__init__.py (+0/-1)
ubuntuone/platform/notification/__init__.py (+4/-4)
ubuntuone/platform/windows/__init__.py (+0/-2)
To merge this branch: bzr merge lp:~diegosarmentero/ubuntuone-client/refactor-notification
Reviewer Review Type Date Requested Status
dobey (community) Approve on 2012-05-02
Eric Casteleijn (community) Approve on 2012-05-01
Manuel de la Peña (community) 2012-04-30 Approve on 2012-05-01
Review via email: mp+104164@code.launchpad.net

Commit Message

- Refactor platform/notification (LP: #989124).

To post a comment you must log in.
Manuel de la Peña (mandel) wrote :

Looks good, but I have a style questions, should we start doing the following:

if os.system == 'win32':
    from ubuntuone.platform.notification import windows as source
else:
    from ubuntuone.platform.notification import linux as source

review: Needs Information
review: Approve
Eric Casteleijn (thisfred) wrote :

Looks good

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

The attempt to merge lp:~diegosarmentero/ubuntuone-client/refactor-notification 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.68
checking for automake >= 1.10...
  testing automake-1.11... found 1.11.3
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... i686-pc-linux-gnu
checking host system type... i686-pc-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
c...

Ubuntu One Auto Pilot (otto-pilot) wrote :
Download full text (24.9 KiB)

The attempt to merge lp:~diegosarmentero/ubuntuone-client/refactor-notification 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.68
checking for automake >= 1.10...
  testing automake-1.11... found 1.11.3
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... i686-pc-linux-gnu
checking host system type... i686-pc-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
c...

dobey (dobey) wrote :

Diego, you need to fix the errors first. :)

./ubuntuone/platform/notification/__init__.py:
    38: redefinition of unused 'source' from line 36

./tests/platform/__init__.py:32: unexpected indent
     = test_linux
     ^

review: Needs Fixing
1238. By Diego Sarmentero on 2012-05-02

fixing lint issues

1239. By Diego Sarmentero on 2012-05-02

merge

dobey (dobey) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tests/platform/__init__.py'
2--- tests/platform/__init__.py 2012-05-01 21:48:49 +0000
3+++ tests/platform/__init__.py 2012-05-02 14:33:23 +0000
4@@ -29,9 +29,9 @@
5
6 if sys.platform.startswith('linux'):
7 from tests.platform.ipc import test_linux
8- ipc_source = test_linux
9+ ipc_source = test_linux
10 else:
11- from tests.platform.ipc import test_windows
12+ from tests.platform.ipc import test_windows
13 ipc_source = test_windows
14
15 IPCTestCase = ipc_source.IPCTestCase
16
17=== added directory 'tests/platform/notification'
18=== added file 'tests/platform/notification/__init__.py'
19--- tests/platform/notification/__init__.py 1970-01-01 00:00:00 +0000
20+++ tests/platform/notification/__init__.py 2012-05-02 14:33:23 +0000
21@@ -0,0 +1,27 @@
22+# Copyright 2012 Canonical Ltd.
23+#
24+# This program is free software: you can redistribute it and/or modify it
25+# under the terms of the GNU General Public License version 3, as published
26+# by the Free Software Foundation.
27+#
28+# This program is distributed in the hope that it will be useful, but
29+# WITHOUT ANY WARRANTY; without even the implied warranties of
30+# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
31+# PURPOSE. See the GNU General Public License for more details.
32+#
33+# You should have received a copy of the GNU General Public License along
34+# with this program. If not, see <http://www.gnu.org/licenses/>.
35+#
36+# In addition, as a special exception, the copyright holders give
37+# permission to link the code of portions of this program with the
38+# OpenSSL library under certain conditions as described in each
39+# individual source file, and distribute linked combinations
40+# including the two.
41+# You must obey the GNU General Public License in all respects
42+# for all of the code used other than OpenSSL. If you modify
43+# file(s) with this exception, you may extend this exception to your
44+# version of the file(s), but you are not obligated to do so. If you
45+# do not wish to do so, delete this exception statement from your
46+# version. If you delete this exception statement from all source
47+# files in the program, then also delete it here.
48+"""Platform/Notification test code."""
49
50=== renamed file 'tests/platform/linux/test_notification.py' => 'tests/platform/notification/test_linux.py'
51--- tests/platform/linux/test_notification.py 2012-04-09 20:07:05 +0000
52+++ tests/platform/notification/test_linux.py 2012-05-02 14:33:23 +0000
53@@ -39,7 +39,7 @@
54 from twisted.internet import defer
55 from twisted.trial.unittest import TestCase
56
57-from ubuntuone.platform.linux.notification import Notification, ICON_NAME
58+from ubuntuone.platform.notification import Notification, ICON_NAME
59
60 FAKE_APP_NAME = "Teh wonderful app."
61 FAKE_TITLE = "Sous titre"
62
63=== modified file 'ubuntuone/platform/linux/__init__.py'
64--- ubuntuone/platform/linux/__init__.py 2012-04-30 15:19:03 +0000
65+++ ubuntuone/platform/linux/__init__.py 2012-05-02 14:33:23 +0000
66@@ -70,4 +70,3 @@
67 setup_filesystem_logging,
68 get_filesystem_logger,
69 )
70-from ubuntuone.platform.linux import notification
71
72=== added directory 'ubuntuone/platform/notification'
73=== renamed file 'ubuntuone/platform/notification.py' => 'ubuntuone/platform/notification/__init__.py'
74--- ubuntuone/platform/notification.py 2012-04-09 20:07:05 +0000
75+++ ubuntuone/platform/notification/__init__.py 2012-05-02 14:33:23 +0000
76@@ -33,11 +33,11 @@
77
78
79 if sys.platform == "win32":
80- from ubuntuone.platform.windows import notification
81- source = notification
82+ from ubuntuone.platform.notification import windows
83+ source = windows
84 else:
85- from ubuntuone.platform.linux import notification
86- source = notification
87+ from ubuntuone.platform.notification import linux
88+ source = linux
89 NOTIFY_MODULE = source.NOTIFY_MODULE
90 ICON_NAME = source.ICON_NAME
91
92
93=== renamed file 'ubuntuone/platform/linux/notification.py' => 'ubuntuone/platform/notification/linux.py'
94=== renamed file 'ubuntuone/platform/windows/notification.py' => 'ubuntuone/platform/notification/windows.py'
95=== modified file 'ubuntuone/platform/windows/__init__.py'
96--- ubuntuone/platform/windows/__init__.py 2012-04-30 17:57:27 +0000
97+++ ubuntuone/platform/windows/__init__.py 2012-05-02 14:33:23 +0000
98@@ -40,7 +40,6 @@
99 import event_logging
100 import launcher
101 import logger
102-import notification
103
104 from ubuntuone.platform.os_helper import (
105 access,
106@@ -78,4 +77,3 @@
107 setup_filesystem_logging,
108 get_filesystem_logger,
109 )
110-from ubuntuone.platform.windows import notification

Subscribers

People subscribed via source and target branches