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
=== modified file 'tests/status/test_aggregator.py'
--- tests/status/test_aggregator.py 2011-04-20 02:50:23 +0000
+++ tests/status/test_aggregator.py 2011-12-14 21:47:23 +0000
@@ -1276,6 +1276,26 @@
1276 result = self.aggregator.get_discovery_message()1276 result = self.aggregator.get_discovery_message()
1277 self.assertEqual(expected, result)1277 self.assertEqual(expected, result)
12781278
1279 def test_get_discovery_message_clears_filenames(self):
1280 """Test the message that's shown on the discovery bubble."""
1281 uploading = 10
1282 downloading = 8
1283 filename = 'upfile0.ext'
1284 filename2 = 'downfile0.ext'
1285 self.aggregator.files_uploading.extend([
1286 FakeCommand(path='upfile%d.ext' % n) for n in range(uploading)])
1287 self.aggregator.uploading_filename = filename
1288 self.aggregator.files_downloading.extend([
1289 FakeCommand(path='downfile%d.ext' % n) for n in
1290 range(downloading)])
1291 self.aggregator.downloading_filename = 'STALE FILENAME'
1292 self.aggregator.uploading_filename = 'STALE FILENAME'
1293 expected = (
1294 aggregator.files_being_uploaded(filename, uploading) + "\n" +
1295 aggregator.files_being_downloaded(filename2, downloading))
1296 result = self.aggregator.get_discovery_message()
1297 self.assertEqual(expected, result)
1298
1279 def test_get_final_status_message(self):1299 def test_get_final_status_message(self):
1280 """The final status message."""1300 """The final status message."""
1281 done = (5, 10)1301 done = (5, 10)
12821302
=== modified file 'ubuntuone/status/aggregator.py'
--- ubuntuone/status/aggregator.py 2011-04-12 20:41:55 +0000
+++ ubuntuone/status/aggregator.py 2011-12-14 21:47:23 +0000
@@ -662,12 +662,14 @@
662 lines = []662 lines = []
663 files_uploading = len(self.files_uploading)663 files_uploading = len(self.files_uploading)
664 if files_uploading > 0:664 if files_uploading > 0:
665 self.uploading_filename = os.path.basename(
666 self.files_uploading[0].path)
665 lines.append(files_being_uploaded(667 lines.append(files_being_uploaded(
666 self.uploading_filename, files_uploading))668 self.uploading_filename, files_uploading))
667 files_downloading = len(self.files_downloading)669 files_downloading = len(self.files_downloading)
668 if files_downloading > 0:670 if files_downloading > 0:
669 self.downloading_filename = self.files_downloading[0].path.split(671 self.downloading_filename = os.path.basename(
670 os.path.sep)[-1]672 self.files_downloading[0].path)
671 lines.append(files_being_downloaded(673 lines.append(files_being_downloaded(
672 self.downloading_filename, files_downloading))674 self.downloading_filename, files_downloading))
673 return "\n".join(lines)675 return "\n".join(lines)
@@ -724,8 +726,8 @@
724 self.total_counter += 1726 self.total_counter += 1
725 # pylint: disable=W0201727 # pylint: disable=W0201
726 if not self.downloading_filename:728 if not self.downloading_filename:
727 self.downloading_filename = self.files_downloading[0].path.split(729 self.downloading_filename = os.path.basename(
728 os.path.sep)[-1]730 self.files_downloading[0].path)
729 # pylint: enable=W0201731 # pylint: enable=W0201
730 self.update_progressbar()732 self.update_progressbar()
731 logger.debug("queueing command (%d/%d): %s", self.done_counter,733 logger.debug("queueing command (%d/%d): %s", self.done_counter,
@@ -752,8 +754,8 @@
752 self.total_counter += 1754 self.total_counter += 1
753 # pylint: disable=W0201755 # pylint: disable=W0201
754 if not self.uploading_filename:756 if not self.uploading_filename:
755 self.uploading_filename = self.files_uploading[0].path.split(757 self.uploading_filename = os.path.basename(
756 os.path.sep)[-1]758 self.files_uploading[0].path)
757 # pylint: enable=W0201759 # pylint: enable=W0201
758 self.update_progressbar()760 self.update_progressbar()
759 logger.debug("queueing command (%d/%d): %s", self.done_counter,761 logger.debug("queueing command (%d/%d): %s", self.done_counter,

Subscribers

People subscribed via source and target branches