Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [buckminster-dev] New version of Buckminster Book available (rev0.5)

Hi Oisin,

Oisin Hurley wrote:
Hi Thomas,

I would not recommend the use of direct branches in the
RMAP when accessing SVN

It seems practical enough, as well as being 'the most
obvious solution'  (to my mind at least). Are you
recommending a different approach because the
way RMAP works might change, or something like
that? Maybe because there is an external dependency
on the property value?

SVN has the branch as part of the actual URI but not all SCM's has that. So when Buckminster was designed, we added a generic concept of branches (and tags) that can be used for all SCM's. I don't see the RMAP changing but if we improve the branch/tag management in some way, we will improve on this said concept since it affects all SCM's.

Here are some reasons why I think using direct branches in the RMAP is less optimal:
1. Using other SCM's, the approach will not work at all (CVS is one prominent example).
2. Conceptually, I think the selection trunk, branches, and tags, should be controlled by the CQUERY, not the RMAP.
3. You cannot make Buckminster look into one SVN branch and if not found, fall back to another. This is because Buckminster, not knowing that it deals with branches, will select the most suitable component from all places that it looks in. 4. Unless your SVN branch name is expanded from a property, you'll need to alter the RMAP whenever you add a new branch or tag.


I think it's better to control the nightly/integration/release
aspect of SCM's using the CQUERY branch/tag path.

Do you have an example that illustrates this approach
that you prefer, for informational purposes?

Take a look at http://www.eclipse.org/buckminster/samples/queries/buckminster-3.4.cquery. It has an advisor node element that looks like this:

<cq:advisorNode namePattern="buckminster" sourceLevel="REQUIRE" useMaterialization="false" useTargetPlatform="false" branchTagPath="Platform-3.4.x,main"/>

A corresponding node can be found in http://www.eclipse.org/buckminster/samples/queries/buckminster-dev.cquery.

<cq:advisorNode namePattern="buckminster" sourceLevel="REQUIRE" useMaterialization="false" useTargetPlatform="false"/>

but there you don't see any branchTagPath. Both queries use the same RMAP.

The branchTagPath="Platform-3.4.x,main" instructs the resolver to first look in our "Platform-3.4.x" branch and if the component is not found there, look in "main" (the trunk). Using this approach, if the component is found on the "Platform-3.4.x" branch, the resolver will not look in the trunk since the branchTagPath has higher precedence then versions.

The reason it's set up this way is that we do selective and lazy branching, i.e. we only branch a component when there's a real need for it (most likely because the API changed between versions). When the source of a component is the same for 3.4.x as it is in whatever we're developing on trunk, then we don't branch. The result of that approach is that we save a lot of unnecessary merging from trunk to the branch when fixing bugs. Merging is only needed for the branched components.

When we see that we need to branch a component, we just branch it right there an then. The next time someone runs the buckmisnter-3.4.cquery, the branched component will be picked automatically instead of the trunk version.

One might argue that Buckminster would be able to do this by using explicit paths in the RMAP but in fact, it cannot do that. The reason is that when you do that, Buckminster does not know that it is dealing branches and hence, it lets the version have higher priority. In our case here, that would be really bad since the versions on trunk are always higher then the versions on the "Platform-3.4.x" branch.

Regards,
Thomas Hallgren



Back to the top