Merge lp:~facundo/ubuntuone-client/clean-aq-download-cancelled into lp:ubuntuone-client

Proposed by Facundo Batista
Status: Merged
Approved by: Facundo Batista
Approved revision: 912
Merged at revision: 912
Proposed branch: lp:~facundo/ubuntuone-client/clean-aq-download-cancelled
Merge into: lp:ubuntuone-client
Diff against target: 97 lines (+1/-39)
5 files modified
tests/platform/linux/test_dbus.py (+0/-20)
ubuntuone/syncdaemon/action_queue.py (+1/-6)
ubuntuone/syncdaemon/event_queue.py (+0/-1)
ubuntuone/syncdaemon/interaction_interfaces.py (+0/-5)
ubuntuone/syncdaemon/sync.py (+0/-7)
To merge this branch: bzr merge lp:~facundo/ubuntuone-client/clean-aq-download-cancelled
Reviewer Review Type Date Requested Status
Facundo Batista (community) Approve
Lucio Torre (community) Approve
Review via email: mp+52608@code.launchpad.net

Commit message

Removed all traces of AQ_DOWNLOAD_CANCELLED. (LP: #721479)

Description of the change

Removed all traces of AQ_DOWNLOAD_CANCELLED.

It was just unused.

To post a comment you must log in.
Revision history for this message
Lucio Torre (lucio.torre) :
review: Approve
Revision history for this message
Facundo Batista (facundo) wrote :

Approving with one review

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'tests/platform/linux/test_dbus.py'
--- tests/platform/linux/test_dbus.py 2011-03-02 16:55:26 +0000
+++ tests/platform/linux/test_dbus.py 2011-03-08 20:31:48 +0000
@@ -1698,26 +1698,6 @@
1698 error='AN_ERROR')1698 error='AN_ERROR')
1699 return d1699 return d
17001700
1701 def test_download_cancelled(self):
1702 """Test the DBus signals in Status."""
1703 a_dir = os.path.join(self.root_dir, u'ñoño'.encode('utf-8'))
1704 self.fs_manager.create(a_dir, "", is_dir=False)
1705 self.fs_manager.set_node_id(a_dir, "node_id")
1706
1707 d = defer.Deferred()
1708 def download_handler(path, info):
1709 """Handler for DownloadFinished signal."""
1710 self.assertEquals(a_dir, path.encode('utf-8'))
1711 self.assertEquals('CANCELLED', info['error'])
1712 d.callback(True)
1713
1714 match = self.bus.add_signal_receiver(download_handler,
1715 signal_name='DownloadFinished')
1716 self.signal_receivers.add(match)
1717 self.main.event_q.push('AQ_DOWNLOAD_CANCELLED', share_id='',
1718 node_id='node_id', server_hash='hash')
1719 return d
1720
1721 def test_upload_started(self):1701 def test_upload_started(self):
1722 """Test the DBus signals in Status."""1702 """Test the DBus signals in Status."""
1723 a_dir = os.path.join(self.root_dir, u'ñoño'.encode('utf-8'))1703 a_dir = os.path.join(self.root_dir, u'ñoño'.encode('utf-8'))
17241704
=== modified file 'ubuntuone/syncdaemon/action_queue.py'
--- ubuntuone/syncdaemon/action_queue.py 2011-03-07 16:54:25 +0000
+++ ubuntuone/syncdaemon/action_queue.py 2011-03-08 20:31:48 +0000
@@ -2225,12 +2225,7 @@
22252225
2226 def handle_failure(self, failure):2226 def handle_failure(self, failure):
2227 """It didn't work! Push the event."""2227 """It didn't work! Push the event."""
2228 if failure.check(protocol_errors.RequestCancelledError):2228 if failure.check(protocol_errors.DoesNotExistError):
2229 self.action_queue.event_queue.push('AQ_DOWNLOAD_CANCELLED',
2230 share_id=self.share_id,
2231 node_id=self.node_id,
2232 server_hash=self.server_hash)
2233 elif failure.check(protocol_errors.DoesNotExistError):
2234 self.action_queue.event_queue.push('AQ_DOWNLOAD_DOES_NOT_EXIST',2229 self.action_queue.event_queue.push('AQ_DOWNLOAD_DOES_NOT_EXIST',
2235 share_id=self.share_id,2230 share_id=self.share_id,
2236 node_id=self.node_id)2231 node_id=self.node_id)
22372232
=== modified file 'ubuntuone/syncdaemon/event_queue.py'
--- ubuntuone/syncdaemon/event_queue.py 2011-02-21 20:42:06 +0000
+++ ubuntuone/syncdaemon/event_queue.py 2011-03-08 20:31:48 +0000
@@ -51,7 +51,6 @@
51 'AQ_DOWNLOAD_COMMIT': ('share_id', 'node_id', 'server_hash'),51 'AQ_DOWNLOAD_COMMIT': ('share_id', 'node_id', 'server_hash'),
52 'AQ_DOWNLOAD_FINISHED': ('share_id', 'node_id', 'server_hash'),52 'AQ_DOWNLOAD_FINISHED': ('share_id', 'node_id', 'server_hash'),
53 'AQ_DOWNLOAD_ERROR': ('share_id', 'node_id', 'server_hash', 'error'),53 'AQ_DOWNLOAD_ERROR': ('share_id', 'node_id', 'server_hash', 'error'),
54 'AQ_DOWNLOAD_CANCELLED': ('share_id', 'node_id', 'server_hash'),
55 'AQ_DOWNLOAD_DOES_NOT_EXIST': ('share_id', 'node_id'),54 'AQ_DOWNLOAD_DOES_NOT_EXIST': ('share_id', 'node_id'),
56 'AQ_UPLOAD_STARTED' : ('share_id', 'node_id', 'hash'),55 'AQ_UPLOAD_STARTED' : ('share_id', 'node_id', 'hash'),
57 'AQ_UPLOAD_FILE_PROGRESS': ('share_id', 'node_id',56 'AQ_UPLOAD_FILE_PROGRESS': ('share_id', 'node_id',
5857
=== modified file 'ubuntuone/syncdaemon/interaction_interfaces.py'
--- ubuntuone/syncdaemon/interaction_interfaces.py 2011-03-02 16:03:16 +0000
+++ ubuntuone/syncdaemon/interaction_interfaces.py 2011-03-08 20:31:48 +0000
@@ -822,11 +822,6 @@
822 node_id=str(node_id))822 node_id=str(node_id))
823 self.interface.status.emit_signal_error('DownloadFinished', args)823 self.interface.status.emit_signal_error('DownloadFinished', args)
824824
825 def handle_AQ_DOWNLOAD_CANCELLED(self, share_id, node_id, server_hash):
826 """Handle AQ_DOWNLOAD_CANCELLED."""
827 self.handle_AQ_DOWNLOAD_ERROR(share_id, node_id, server_hash,
828 'CANCELLED', 'AQ_DOWNLOAD_CANCELLED')
829
830 def handle_AQ_DOWNLOAD_ERROR(self, share_id, node_id, server_hash, error,825 def handle_AQ_DOWNLOAD_ERROR(self, share_id, node_id, server_hash, error,
831 event='AQ_DOWNLOAD_ERROR'):826 event='AQ_DOWNLOAD_ERROR'):
832 """Handle AQ_DOWNLOAD_ERROR."""827 """Handle AQ_DOWNLOAD_ERROR."""
833828
=== modified file 'ubuntuone/syncdaemon/sync.py'
--- ubuntuone/syncdaemon/sync.py 2011-02-21 16:50:33 +0000
+++ ubuntuone/syncdaemon/sync.py 2011-03-08 20:31:48 +0000
@@ -873,13 +873,6 @@
873 ssmr.signal_event_with_error_and_hash("AQ_DOWNLOAD_ERROR", error,873 ssmr.signal_event_with_error_and_hash("AQ_DOWNLOAD_ERROR", error,
874 server_hash)874 server_hash)
875875
876 def handle_AQ_DOWNLOAD_CANCELLED(self, share_id, node_id, server_hash):
877 """on AQ_DOWNLOAD_CANCELLED"""
878 key = FSKey(self.m.fs, share_id=share_id, node_id=node_id)
879 log = FileLogger(self.logger, key)
880 ssmr = SyncStateMachineRunner(self.fsm, self.m, key, log)
881 ssmr.signal_event_with_hash("AQ_DOWNLOAD_CANCELLED", server_hash)
882
883 def handle_AQ_DOWNLOAD_DOES_NOT_EXIST(self, share_id, node_id):876 def handle_AQ_DOWNLOAD_DOES_NOT_EXIST(self, share_id, node_id):
884 """on AQ_DOWNLOAD_DOES_NOT_EXIST."""877 """on AQ_DOWNLOAD_DOES_NOT_EXIST."""
885 key = FSKey(self.m.fs, share_id=share_id, node_id=node_id)878 key = FSKey(self.m.fs, share_id=share_id, node_id=node_id)
886879
=== modified file 'ubuntuone/syncdaemon/u1fsfsm.ods'
887Binary files ubuntuone/syncdaemon/u1fsfsm.ods 2010-09-07 20:49:38 +0000 and ubuntuone/syncdaemon/u1fsfsm.ods 2011-03-08 20:31:48 +0000 differ880Binary files ubuntuone/syncdaemon/u1fsfsm.ods 2010-09-07 20:49:38 +0000 and ubuntuone/syncdaemon/u1fsfsm.ods 2011-03-08 20:31:48 +0000 differ

Subscribers

People subscribed via source and target branches