Understanding file versioning

Hello forum,

Assume a folder is set up on PC “A” as “Send Only”, and on PC “B” as “Send & Receive” with “Simple File Versioning”.

Then on PC “B”, the file “Foo” is changed and the file “Bar” is added. As a result, the red button “Override Local Changes” appears on PC “A”.

If this is clicked on PC “A”, the changes in the file “Foo” on PC “B” are lost and the file “Bar” on PC “B” is deleted – OK.

In this case, will the newer version of the file “Foo” and the file “Bar” be placed in the .stversions folder on PC “B”?

Thanks!

B will create a new version whenever it processes a change from another device.

Thanks! So just to be sure to understand correctly, the answer to my question:

In this case, will the newer version of the file “Foo” and the file “Bar” be placed in the .stversions folder on PC “B”?

…is yes?

Am asking because pressing “Revert Local Changes” on A does not seem to be “a change from another device” for B – since no files are actually “changed” on A in this case.

There’s a huge difference between “override” (send only, pushes its state to others) and “revert” (receive only, undo all local changes). I’m confused about which you’re doing. But try it, and observe the behavior. What you see is what happens.

As described in my OP, it’s “Send Only” from A.

So will B move/save it’s own changes, when they are overridden by A, to the Versioning folder?

Yeah I shall try it, but am somehow amazed that this doesn’t seem to have a spontaneous clear answer :o

We don’t memorize the implementation.

It’s easier for you to try out than for us to go follow the trail in the code to figure out what exactly happens on what conditions.

You asked about revert in the followup. There may be a special case for revert, because revert is a special local operation.

Overrides are just normal updates as far as everyone else is concerned, so should be versioned as such.

1 Like

Sorry Jakob, you are right, I wrongly mentioned “Revert” in post #3, when actually my question specifically was about “Override Local Changes”.

I just tried it, and indeed, my OP question:

…can be answered with Yes.

Thanks very much for your patience, and for your great work on Syncthing.