Auto complete in commit dialog does not look at changes made (only files names)

Bug #259221 reported by Nicholas Allen
2
Affects Status Importance Assigned to Milestone
QBzr
Fix Released
Low
Lukáš Lalinský

Bug Description

The auto complete in the commit dialog is good but it could be better. TortoiseSVN will auto complete text based on the changes made to the files and not just their file names.

Revision history for this message
Alexander Belchenko (bialix) wrote :

Actually for python files auto-complete is able to suggest functions/classes names. It's less smarter for C++. And absolutely dumb for other programming languages' sources. This area require major refactoring, perhaps to allow other plugins (sub-plugins?) to registry their own words collectors.

Changed in qbzr:
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
Nicholas Allen (nick-allen) wrote :

Could you not just parse the diffs and extract words separated by punctuation and white space? This would be independant of whatever language the source file was written in. Obviously one would want to filter common words like and if not or etc but otherwise I don't see why this can't be done generically.

Revision history for this message
Alexander Belchenko (bialix) wrote : Re: [Bug 259221] Re: Auto complete in commit dialog does not look at changes made (only files names)

Nicholas Allen пишет:
> Could you not just parse the diffs and extract words separated by
> punctuation and white space? This would be independant of whatever
> language the source file was written in. Obviously one would want to
> filter common words like and if not or etc but otherwise I don't see why
> this can't be done generically.

This solution will fail in many case. E.g. I change something inside function.
In this case the *name* of this function most likely will be out of diff hunk.
And therefore auto-complete will not suggest me its name.

Revision history for this message
Nicholas Allen (nick-allen) wrote :

You are right it's not perfect but it would still be better than just doing filenames. You could even look 2-3 lines outside of the diff and use words found there too. I'm pretty sure this is all TortoiseSVN does anyway.

Revision history for this message
Alexander Belchenko (bialix) wrote :

Although my example shows that this simple heuristic will fail in some important cases, I'm agreed it will be improvements. Writing complex source code parser/analyzer is not the primary task for QBzr. If I'll have a time I'd like to look into TSVN sources to get clear picture how they do it.

Revision history for this message
Alexander Belchenko (bialix) wrote :

Here is another use case where auto-completing needs improvements: when I'm committing changes to renamed files the old name of file is not auto-completed, only new one.

Revision history for this message
Lukáš Lalinský (luks) wrote :

So, looking at the TortoiseSVN code, it does basically the same thing as we do, but the list of regexes is user definable and have more supported languages. See http://tortoisesvn.tigris.org/svn/tortoisesvn/trunk/doc/AutolistDoc.txt and http://tortoisesvn.tigris.org/svn/tortoisesvn/trunk/src/TortoiseSVNSetup/include/autolist.txt I don't think the separate file approach is necessary for us, because Python code is easy to edit, but I'll add support for the regexes from their default autolist.txt (it's GPL so it shouldn't be a problem)

Lukáš Lalinský (luks)
Changed in qbzr:
assignee: nobody → luks
milestone: none → 0.9.4
status: Confirmed → Fix Committed
Changed in qbzr:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.