Re:Developing open-source FPGA tools
by bluGill on Wednesday November 13, 2019 @08:33AM
(#21523748)
Seems like every GUI based programming language I've worked with doesn't work well with version control. I get a dozen emails a day about someone locking/unlocking a file - if two people modify the file at the same time there is a merge conflict and no way to resolve the difference. Until git can merge two conflicting files in a sane way ("git mergetool" launching a custom merge GUI would be fine if it worked - I'm not locked into must be able to us vi to merge)
[ Parent
| on HN ]
Re:Developing open-source FPGA tools
by alexhutcheson on Wednesday November 13, 2019 @11:45AM
(#21526136)
You can write a script (in Bash, Python, Go, whatever) that accepts the arguments passed by git (filenames for $BASE, $LOCAL, $REMOTE, and $MERGED)[1] and launches whatever diff tool you'd like to use. You can then tell git to use it by setting the merge.tool and merge.tool.cmd configuration variables.
If you want to invoke different tools for different types of files, you can either handle this in your script, or you can explicitly pass the --tool flag in cases where you want to use a non-default tool.
Writing the wrapper script is generally pretty straightforward - the only "gotchas" are making sure the file patterns can be handled by your merge tool, and making sure you write the result to $MERGED. Sometimes you need to have a "clean-up" step in your script that copies the merge tool output to $MERGED and maybe deletes tmp files that were created.
That doesn't help when the file is a binary and nobody has written a tool to merge it. How do you merge a picture?
Re:Developing open-source FPGA tools
by naikrovek on Wednesday November 13, 2019 @09:08PM
(#21532119)
You're not replying to me, but I imagine you'd decode both images to an uncompressed format and diff them visually, optionally with a way to highlight pixels that differ between the two.
Binary file types that you can't view in some way would be challenging.
JPEG doesn't really have pixels though, and with some modern formats it gets even worse. For netlists it's hopeless.
Re:Developing open-source FPGA tools
by SomeHacker44 on Wednesday November 13, 2019 @10:36PM
(#21532546)
Unity3D works reasonably well with VCS when using Text format files, as an example of a GUI development environment.