tobyqin / ccnet.svnrevisionlabeller

Automatically exported from code.google.com/p/svnrevisionlabeller
0 stars 0 forks source link

Ability to Zero Pad Revision / Build Number [Patch Included] #7

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
We recently encountered a slight issue: Our repository revision number
ticked over to an additional digit (Eg. 99 -> 100). As part of our build
process we tag every successful build in SVN. However as the revision and
build are not zero padded they are not text-sortable (Eg. 1.5.99.1 is
sorted after 1.5.100.0 in a directory listing).

As such I've modified the svnrevisionlabeller to allow zero padding both
the revision and build numbers (the major and minor numbers do not need
zero padding by the plugin as they're incremented by the user in the config
file).

With this patch two new config items are available; "zeroPadDigitsRevision"
and "zeroPadDigitsbuild". Both of these are integers and specify the number
of 0 digits to pad the revision / build with.

If I set zeroPadDigitsRevision = 5 and zeroPadDigitsBuild = 2, the two
labels I used earlier would become 1.5.00099.01 and 1.5.00100.00
respectively which is text-sortable.

Attached is a patch against the current head (2009-01-06) which implements
this feature.

I apologise if this isn't the right forum for this, but I was unable to
find any other way to contact the developers.

Original issue reported on code.google.com by Mr.M.Dav...@gmail.com on 5 Jan 2009 at 11:35

Attachments: