Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [buckminster-dev] Making Buckminster understand SVN branching

Aha, yes. Buckminster can do branch/tag name to version conversion. I.e. it can extract the component version from a branch or tag name rather then from the meta-data of the component. You can create a provider that uses a <versionConverter> element. It uses two regexp substitutions, one to translate the branch to a version and one to do the opposite. Buckminster will then make an attempt to find the highest version. When this scheme is used, you don't use the branch/tag path and you don't use the trunk.

I've played a bit with this stuff, and made something like:

<searchPath name="default">
  <provider readerType="svn" componentTypes="eclipse.feature,osgi.bundle,buckminster">
    <uri format="svn://localhost/test/{0}/trunk/">
      <bc:propertyRef key="buckminster.component" />
    </uri>
    <versionConverter type="branch">
      <transform
        fromPattern="^(\d)+\.(\d)+\..*$"
        fromReplacement="R$1\.$2\.x"
        toPattern="^R(\d)+\.(\d)+\.x$"
        toReplacement="$1\.$2\.0" />
    </versionConverter>
  </provider>
</searchPath>

This, I think, correctly maps component version "X.Y.Z" to branch name "RX.Y.x" (f.e. "3.2.7" to "R3.2.x") and vice versa (the third number in version string is assumed to be 0).

And now it completely ignores my "trunk", so I have to do head development in a branch named according to my current version (something like "R2.7.x") :) Is there some way to teach Buckminster to look into my "trunk" also?

Back to the top