We've been using the original fserver code from DevelopmentSeed's repo succesfully so far with SVN and CVS-style tag names, but now when we upgraded to 6.x-1.1 CVS-style tagged releases are no longer packaged.

There seems to be a regression in the method fserver_parse_tag_name(): CVS style tag names (projectname-6--1-0-alpha1) now only seem to work for the project 'drupal'. Check this code:

$regex = (stripos($tag, 'drupal-') === 0)
              ? '/^(?P<project>\w+)-(?P<core>\d+)--(?P<major>\d+)-(?P<patch>\d+)-?(?P<extra>\w+)?$/'
              : '/^(?P<core>\d+)\.x-(?P<major>\d+)\.(?P<patch>\d+)-?(?P<extra>\w+)?$/';

The stripos() check only works for projects called 'drupal'. Pretty limited.

My suggestion to fix this: just loop over the array of possible regexes and match them with the tag name, see the attached patch.

CommentFileSizeAuthor
fserver-cvs-style-tags.patch2.85 KBcyberwolf

Comments

cyberwolf’s picture

Status: Active » Needs review
eugenmayer’s picture

Status: Needs review » Active

The Tag-names are not "projectname-6--1-0-aplha1" but "6--1-0-aplha1" ...it does even not make sense to add the project name in the tag at all, as this information is highly redundant and just bloating the tags with informations which are trivial and clear and do not need to be part of a tag name.

I have never created tags on d.o. or for the fserver the way you described for contribs and i dont think that is even supported on d.o. - its def. not best practise.

Iam currently not willing wo patch this behavior into the fserver, as it just does not make sense ( and is there for drupal lagacy core project )

cyberwolf’s picture

DevelopmentSeed's original fserver expected tag names like this.

Please check https://github.com/developmentseed/FeatureServer/blob/master/fserver.module, method fserver_parse_tag_name().

I agree with you that it is a bloated naming scheme, but it existed, so I believe it should be added again to the code base for backwards compatibility's sake and those upgrading from the original fserver code.

cyberwolf’s picture

Status: Active » Needs review