Difference between revisions of "Charon"
m |
(Add screenshot) |
||
Line 2: | Line 2: | ||
Charon is an integration between [[Git]] and SolidWorks, designed by | Charon is an integration between [[Git]] and SolidWorks, designed by | ||
[[User:HenryFranks|Henry Franks]] and [[User:TimClifford|Tim Clifford]] to eliminate the | [[User:HenryFranks|Henry Franks]] and [[User:TimClifford|Tim Clifford]] to | ||
re-occuring problem of having >10 versions of a CAD assembly on the Google | eliminate the re-occuring problem of having >10 versions of a CAD assembly on | ||
Drive (with only one person understanding it). | the Google Drive (with only one person understanding it). It is named after the | ||
ferryman to Hell (for obvious reasons). | |||
The GitHub repository can be found [https://github.com/smh-my-head here]. You are | The GitHub repository can be found [https://github.com/smh-my-head/charon here]. | ||
welcome to contribute. | You are welcome to contribute. | ||
It is assumed that you understand [[Git]], please read that page first. Charon | It is assumed in this page that you understand [[Git and GitHub]], please read | ||
aims to keep the overall workflow as similar as possible to using Git for code, | that page first. Charon aims to keep the overall workflow as similar as | ||
with | possible to using Git for code, but with a new merge and diff driver to enable | ||
working with SolidWorks' binary file formats. | |||
= Features and Usage = | = Features and Usage = | ||
[[File:Charon hades example.png|thumb|800px|A graphical difference shown by Charon (running | |||
on [[Hades]])]] | |||
== Enhanced diffs == | == Enhanced diffs == | ||
Line 19: | Line 24: | ||
Without Charon, all <code>git diff</code> can tell you is that two files are | Without Charon, all <code>git diff</code> can tell you is that two files are | ||
different. With charon enabled, <code>git diff</code> will open SolidWorks to | different. With charon enabled, <code>git diff</code> will open SolidWorks to | ||
show you an interactive, graphical diff between the files, | show you an interactive, graphical diff between the files, as shown in the screenshot. | ||
Note that due to technical limitations caused by Solidworks, Charon cannot | |||
leave SolidWorks in this state, you will need to open the compare tool manually | |||
(under ''Tools -> Compare'') | |||
== Usable mergetool == | == Usable mergetool == | ||
''This output is not stable at the moment, it could change'' | |||
Charon makes merging branches actually possible (but it will never be that | Charon makes merging branches actually possible (but it will never be that | ||
easy...). A merge conflict will | easy...). A merge conflict will result in something like the following: | ||
<source> | <source> | ||
Disconnect_Puller.SLDPRT conflicts. Choose one of the following options: | |||
<source> | local: take the local file (what you are merging into) | ||
remote: take the remote file (what you are merging) | |||
edit: open the files in SolidWorks to edit manually | |||
abort: abort the merge resolution | |||
Enter your choice: | |||
</source> | |||
Most of the options are fairly self explanatory, the interesting one is | |||
<code>edit</code>. It will open the files in exactly the same way as | |||
[[Hades#Enhanced diffs|the diff tool]], and you can view and/or edit them. | |||
After you exit solidworks, you will be returned to the menu. (Your edits to the | |||
files will be saved). You can then choose a file to take. | |||
= Installation = | |||
== Configuring SolidWorks == | |||
You will also need to enable ''SOLIDWORKS Utilities'' at startup, you can do | |||
this by navigating (in SolidWorks) to ''Tools->Add-Ins'' and checking the box | |||
for startup next to ''SOLIDWORKS Utilities'' | |||
== Enabling Charon in a repository == | == Enabling Charon in a repository == | ||
Line 58: | Line 73: | ||
== Cloning a repository that uses Charon == | == Cloning a repository that uses Charon == | ||
When cloning a repository that uses Charon, you will need to need to run the | When cloning a repository that uses Charon, you will also need to need to run | ||
setup script. Something like: | the setup script. Something like: | ||
<source lang="bash"> | <source lang="bash"> |
Revision as of 19:24, 30 April 2021
This page is unfinished
Charon is an integration between Git and SolidWorks, designed by Henry Franks and Tim Clifford to eliminate the re-occuring problem of having >10 versions of a CAD assembly on the Google Drive (with only one person understanding it). It is named after the ferryman to Hell (for obvious reasons).
The GitHub repository can be found here. You are welcome to contribute.
It is assumed in this page that you understand Git and GitHub, please read that page first. Charon aims to keep the overall workflow as similar as possible to using Git for code, but with a new merge and diff driver to enable working with SolidWorks' binary file formats.
Features and Usage
Enhanced diffs
Without Charon, all git diff
can tell you is that two files are
different. With charon enabled, git diff
will open SolidWorks to
show you an interactive, graphical diff between the files, as shown in the screenshot.
Note that due to technical limitations caused by Solidworks, Charon cannot leave SolidWorks in this state, you will need to open the compare tool manually (under Tools -> Compare)
Usable mergetool
This output is not stable at the moment, it could change
Charon makes merging branches actually possible (but it will never be that easy...). A merge conflict will result in something like the following:
Disconnect_Puller.SLDPRT conflicts. Choose one of the following options:
local: take the local file (what you are merging into)
remote: take the remote file (what you are merging)
edit: open the files in SolidWorks to edit manually
abort: abort the merge resolution
Enter your choice:
Most of the options are fairly self explanatory, the interesting one is
edit
. It will open the files in exactly the same way as
the diff tool, and you can view and/or edit them.
After you exit solidworks, you will be returned to the menu. (Your edits to the
files will be saved). You can then choose a file to take.
Installation
Configuring SolidWorks
You will also need to enable SOLIDWORKS Utilities at startup, you can do this by navigating (in SolidWorks) to Tools->Add-Ins and checking the box for startup next to SOLIDWORKS Utilities
Enabling Charon in a repository
To enable Charon in an existing repository, add it as a submodule and run the setup script:
git submodule add https://github.com/smh-my-head/charon
git submodule update --init
./charon/setup.sh
Cloning a repository that uses Charon
When cloning a repository that uses Charon, you will also need to need to run the setup script. Something like:
git clone https://github.com/cuspaceflight/repository-that-uses-charon
cd repository-that-uses-charon
git submodule update --init
./charon/setup.sh
Updating Charon
You may want to update Charon if improvements are made. To do this, update the submodule and then run the setup script again (each user will need to run the setup script):
git submodule update --remote
./charon/setup.sh