Re: [PATCH 1/2] git-svn: use platform specific auth providers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]