Merge lp:~facundo/ubuntuone-client/lr-clean-trash into lp:ubuntuone-client

Proposed by Facundo Batista
Status: Merged
Approved by: Facundo Batista
Approved revision: not available
Merged at revision: not available
Proposed branch: lp:~facundo/ubuntuone-client/lr-clean-trash
Merge into: lp:ubuntuone-client
Diff against target: 30 lines (+11/-2)
1 file modified
ubuntuone/syncdaemon/local_rescan.py (+11/-2)
To merge this branch: bzr merge lp:~facundo/ubuntuone-client/lr-clean-trash
Reviewer Review Type Date Requested Status
Eric Casteleijn (community) Approve
Rick McBride (community) Approve
Review via email: mp+19024@code.launchpad.net

Commit message

LR cleans the trash instead of sending Unlinks in some cases.

To post a comment you must log in.
Revision history for this message
Facundo Batista (facundo) wrote :

LR cleans the trash instead of sending Unlinks in some cases.

Revision history for this message
Rick McBride (rmcbride) wrote :

Cool!

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

Looks good, tests pass

review: Approve
Revision history for this message
Rodrigo Moya (rodrigo-moya) wrote :

Attempt to merge lp:~facundo/ubuntuone-client/lr-clean-trash into lp:ubuntuone-client failed due to merge conflicts:

text conflict in ubuntuone/syncdaemon/local_rescan.py

364. By Facundo Batista

Merged trunk in

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'ubuntuone/syncdaemon/local_rescan.py'
--- ubuntuone/syncdaemon/local_rescan.py 2010-02-10 19:10:37 +0000
+++ ubuntuone/syncdaemon/local_rescan.py 2010-02-11 13:21:29 +0000
@@ -28,6 +28,9 @@
28from ubuntuone.syncdaemon.filesystem_manager import get_stat28from ubuntuone.syncdaemon.filesystem_manager import get_stat
29from twisted.internet import defer, reactor29from twisted.internet import defer, reactor
3030
31from ubuntuone.syncdaemon.interfaces import IMarker
32
33
31class ScanTransactionDirty(Exception):34class ScanTransactionDirty(Exception):
32 """The transaction was dirty."""35 """The transaction was dirty."""
3336
@@ -77,8 +80,14 @@
77 """Process the trash of FSM and send AQ orders to unlink the nodes."""80 """Process the trash of FSM and send AQ orders to unlink the nodes."""
78 log_info("processing trash")81 log_info("processing trash")
79 for share_id, node_id, parent_id in self.fsm.get_iter_trash():82 for share_id, node_id, parent_id in self.fsm.get_iter_trash():
80 log_info("unlink from trash: share_id: %r parent_id: %s "83 datalog = "share_id: %r parent_id: %r node_id: %r" % (
81 "node_id: %r", share_id, parent_id, node_id)84 share_id, parent_id, node_id)
85 if node_id is None or IMarker.providedBy(parent_id):
86 # situation where the node is not in the server
87 log_info("removing from trash: " + datalog)
88 self.fsm.remove_from_trash(share_id, node_id)
89 continue
90 log_info("unlink from trash: " + datalog)
82 self.aq.unlink(share_id, parent_id, node_id)91 self.aq.unlink(share_id, parent_id, node_id)
8392
84 def _get_volumes(self, access_level='Modify'):93 def _get_volumes(self, access_level='Modify'):

Subscribers

People subscribed via source and target branches