FreeCAD is great but it miss Version Control integration, I also agree it's an important feature.
Onshape has a great versions & branching management features, a demo is available there:
https://www.youtube.com/watch?v=ggL9IQSo4VI
It would be great for Open Hardware Project members, not allways able to use git from a command line, to have such features directly in FreeCAD to interact with a git repo, its branches,versions and to be able to merge them. May be by using existing git GUI interfaces.I have added a such comment in this exisiting Mantis Feature request: https://www.freecadweb.org/tracker/view.php?id=1558 . Hope this will help a bit the FreeCAD project team to priorize this feature.
Recommendations for Version Control
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
Be nice to others! Read the FreeCAD code of conduct!
Re: Recommendations for Version Control
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Re: Recommendations for Version Control
TIL learned about FreeCAD .FCStd files being zipped XMLs, and following my interest in this topic (CAD version control), I thought I could share my thoughts here as well. I think this workflow could work:
- start a git repository right inside the zipped folder
- create a .gitignore file, or better to say a git white list, which makes sure only the two XML files GuiDocument.xml and Document.xml and ignore the rest
- upon every save it automatically commits
- the commit message could be extracted by parsing the git diff and listing all the changes made, plus other comments user could add
- if one retrieves to an older commit then all the rest of the files could be deleted and recomputed.
Re: Recommendations for Version Control
What do you mean by inside the zipped folder?foadsf wrote: ↑Sat Oct 12, 2019 11:10 am start a git repository right inside the zipped folder
create a .gitignore file, or better to say a git white list, which makes sure only the two XML files GuiDocument.xml and Document.xml and ignore the rest
upon every save it automatically commits
the commit message could be extracted by parsing the git diff and listing all the changes made, plus other comments user could add
if one retrieves to an older commit then all the rest of the files could be deleted and recomputed.
And why do not add the brp files? Without them you can not reconstruct the part. If you leave them out, you can also not push the git repo to some other location and open the files there.
Re: Recommendations for Version Control
well, the way Lei Zheng (aka RealThunder) is approaching the problem is to save everything inside a folder instead of a zipped file (reference). I'm not sure if exposing the internal guts of a .FCStd file to the users is such a good idea. It should be possible to treat the zip file as a folder in some way or another I think. And then do all git stuff right there without the need to unarchive.
It seems like you can. See this post for example. There I have reconstructed everything using just Document.xml.
Re: Recommendations for Version Control
That does not work for me:
if the brp files are not there, it will not create the file.
Code: Select all
Traceback (most recent call last):
File "<string>", line 66, in <module>
File "<string>", line 51, in createDocument
File "/usr/lib/python3.7/zipfile.py", line 1713, in write
zinfo = ZipInfo.from_file(filename, arcname)
File "/usr/lib/python3.7/zipfile.py", line 506, in from_file
st = os.stat(filename)
<class 'FileNotFoundError'>: [Errno 2] Datei oder Verzeichnis nicht gefunden: '/home/reox/CAD/tmp/PartShape.brp'
Unhandled Base::Exception caught in GUIApplication::notify.
The error message is: [Errno 2] Datei oder Verzeichnis nicht gefunden: '/home/reox/CAD/tmp/PartShape.brp'
Re: Recommendations for Version Control
Would you be kind to explain this issue over there, including your environment? It works for me on Windows and mac ¯\_(ツ)_/¯