Merge lp:~facundo/ubuntuone-client/fix-svfilenew-conflict into lp:ubuntuone-client
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Facundo Batista | ||||
Approved revision: | 926 | ||||
Merged at revision: | 938 | ||||
Proposed branch: | lp:~facundo/ubuntuone-client/fix-svfilenew-conflict | ||||
Merge into: | lp:ubuntuone-client | ||||
Diff against target: |
293 lines (+136/-43) 4 files modified
contrib/dump_metadata.py (+4/-3) tests/syncdaemon/test_sync.py (+89/-0) ubuntuone/syncdaemon/sync.py (+34/-5) ubuntuone/syncdaemon/u1fsfsm.py (+9/-35) |
||||
To merge this branch: | bzr merge lp:~facundo/ubuntuone-client/fix-svfilenew-conflict | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Guillermo Gonzalez | Approve | ||
Lucio Torre (community) | Approve | ||
Review via email:
|
Commit message
Support SV_FILE_NEW when having a node for that path (LP: #711389)
Description of the change
Support SV_FILE_NEW when having a node for that path
This is because _handle_SV_FILE_NEW is called when there's no match by node_id, but then it searches the node by path, and sometimes there is a node with that path.
Three cases arise:
- if the node still has no node_id: it's just waiting for it, so we go and set it.
- if the node has a node_id but other one: it's a case where the file was overwritten by a move operation; just delete the file and will get the server one.
- if the node has the same node_id: we broke something, because we shouldn't have called _handle_SV_FILE_NEW at all.
Tests included for everything.
+1