[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Feature Request: remove file extensions when autocompleting in comments

From: Alexander Klenin <klenin_at_gmail.com>
Date: 2007-09-29 03:33:53 CEST

On 9/29/07, Simon Large <simon.tortoisesvn@googlemail.com> wrote:
> On 28/09/2007, Alexander Klenin <klenin@gmail.com> wrote:
> > Ok, added AutocompletionRemovesExtensions registry key in revision 10768.
>
> Nice :-) As you have a DWORD setting, you could implement more than
> one of these schemes.
>
> 0: Filename with extension
> 1: With and without extension
> 2: Without extension
I thought about that, but figured that since autolist is already quite long
(I didn't even know it includes all subpaths to every file in commit dialog!),
and extensionless names come before those with extensions,
extra lines would not hurt.
Actually, I tried it myself for a day at work.
So to simplify documentation and code I choose minimal implementation.

> BTW if I may comment on the coding style there:
> - while ((pos = sPartPath.Find('/', pos)) >= 0)
> - {
> - pos++;
> + int lastPos = 0;
> + for(int pos = 0; pos = sPartPath.Find('/',
> lastPos) + 1; lastPos = pos)
>
> That for (;;) loop is very concise, but I had to read it several times
> to convince myself that it was doing (almost) the same as the more
> obvious while loop that it replaces.
Yes, I tend to get unnecessarily clever sometimes.
You should see some of my Perl code ;-)

However, there is actually a problem here I forgot to write about.

The problem is -- TortoiseSVN actually crashed with old code in debug mode.
The crash happened due to 'head corruption' in various random destructors after
I hit 'Escape' to close commit dialog.
I verified that:
1) It crashed both before and after (simpler version of) my changes.
2) Crash did not happed if I remover autolist construcltion altogether.
3) Crash did not happen in release build, only debug one.
I think it is either a problem with my installation of Visiual Studio
(unlikely),
a bug in ATL/MFC or (most likely) some threading issue.
I started to randomly rearrange code to test this and committed
version that crashed least often for me.

-- 
Alexander S. Klenin
Insight Experts Ltd.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org
Received on Sat Sep 29 03:34:05 2007

This is an archived mail posted to the TortoiseSVN Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.