uSync to sync changes
t
Hi I'm trying uSync and have come across the following scenario: PC 1: created a document type with some fields. Push this code into the repository. PC 2: pulled the latest changes and run an import. The document type isn't there. I do a full import and the document type isn't there. Is there a way to ensure this doesn't happen? I think I can export but what if this step is forgotten?
b
are you sure the usync files are in repository?
t
No they're not. However I believe if I run an export before pushing the files to the repository then they will be available. My question would be if the export button needs to be run on uSync before pushing the files to to repository, how could this be done so no one needs to remember to do this when pushing file in?
k
Hi, unless you have disabled "ExportOnSave" in the app settings then uSync should write the file to disk as soon as you make any doctype changes .
(in normal operation you shouldn't need to go near the export bit of the dashboard)
t
I just checked the settings section and I have export on save to All. What about the scenario where I create a document type, push in the changes and at a later day I add a property push in the changes again? Another scenario is what if I create the property on the document type, push the files in and on another PC another user opens the same project but doesn't import and makes other changes and then pushes those changes in? In this scenario would I lose the changes I made?
k
- > If you create a doctype, (the file gets created). --- if the other user syncs now they get the doctype - > if you then add a property (the file gets updated). --- if the other user sync here, they get the updated properties (or removed properties if you deleted them) - if someone syncs after both they get the new doctype in the final state. in one action. if the user doesn't sync with you files (there is a ImportOnStartup to ensure they always are in sync with what is on disk). but then makes their own changes, they will get written to disk. but at this point you are in the world of source control, you might get a merge conflict (if they didn't pull first), or you will see the change and you can rollback. if you delete something then the doctype/datatype/etc file is overwritten with an 'empty' file which tells uSync to delete it on import, so that way its all kept inline. docs has a lot of info on the diffrent setups. https://docs.jumoo.co.uk/usync/category/usync
16 Views