Skip navigation.
KDE Developer's Journals

It's been a tough week but...

bruggie's picture

... Kompare seems to be in a useful state again atm. I did a lot of hacking on it and moving a lot of code around and i think the code is a bit cleaner now and easier to maintain.

I also fixed some bugs:

  • scrolling in the view (it currently still does not work fully yet but i'll keep on improving it).
  • navigating with ctrl+up and ctrl+down, it only navigated into half of the differences in a file.

Outstanding bugs i will fix before 3.2 is released:

  • connectwidget redrawing too early (the QListViews are drawn in the eventloop) so the listviews are not populated yet
  • the scrollbars are not properly shown initially, again this is caused by the QListViews
  • uploading to a remote location after saving it locally
  • add documentation (high priority)

Stuff i need to test (and where you can help by reporting bugs to http://bugs.kde.org)

  • parsing all kinds of diff output (files with and without an endling newline) ed and rcs wont work atm, they are pretty hard to map to the current diffmodel. If you can supply patches for it that's ok with me too Smiling Normal does not work because i did not have time to implement it yet after rewriting the parser in the make_it_cool branch
  • downloading from remote locations

Stuff that i want to do after 3.2:

  • Add diff options to the compare dialog so you can choose the diff options you want to use when comparing.
  • Add inline difference support.
  • Optimize parsing, on a slow machine it is really slow, even on my dual amd mp 2400+ it takes a while before a large diff is parsed.
  • Maybe get rid of the qlistview and it's problems by using custom widgets, but that is a big maybe...
  • Add support for reading files with a different charset than the local settings.

Well, you're now up to date again, thanks for reading and please keep providing useful input Smiling

Update (October 6, 2003):
The first 2 outstanding issues are resolved afaict Smiling

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
pfremy's picture

Improvements

Could you make kompare able to open a patch file and display it ? That would require to display some separation between the hunks, but it does not sound very difficult to me.

About speeding the parsing, last time I checked, kompare requested the diff as one big hunk with a -U65535. This require the whole files being compared to be parsed, and may break with some long (directory based) diff. If you want to speed things up, I think you should learn to really parse diff hunks.

bruggie's picture

Re: Improvements

Can you please check again Eye-wink The -U65535 is only used when the user selected view whole file (wording may be off, doing this from memory) in the view settings and it overrides the number of context lines in the diff settings.

Displaying a patch file is one of the first things kompare could do, heck even kdiff2 could do that so i dont know what you are talking about. Including hunks headers and the line that gets added by diff when using the short -p option or the equivalent long --show-c-function option.

Patching is possible well since KDE 2.2 or so Smiling But now (for kde 3.2) i have added a new mode, blend which takes a file and a diff, or if you prefer a directory and a diff, which can apply parts of the diff to the file. The only trouble is that it currently does not allow offsets and fuzzy patching, which makes it kinda useless for files edited after the diff has been made but i'll keep working on that.

alex rad's picture

thanks :)

Thanks for keeping us up to date!

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.