I’ve now gotten my primary projects updated to 2022r1.1. However, I’m running into issues when trying to merge versions where the order in which code sections - Begin … End - are not being saved consistently between edit sessions. For instance, I save a version of my work, check it in to SVN, and shutdown for the evening. I start back up in the morning, add a new label or other object, resave the same project, and end up with conflicts because an unchanged object is now located 30 sections lower in the code than the previous save.
Is nothing done to maintain the file order in text projects between saves?
This is a massive issue. Every version of Xojo I have seen reorders the code the the saved file. I use mainly XML so I can compare code versions. Also, Modules saved externally get their ObjContainerID in the xojo_xml_code file changed randomly when building. There are many modules that dont get touched but SVN sees a file change. Hard to keep track of actual changes or just an ID change
Positive. In one example, my pmVerifySourceDrive PopupMenu begins at line 382 in the original save but at line 3840 in the second save. None of the event code in that control was touched between the two saves.
I also have Cornerstone and I normally just need to do a Sync merge. This issue results in my needing to use Cherry Pick mode. If I create a patch diff (diff -Naur), it results in 4,820 lines instead of the expected 121 that were actually changed and added.
I haven’t created patch diff files in a long time, but what I do remember is that if you move 121 lines of code from one place to another compared to the same file (different version with the code in a different place) then the patch file will only create an add section to the new position and a remove section for the old position.
Could the diff -Naur be changed to only create this type of patch?
You said ‘shutdown for the evening’, does that mean that you closed Xojo and opened it the next morning?
When I said I mainly use the xml format I was talking about xojo_xml_project. If you diff 2 files…on some builds code blocks can be jumbled. The xojo_project format is impossible with a versioning system as it creates new files for modules and classes etc. You would have to remember to add those to the repository every new one you added. What do you mean by text format?
Other than an unknown bug, the reason things can move vast distances in the source is one of two reasons:
You change the ordering of the control (front, back etc)
You change the parent of the control
The controls are saved in the order they are at design time. Move it to the back and it goes to the top of the file above all other controls, to the front and it will move to the end of the file. If you move a control into a parent it will appear in order under that parent control so it can quite easily move from the top of the file to the bottom with the smallest of changes at design time.
Ideally each control would have a unique ID which which never change and so it stays in the same place in the file, if the position of the control is moved then its ID is moved up or down a few lines instead of the huge control block.
Well even for macOS you can’t buy that version of Cornerstone now. Ownership changed and they’ve gone to a subscription model for a subsequent version, so I’ve not bothered upgrading. At least it became 64-bit before that happened.
Was just saying it would be great if integrated. That way if you used xojo project then xojo could auto add files into the repository. Xojo project creates separate files for each module, class, etc and you have to remember to add it. I use SVN