-
Notifications
You must be signed in to change notification settings - Fork 163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cli/discover: remove/add local collections if the remote collection is deleted/created #869
base: main
Are you sure you want to change the base?
Conversation
This pull request introduces 3 alerts when merging a38bb96 into a42906b - view on LGTM.com new alerts:
|
a38bb96
to
1c1cd3f
Compare
This pull request introduces 2 alerts when merging 1c1cd3f into a42906b - view on LGTM.com new alerts:
|
1c1cd3f
to
590196c
Compare
63db3a5
to
2bfdfa8
Compare
2bfdfa8
to
470a1c2
Compare
67742b8
to
fcabd5f
Compare
The tests fail with
|
Will this get eventually integrated upstream? |
@dilyanpalauzov Yup, sorry, just been busy, but the change makes sense. I'll deal with conflicts when I get a change :) |
Please elaborate what means “when I get a change”? |
Sorry, I meant "why I get a chance'. Meaning when I get a bit of free time to do the conflict resolution.
|
…s deleted/created This works when the destination backend is 'filesystem'. -- add a new parameter to storage section: implicit = ["create", "delete"] Changes cli/utils.py:save_status(): when data is None, remove the underlaying file.
fcabd5f
to
4ca0e6b
Compare
I've rebased your branch onto I'm a bit uncertain about how this works when you have:
If there's a collection present in B, but missing in A, should it be deleted from B, or created in A? |
I have not thought on this case. I would say, the collection shall be created. Rationale: I do not know why this combination is good for. Preventing data deletion in this unclear use-case is a good approach, as long as nobody proposes something better. |
Let me know if there is anything from my side, which shall be done for this PR. I do not understand the code of vdirsyncer very good. |
How about writing down,that the behaviour in this case is not defined. |
Is there anything I can do to help with this one? I'd love to have this feature as well. |
Perhaps only implicit creation should be allowed? That way there's never any accidental data loss, which is far worse than a zombie collection coming back from the dead. And there's no ambiguity about what to do in this scenario:
Selfishly, implicit creation is the only part of this that I actually need so if eliminating implicit deletion helps move this forward at all here then that suits me just fine 😄 |
I need also implicit deletion. |
Fair enough. What about using I think that behaviour is actually pretty intuitive and most people would expect it to work that way. |
This pull request from me is stalled. I do use the changes on my system and it does work exactly as I want. I will appreciate any progress on this, but I am not going to modify the proposed changes. |
This works when the destination backend is 'filesystem'.
-- add a new parameter to storage section:
implicit = ["create", "delete"]
Changes cli/utils.py:save_status(): when data is None, remove the underlaying file.