Skip to content
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

lib/model, lib/config: Support "live" device removal, folder unsharin… #3478

Closed

Conversation

AudriusButkevicius
Copy link
Member

Purpose

lib/model, lib/config: Support "live" device removal, folder unsharing and folder configuration changes

Furthermore:

  1. Cleans configs received, migrates them as we receive them.
  2. Clears indexes of devices we no longer share the folder with

Testing

Manual tests, unit tests of questionable quality

@@ -70,7 +70,9 @@ func New(myID protocol.DeviceID) Configuration {
util.SetDefaults(&cfg.Options)
util.SetDefaults(&cfg.GUI)

cfg.prepare(myID)
if err := cfg.prepare(myID); err != nil {
panic(err)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a // Can't happen or a panic("bug: error in preparing new folder: " + err.Error()) or something here as I was wondering for a while if you'd gone insane to panic on a prepare error then realized it was in New() and should be fine :)

@AudriusButkevicius
Copy link
Member Author

bump

@calmh
Copy link
Member

calmh commented Aug 7, 2016

@st-review merge it

@st-review
Copy link

@calmh: Merge failed:

$ git fetch -f origin refs/pull/3478/head:pr-3478
$ git fetch -f origin master:orig/master
From github.com:syncthing/syncthing
   0655991..ea87bce  master     -> orig/master
$ git reset --hard
HEAD is now at ea87bce lib/protocol, lib/model: Implement high precision time stamps (fixes #3305)
$ git checkout master
Already on 'master'
Your branch is up-to-date with 'origin/master'.
$ git reset --hard orig/master
HEAD is now at ea87bce lib/protocol, lib/model: Implement high precision time stamps (fixes #3305)
$ git clean -fxd
Skipping repository syncthing/syncthing
Skipping repository syncthing/syncthing-android
Skipping repository syncthing/docs
Skipping repository syncthing/discosrv
Skipping repository syncthing/syncthing-gtk
Skipping repository syncthing/syncthing-inotify
$ git merge --squash --no-commit pr-3478
Auto-merging lib/model/model_test.go
CONFLICT (content): Merge conflict in lib/model/model_test.go
Auto-merging lib/model/model.go
CONFLICT (content): Merge conflict in lib/model/model.go
Auto-merging lib/db/set.go
CONFLICT (content): Merge conflict in lib/db/set.go
Auto-merging lib/connections/service.go
Auto-merging lib/config/wrapper.go
Auto-merging lib/config/config_test.go
CONFLICT (content): Merge conflict in lib/config/config_test.go
Auto-merging lib/config/config.go
Auto-merging cmd/syncthing/main.go
Squash commit -- not updating HEAD
Automatic merge failed; fix conflicts and then commit the result.

@calmh
Copy link
Member

calmh commented Aug 7, 2016

@AudriusButkevicius ^ :/

…g and folder configuration changes

Furthermore:
1. Cleans configs received, migrates them as we receive them.
2. Clears indexes of devices we no longer share the folder with
@AudriusButkevicius
Copy link
Member Author

@st-review merge

@st-review
Copy link

@AudriusButkevicius: Build status is pending. I'll wait until it goes green and then merge!

@st-review
Copy link

@AudriusButkevicius: Build status is failure -- refusing to merge.

@AudriusButkevicius
Copy link
Member Author

@st-review merge

@st-review
Copy link

@AudriusButkevicius: Build status is pending. I'll wait until it goes green and then merge!

@st-review
Copy link

@AudriusButkevicius: Build status is failure -- refusing to merge.

@AudriusButkevicius
Copy link
Member Author

@st-review merge

@st-review
Copy link

@AudriusButkevicius: Build status is pending. I'll wait until it goes green and then merge!

@st-review
Copy link

👌 Merged as af3b6f9. Thanks, @AudriusButkevicius!

st-review pushed a commit that referenced this pull request Aug 7, 2016
…g and folder configuration changes

Furthermore:
1. Cleans configs received, migrates them as we receive them.
2. Clears indexes of devices we no longer share the folder with

GitHub-Pull-Request: #3478
@st-review st-review closed this Aug 7, 2016
@AudriusButkevicius AudriusButkevicius deleted the removestuff branch August 7, 2016 16:26
@st-review st-review added the frozen-due-to-age Issues closed and untouched for a long time, together with being locked for discussion label Aug 8, 2017
@syncthing syncthing locked and limited conversation to collaborators Aug 8, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
frozen-due-to-age Issues closed and untouched for a long time, together with being locked for discussion
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants