Hacker News new | ask | show | jobs
by chipx86 372 days ago
Exactly that. They all do things so differently that you end up creating and maintaining a separate parser for every SCM's diff format, and sometimes doing a lot of normalization of content or modification to include information the format lacks that's needed to apply the patches. And those are just for the ones that actually have a diff format -- many don't.

We needed something for ourselves at the very least. Much of DiffX came from thinking about these pain points and from talking to other SCM vendors whose engineers have also given some thought to these problems.

2 comments

DiffX would have been nice to have available way back when I was trying to add support for our custom in-house vcs to Review Board. We had to either contort the diffs from our vcs to some format already understood by Review Board, which was sometimes difficult due to how the vcs structured the data it stored, or add a whole new parser to our Review Board instance, which would have been a major maintenance pain.

As an aside, I applaud you for creating Review Board. I've introduced its usage with several teams that I've worked with, and it really helped change how those teams operated, from a fly-by-night sort of development to actually having a process; The reduction in bugs and improvement in code quality were quite useful too.

I'm really glad it was useful for you and your teams! :) Hearing that kind of thing always brightens my day. I've felt very lucky getting to work on this as my job all these years.

It'd have been amazing having something like DiffX when we started building some of these SCM integrations too. It's really saved us a lot of trouble with some of the recent ones we've built (PlasticSCM / Unity Version Control, Keysight SOS, and ClearCase), which didn't have a format to work with and needed a lot of extra metadata for lookups and some other stuff.

> They all do things so differently that you end up creating and maintaining a separate parser for every SCM's diff format (...)

...and you seriously believe that pushing yet another ad-hoc format, and one which no one at all uses, is a way to address your concern?

They are using it. Review Board is a successful project that's been around for a long time, and it's solving a problem they had. One of the most common workflows with Review Board for source code reviews is to use the RBTools command line tools to post or update reviews. The cli would be the one generating the diff (although it supports uploading diffs that you generate iirc.) I haven't looked into the details, but I assume RBTools can generate DiffX diffs which is probably easier for the backend to process. (E - from what chipx86 has said in some of his posts here, they have been using it for several years now)

I don't really see this as pushing anything, more as documentation of something they did for themselves, but are also willing to provide to anyone else if they want to use it. Same as how the source code for the core Review Board product is available for anyone.

If you're happy with the diff format you're using in your workflow, keep using that. No one's twisting your arm to switch to DiffX.

> They are using it.

Which mainstream VCS supports this format?

You're just being obtuse. It's been explained multiple times that there are tools external to the version control systems that can generate and consume this format. Just because there's no 'svn-diffx' or 'hg-diffx' command/tool built into the vcs itself, doesn't mean that this format can't be generated and used by other tools.

So to answer your question, any vcs that has had tools written for it to generate this format. And it sounds like it's most of the major ones as far as Review Board is concerned.