Unfortunately we use PVCS, will be for a while longer. We have a home grown tracking system using MSSQL as a backend. I have revision information stored as a string in the formats:
1.2 (no branches)
220.127.116.11 (branched once)
1.509 (no branches, heaps of revisions)
18.104.22.168.1.1 (branched 3 times)
I would like to be able to convert these strings into numbers so that I can do a straight comparison. Due to the size of the fields, I'll end up with 3 digits for each, which ends up as a very big number.
I don't believe any single file has been branched more than 3 times, and I don't plan to cater for it. I need a user-defined function that can take these formats and return a single number that I can then use easily for comparisons.