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

RE: Re: Repobrowser - Numeric order filename sorting

From: Gerasimov, Ivan <Ivan.Gerasimov_at_transas.com>
Date: 2006-04-12 20:49:35 CEST

Hello, Stefan!

> > Yes, I see that. I've been testing the sample function with STL's
> > sort, that's why I made it return Boolean.
>
> Now I'm confused. How can stl sort something without knowing what's
> 'higher' and what's 'lower'? By simply knowing what's equal and what's
> not, you can't sort. Or am I missing something here?
> Are you sure the stl sort doesn't use some other means to check what's
> greater? Maybe an overloaded '<' or '>' operator?

The original routine was used as a 'less' comparator (it was mentioned in its name - CompareNumericLess). That's what stl's sort needs.

>> Now, your new function doesn't work. It first looked like it did,
>> then I tried the Subversion tags folder. Here the sorting failed.
>
> That's surprising! I've tried to test as heavily as I could, before I
> posted it.

> I've tried it with the repobrowser on the Subversion tags folder. There,
> you'll see that 0.37 comes *after* 0.6 and 0.7 (it's only the 0.37
> that's wrong, all others are sorted correctly). Strange, I know, but I
> haven't found out why yet.

I'm not getting something. Both 6 and 7 are less then 37. They should go first, shouldn't they?

Attached picture is what repo-browser looks like. Everything is fine to me.

Sincerely yours,
Ivan Gerasimov

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org

repo-svn.PNG
Received on Wed Apr 12 20:50:06 2006

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.