Problem applying diff for older versions

Hi all,

I am testing wyBuild to autoUpdate my application.Imagine that my application has a properties file. Let's say one of the properties is:

number_of_threads = 10

I created my first version called 1.0 and everything worked fine.

FIRST PROBLEMI changed the property in the user side to 20.Generated version 1.1 with exact same code as version 1.0. Run update and the property was overwritten to 10 again.

I changed the property again to 20, created version 1.2 using the same code again. However, when creating the update files, I now selected in Build Updates to create update from version 1.1 instead of 'all previous versions'Updated again and now it worked fine. My property remain with value 20.

SECOND PROBLEMTrying to cover all possibilities, I now created version 1.3 and 1.4 using the same strategy that worked in the first problem. When updated from 1.2 to 1.4, the problem show up again. The property changed to 10.

Sooo...anyone knows why my property file is changing the values even though I am changing it only on the user side ?

Cheers,Luiz

wyBuild is trying to patch your file. It doesn't take into account user modifications to files. So you should keep the configuration file out of the updates. That is, exclude it from all version tabs in wyBuild and wyUpdate won't touch the config file when it patches your app files.

Does that make sense?

Thanks for your answer Sam..

However, why when I update from 1.1 to 1.2 it works* and when I update from 1.2 to 1.4 doesn't work** ?

*works -> It does not update the properties modified by the user

**doesn't work -> It updates updates the file

Thanks,Luiz

I'm a bit confused. What exactly is not behaving as you expect?

Every time there is an update, I would like to preserve the property in my property file if changed in the user side. However, if changed in the server side, it has to be updated/added/removed

Using same example, I would like this to happens ALWAYS:

1) property files v1.0

Result: number_of_threads = 10

2) User changes to 20

Result: number_of_threads = 20

3) release v1.1 with same property values as v1.0 (number_of_threads = 10)

Result: number_of_threads = 20

4) release v1.2 with same property values as v1.0 (number_of_threads = 10)

Result: number_of_threads = 20

The problem is that this didn't happen when it is not the following version. When I run the update from v1.0 to v1.2, the property changed to 10.

I am just running some tests and if I choose 'update from all previous versions'. It always replace the property changed in the user side.

Every time there is an update, I would like to preserve the property in my property file if changed in the user side. However, if changed in the server side, it has to be updated/added/removed

Ok, I've already explained how to do this. Simply exclude the property file from wyBuild. Remove it from every single version tab in wyBuild. Then, when wyUpdate updates your app it will completely ignore the property file.

But there is one property in this file that I wanna update. I just don't wanna update what the user changed.

Example:1) Release v1.0Properties:version=1.0number_of_threads=10

2) User changes number_of_threads Result:version=1.0number_of_threads=20

3) Release v1.1 only changing the property version to 1.1 but number_of_threads is still 10.What I expect:version=1.1number_of_threads=20

What happens:version=1.1number_of_threads=10

If I remove this file, the property version is not going to be updated.I was expecting wyBuild to only change the diff between v1.0 and v1.1 which is the property version ONLY.

Cheers,Luiz

wyUpdate doesn't merge your changes and the customer's changes. Why? Because merging unrelated changes can lead to unexpected behavior. What wyUpdate does is apply patches to your files to old versions of your app in which the files have not been changed. If the files have been changed, and wyUpdate needs to patch the file, then wyUpdate uses the "catch-all" update file to patch the file.

What's the solution to your specific problem? Simple: manage the configuration files in your app.