12-28-2018, 05:56 PM
(This post was last modified: 12-28-2018, 06:16 PM by mmartinek.
Edit Reason: Cited bug is not happening anymore
)
Reviving old post. I'm also in the need of source control import/export.
Currently, I export to a QML then connect as a Sqlite resource and dump the code to flat files. Metadata gets appended to each source file as a comment (guid, flags, etc), hex encoding any binary data. This allows it to go into source control and enable code reviews.
For importing I read the flat files and re-build the QML using a "blank". To create the blank, I deleted everything out of a normal QML file except the root entries (id = 0).. then populate the items and texts tables, reading metadata from each file to populate the flags, guid, date, etc.
About the only thing I need to do now is delete the old file/folder so the import won't rename anything. This should at least cover use cases where each project is within a single folder in QM. I'm working on building this out in a way that is user-friendly, so I can post it here for others. Working on using newitem to delete the old project before calling SilentImport.
Currently, I export to a QML then connect as a Sqlite resource and dump the code to flat files. Metadata gets appended to each source file as a comment (guid, flags, etc), hex encoding any binary data. This allows it to go into source control and enable code reviews.
For importing I read the flat files and re-build the QML using a "blank". To create the blank, I deleted everything out of a normal QML file except the root entries (id = 0).. then populate the items and texts tables, reading metadata from each file to populate the flags, guid, date, etc.
About the only thing I need to do now is delete the old file/folder so the import won't rename anything. This should at least cover use cases where each project is within a single folder in QM. I'm working on building this out in a way that is user-friendly, so I can post it here for others. Working on using newitem to delete the old project before calling SilentImport.
