Merge lp:~thisfred/ubuntuone-client/fix-stale-notification-1-6 into lp:ubuntuone-client/stable-1-6

Proposed by Eric Casteleijn
Status: Rejected
Rejected by: Eric Casteleijn
Proposed branch: lp:~thisfred/ubuntuone-client/fix-stale-notification-1-6
Merge into: lp:ubuntuone-client/stable-1-6
Diff against target: 73 lines (+28/-6)
2 files modified
tests/status/test_aggregator.py (+20/-0)
ubuntuone/status/aggregator.py (+8/-6)
To merge this branch: bzr merge lp:~thisfred/ubuntuone-client/fix-stale-notification-1-6
Reviewer Review Type Date Requested Status
John O'Brien (community) Approve
Review via email: mp+85751@code.launchpad.net

Commit message

Uploading filename is now reset on every message display.

Description of the change

Uploading filename is now reset on every message display.

To post a comment you must log in.
Revision history for this message
John O'Brien (jdobrien) wrote :

nice fixes to use basename instead of home-grown splitting.

review: Approve
Revision history for this message
dobey (dobey) wrote :

This seems to be causing a UnicodeDecodeError inside tarmac.

Revision history for this message
Eric Casteleijn (thisfred) wrote :

Is there a traceback?

Revision history for this message
dobey (dobey) wrote :

Yes. But the error is happening inside tarmac. Perhaps a file with a unicode name got left around, and is then causing shutil.rmtree() to fail with UnicodeDecodeError, when locale is unset.

Revision history for this message
Ubuntu One Auto Pilot (otto-pilot) wrote :
Download full text (36.7 KiB)

The attempt to merge lp:~thisfred/ubuntuone-client/fix-stale-notification-1-6 into lp:ubuntuone-client/stable-1-6 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.67
checking for automake >= 1.10...
  testing automake-1.11... found 1.11.1
checking for libtool >= 1.5...
  testing libtoolize... found 2.2.6b
checking for intltool >= 0.30...
  testing intltoolize... found 0.41.1
checking for pkg-config >= 0.14.0...
  testing pkg-config... found 0.25
checking for gtk-doc >= 1.0...
  testing gtkdocize... found 1.17
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 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 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
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... o...

Unmerged revisions

974. By Eric Casteleijn

backport of fix for #807005

973. By Eric Casteleijn

unchanged: attach bug

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tests/status/test_aggregator.py'
2--- tests/status/test_aggregator.py 2011-04-20 02:50:23 +0000
3+++ tests/status/test_aggregator.py 2011-12-14 21:47:23 +0000
4@@ -1276,6 +1276,26 @@
5 result = self.aggregator.get_discovery_message()
6 self.assertEqual(expected, result)
7
8+ def test_get_discovery_message_clears_filenames(self):
9+ """Test the message that's shown on the discovery bubble."""
10+ uploading = 10
11+ downloading = 8
12+ filename = 'upfile0.ext'
13+ filename2 = 'downfile0.ext'
14+ self.aggregator.files_uploading.extend([
15+ FakeCommand(path='upfile%d.ext' % n) for n in range(uploading)])
16+ self.aggregator.uploading_filename = filename
17+ self.aggregator.files_downloading.extend([
18+ FakeCommand(path='downfile%d.ext' % n) for n in
19+ range(downloading)])
20+ self.aggregator.downloading_filename = 'STALE FILENAME'
21+ self.aggregator.uploading_filename = 'STALE FILENAME'
22+ expected = (
23+ aggregator.files_being_uploaded(filename, uploading) + "\n" +
24+ aggregator.files_being_downloaded(filename2, downloading))
25+ result = self.aggregator.get_discovery_message()
26+ self.assertEqual(expected, result)
27+
28 def test_get_final_status_message(self):
29 """The final status message."""
30 done = (5, 10)
31
32=== modified file 'ubuntuone/status/aggregator.py'
33--- ubuntuone/status/aggregator.py 2011-04-12 20:41:55 +0000
34+++ ubuntuone/status/aggregator.py 2011-12-14 21:47:23 +0000
35@@ -662,12 +662,14 @@
36 lines = []
37 files_uploading = len(self.files_uploading)
38 if files_uploading > 0:
39+ self.uploading_filename = os.path.basename(
40+ self.files_uploading[0].path)
41 lines.append(files_being_uploaded(
42 self.uploading_filename, files_uploading))
43 files_downloading = len(self.files_downloading)
44 if files_downloading > 0:
45- self.downloading_filename = self.files_downloading[0].path.split(
46- os.path.sep)[-1]
47+ self.downloading_filename = os.path.basename(
48+ self.files_downloading[0].path)
49 lines.append(files_being_downloaded(
50 self.downloading_filename, files_downloading))
51 return "\n".join(lines)
52@@ -724,8 +726,8 @@
53 self.total_counter += 1
54 # pylint: disable=W0201
55 if not self.downloading_filename:
56- self.downloading_filename = self.files_downloading[0].path.split(
57- os.path.sep)[-1]
58+ self.downloading_filename = os.path.basename(
59+ self.files_downloading[0].path)
60 # pylint: enable=W0201
61 self.update_progressbar()
62 logger.debug("queueing command (%d/%d): %s", self.done_counter,
63@@ -752,8 +754,8 @@
64 self.total_counter += 1
65 # pylint: disable=W0201
66 if not self.uploading_filename:
67- self.uploading_filename = self.files_uploading[0].path.split(
68- os.path.sep)[-1]
69+ self.uploading_filename = os.path.basename(
70+ self.files_uploading[0].path)
71 # pylint: enable=W0201
72 self.update_progressbar()
73 logger.debug("queueing command (%d/%d): %s", self.done_counter,

Subscribers

People subscribed via source and target branches