From: Eric Wong Date: Mon, 30 Apr 2012 19:02:00 GMT Subject: Re: [PATCH 1/2] git-svn: use platform specific auth providers Message-ID: <20120430190200.GA27108@dcvr.yhbt.net> In-Reply-To: <20120430165315.GO4023@login.drsnuggles.stderr.nl> Matthijs Kooijman wrote: > Hi folks, > > I could reproduce this problem (after installing half a dozen Ubuntue perl > packages on my Debian system ;-p). It seems the problem is because the > version comparison is wrong: > > if ($SVN::Core::VERSION gt '1.6.12') { > > This does textual comparison, so 1.6.6 > 1.6.12. To do proper version > comparison, I think the version numbers should be split into > major/minor/revision and each be compared numerically. > > This is not the only place where this comparison happens in this way, > there are 6 more comparisons in this way, which would have to be fixed > as well. Ah, thanks for the analysis, we were lucky in the past that all version components only had a single character. > We could introduce a helper function for comparing version numbers by > splitting and comparing the parts separately, but that might be hard to > get right (especially when non-numeric version parts are involved). > > An alternative would be to use the Sort::Versions perl module [1] for > this, but that would add an external dependency. > > I'd be happy to code and test both approaches, just let me know which > would be preferred. I think the former is preferable for git. Sort::Versions isn't used anywhere else in git and I don't think it's widely installed.