CCNET - Filtering out Label Changes

If you are having a problem using Vault, post a message here.

Moderator: SourceGear

Post Reply
larsbuur

CCNET - Filtering out Label Changes

Post by larsbuur » Tue Feb 08, 2005 3:05 am

We have been using Vault 2 (and now 3.x) with CruiseControl.NET (ccnet), fxcop and nunit for about six month now.

I have one issue that continues to annoy me is the fact that I cant enable automatic labeling of my successful builds. When I try to do this the ccnet detects this as a change and starts a new build.

In the documentation for the Vault Source Control block it states that one should use a Filtered Source Control Block to get around this problem.

Has anyone actually got this working?

Kind regards

Lars Buur

maburke

Post by maburke » Thu Feb 10, 2005 9:47 am

I've gotten it to work for our project by modifying the ccnet code. I probably should submit a patch to the ccnet folks, but I haven't had a chance yet.

The change needs to be made to VaultHistoryParser.cs.

In VaultHistoryParser.Parse(), change this:

Code: Select all

if(EntryWithinRange(node, from, to))
{
    Modification modification = GetModification(node);
    mods.Add(modification);
}
to this:

Code: Select all

if(EntryWithinRange(node, from, to))
{
    Modification modification = GetModification(node);
    if( ShouldIncludeModificationType( modification ) )
    {
        mods.Add(modification);
    }
}
and add this method:

Code: Select all

private bool ShouldIncludeModificationType( Modification modification )
{
    return modification.Type != "Labeled";
}
HTH

Post Reply