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
1=== modified file 'ubuntuone/syncdaemon/local_rescan.py'
2--- ubuntuone/syncdaemon/local_rescan.py 2010-02-10 19:10:37 +0000
3+++ ubuntuone/syncdaemon/local_rescan.py 2010-02-11 13:21:29 +0000
4@@ -28,6 +28,9 @@
5 from ubuntuone.syncdaemon.filesystem_manager import get_stat
6 from twisted.internet import defer, reactor
7
8+from ubuntuone.syncdaemon.interfaces import IMarker
9+
10+
11 class ScanTransactionDirty(Exception):
12 """The transaction was dirty."""
13
14@@ -77,8 +80,14 @@
15 """Process the trash of FSM and send AQ orders to unlink the nodes."""
16 log_info("processing trash")
17 for share_id, node_id, parent_id in self.fsm.get_iter_trash():
18- log_info("unlink from trash: share_id: %r parent_id: %s "
19- "node_id: %r", share_id, parent_id, node_id)
20+ datalog = "share_id: %r parent_id: %r node_id: %r" % (
21+ share_id, parent_id, node_id)
22+ if node_id is None or IMarker.providedBy(parent_id):
23+ # situation where the node is not in the server
24+ log_info("removing from trash: " + datalog)
25+ self.fsm.remove_from_trash(share_id, node_id)
26+ continue
27+ log_info("unlink from trash: " + datalog)
28 self.aq.unlink(share_id, parent_id, node_id)
29
30 def _get_volumes(self, access_level='Modify'):

Subscribers

People subscribed via source and target branches