Git With Eagle: Add Meaning to Diff

a-glimpse-of-git-with-eagleWe love Git. We know everyone has their favorite version tracking tools. But even those that don’t care for Git should see the value of getting meaningful Diff data from tracking Eagle layout files.

Was that last sentence just gibberish to you? Let’s take a step back. A few years ago it was impossible to use version control with Eagle at all because the schematic and PCB layout software used to save its files as binaries. But then Cadsoft transitioned to saving Eagle files as XML. This opened the door for things like scripting to rename parts en masse and to track the files under version control. One problem with the latter has been that performing a Diff on two different versions of a file results in XML changes that are probably not human readable. [Patrick Franken] wrote this script to add at least a glimmer of meaning.

We’d love to see some kind of side-by-side highlighting on the schematic or board renderings themselves. But that’s quite a ways off if we ever actually see it. For now his script will take the Diff and print out the tables seen above denoting which types of changes were made from one version to the next. It’s a start, and we hope it inspires even more work in this area.

11 thoughts on “Git With Eagle: Add Meaning to Diff

  1. Saving Eagle files in a character-based, non-proprietary format is indeed a huge step forward. One nit to pick, however, version control software has been able to deal with binary files for over a decade. Git manages binary files. So the fact that Eagle files were binary, did not preclude putting Eagle files into VC. The binary format did, for the most part, preclude the types of manipulation and analysis that you highlight in the article. Didn’t want people unfamiliar with VC to read the post and walk aways thinking that binary files were off limits for VC…

  2. Why not create a converter that maps the unfriendly xml format to and from the usual (pre-xml) simple text format? Depending on how netlists are written (part-oriented, net-oriented, or pin-oriented) simple text diffs can be easy to read. In my opinion, a well documented simple text format is easier to parse and work with than xml. Of course the difftool mentioned above still makes a useful summary that plain diff wouldn’t.

    1. This is what Geagle actually makes. It gets all interesting data from the drawing and saves it separately. The main disadvantage of just doing a text diff on this is that If you for example move a whole group of parts you’ll see a lot of changes. But you are probably not interested in it because from a electrical point of view it doesn’t matter. And it will drown the interesting changes.

    2. You can export netlist, pinlist, partlist etc using the EXPORT command
      in Eagle CAD console. That should help you with a text based diff.

      IMHO XML is a machine parsable format and horrible for human readability
      without a good viewer/editor that presents the data structures.

      It looks like a bad case of alphabet soup core dump.

    1. openscad and stl are already text files. Not sure about freecad.

      in another domain, beware of ProjectLibre. The default file format is a raw java serialization dump and I recently lost a planning file because of a bad net connection. There is an option to save as xml, I should have used that from the beginning.

  3. The link to the github is obsolete. gives 404.
    Is currently pointin to: https://github.com/nerdy-works/Geagle
    but since that gives 404, I found this using github search: https://github.com/hurik/geagle

    Which tells me it’s obsolete, in which case this should be it: https://github.com/hurik/JGeagle

    Someone care to verify?

    I sent a message for the Hurik about this as well.

    (I do understand, if this is way too old of an article and no interest in updating it, but if things like this break, it can be detrimental in general for the availability of information. So fixing the link would be highly appreciated ;))

Leave a Reply to Carl HageCancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.