From: James L. <jam...@ca...> - 2007-01-10 01:05:44
|
Bob, Yes that would be possible. I think the main problem really would be the case where the patch doesn't apply cleanly - using the command line patch utility this becomes a case of going through each of the hunks that have failed and pasting them into the appropriate part of the source file. While not the hardest thing in the world to do, it does become somewhat of a pain for large code-reviews. Additionally, I'm on Windows and the patch/diff tools for Windows seem very unstable (they crash with many diff inputs, without giving usable output). I'm using the ones from http://gnuwin32.sourceforge.net/ - is there a better version I should be using? To be honest, even just having kdiff3 be able to nicely automate taking a source-and-diff as input and piping it through patch would be a fairly nice feature to have... James On 09/01/07, Bob Eby <be...@le...> wrote: > James, > > Wouldn't it be possible to write a shell script/shortcut which took in 2 > files, used the GNU patch utility to apply one as a patch to the other > in a new file, and then launch kdiff3 on the result? > > I suppose this wouldn't handle mismatched lines, but it could easily > error out instead of starting kdiff3 if the source file was incorrect. > (I guess I'm assuming in most cases, you need an accurate source file > anyways and it should be readily available... A more advanced script > might create a 3rd file in cases where a mismatch occurred to behave as > you describe. Just Piping patch output to a third file should be easy > enough as a poor man's solution...) > > Note: I'd have to know your OS and environment to suggest an actual > script although cygwin is available even on Windows and includes a patch > utility. > > -Bob > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Kdiff3-user mailing list > Kdi...@li... > https://lists.sourceforge.net/lists/listinfo/kdiff3-user > |