Merge lp:~facundo/ubuntuone-client/fix-conflict-case into lp:ubuntuone-client
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Facundo Batista | ||||
Approved revision: | 905 | ||||
Merged at revision: | 907 | ||||
Proposed branch: | lp:~facundo/ubuntuone-client/fix-conflict-case | ||||
Merge into: | lp:ubuntuone-client | ||||
Diff against target: |
369 lines (+137/-27) 2 files modified
tests/syncdaemon/test_action_queue.py (+108/-11) ubuntuone/syncdaemon/action_queue.py (+29/-16) |
||||
To merge this branch: | bzr merge lp:~facundo/ubuntuone-client/fix-conflict-case | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Facundo Batista (community) | Approve | ||
John O'Brien (community) | Approve | ||
Review via email: mp+52255@code.launchpad.net |
Commit message
Avoid autoconflict when saving several times the same file (LP: #718924)
Description of the change
Avoid autoconflict when saving several times the same file
This happened because when an Upload was cancelled, it was cancelled and removed from the queue no matter what. However, if the EOF was already sent to the server (the producer already finished), the Upload should not be cancelled, and let it finish.
Also in this branch I normalized the Upload/Download treatment of other similar commands: they do not try to cancel stuff at __init__ anymore, they just cancel other commands they find when being asked if they can be queued.
Finally, I added a log line when a command is cancelled, and enhanced the one in the external cancel.
Tests included for everything, but if you want to do an extensive test, you can check a script I added in the bug related to this branch. That script just saves a lot of times a file, changing the period between saves, which generated the autoconflicts previously to this branch.
Nice fix.