New way to interface with diffutils

Main development forum.

New way to interface with diffutils

Postby kimmov » Sat Jan 09, 2010 6:55 pm

Interfacing diffutils is the core of WinMerge. And it is the most problematic part we have currently. We are directly using diffutils internals and have modified old version of diffutils. That makes updating to new diffutils version very hard and error-prone.

I've been thinking about totally new approach for this. diffutils compiled as binary reads input from files and outputs to stdout. What if we started using these standard interfaces instead of deep internals?

Main upsides would be:
  • easier integration - easier maintenance and updates
  • better modularization - diffutils would be just one library like expat and pcre
  • possibility to use other diffengines with file/stdout interface
Main downsides:
  • slower
  • no customizations to diffutils - we'd need to do more post-processing for results
  • have to write code to parse diffutils patch format

I think this is worth some experimenting.
kimmov
 
Posts: 562
Joined: Thu Sep 11, 2008 8:51 pm
Location: Finland

Re: New way to interface with diffutils

Postby gerundt » Wed Jan 13, 2010 8:10 pm

kimmov wrote:I've been thinking about totally new approach for this. diffutils compiled as binary reads input from files and outputs to stdout. What if we started using these standard interfaces instead of deep internals?


Made this no problems with different EOL styles? If not, it sounds like a interessting idea. And since computers gets faster and faster the downside "slower" is not that big.
gerundt
Site Admin
 
Posts: 193
Joined: Wed Sep 24, 2008 8:47 am
Location: Germany

Re: New way to interface with diffutils

Postby kimmov » Sat Jan 16, 2010 9:18 am

gerundt wrote:Made this no problems with different EOL styles? If not, it sounds like a interessting idea. And since computers gets faster and faster the downside "slower" is not that big.

Yes we need to think new ways to handle some features/problems. Luckily features like EOL differences are easy - we just need change EOL types of files we give to diffutils the same. It probably even is slightly faster that way since we don't need to determine each line's EOL and then try to match them.
kimmov
 
Posts: 562
Joined: Thu Sep 11, 2008 8:51 pm
Location: Finland


Return to Developers

Who is online

Users browsing this forum: No registered users and 2 guests

cron