Re: [PATCH 1/2] git-svn: use platform specific auth providers
- From
Matthijs Kooijman <matthijs@stdin.nl>
- Date
- Apr 30, 2012, 16:53 UTC
- Message-ID
- <20120430165315.GO4023@login.drsnuggles.stderr.nl>
- In-Reply-To
- <7vipghgq9a.fsf@alter.siamese.dyndns.org>
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.
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.
[1]: http://search.cpan.org/~edavis/Sort-Versions-1.5/Versions.pm
Gr.
Matthijs