Team Foundation Get "Changeset by variable"

As part of my build, I would like to use the "Team Foundation Get" to get some specifc changesets from Team Foundation Server. Unfortunately the Get Sepcific Version dosn't allow me type in a variable like %changesetnumber%. It only allows me to type in an number in this field.

When building our code in FinalBuilder, finalbuilder first get the sourcecode by a specific label. Then it should use the above feature to get a list of changeset with patches for the labeled sourcecode, before running the actually build.

Hi morten,

Thanks for posting the request. We'll look into adding this, but in the meantime you can work around this by using some script in the "BeforeAction" script event (accessible under the Script Editor tab), ie

Action.PropertyStore.ChangeSet = changesetnumber

(where you have a FinalBuilder variable called changesetnumber)

Regards,

Angus

 How can I do this via PowerBuilder script?  I've been trying this, but it isn't working:

 

$Action.PropertyStore.ChangeSet = $FBVariables["Changeset"]

 

Thanks,

Nick

I suspect this may be a case sensitivity issue, Powershell is case sensitive so you need to use the correct casing when specifying the variable name.

The error I get isn't about my variable, but the ChangeSet on PropertyStore.  It was saying that PropertyInfo doesn't have a ChangeSet property.

Thanks,

Nick

Anyone have any ideas of how I can fix this?

Hi Nick

Sorry for the delay, missed your post from a few weeks back.

This is what you need :

$Action.PropertyStore.PropertyAsString(“ChangeSet”) = $FBVariables[“ChangeSet”]

Since we (still) lack intellisense for powershell, you can usually find out a lot by using get-member :

$Action.PropertyStore | get-member

TypeName: System.__ComObject#{cc0032b1-d2df-4f96-a05a-56d3a545baf0}

Name MemberType Definition
---- ---------- ----------
GetPropertyType Method PropertyType GetPropertyType (string)
IndexOf Method int IndexOf (string)
Properties ParameterizedProperty IProperty Properties (int) {get}
PropertiesByName ParameterizedProperty IProperty PropertiesByName (string) {get}
PropertyAsBoolean ParameterizedProperty bool PropertyAsBoolean (string) {get} {set}
PropertyAsDouble ParameterizedProperty double PropertyAsDouble (string) {get} {set}
PropertyAsInteger ParameterizedProperty int PropertyAsInteger (string) {get} {set}
PropertyAsString ParameterizedProperty string PropertyAsString (string) {get} {set}
PropertyAsStrings ParameterizedProperty IStringsObject PropertyAsStrings (string) {get}
PropertyAsVariant ParameterizedProperty Variant PropertyAsVariant (string) {get} {set}
Count Property int Count () {get}

HTH

Vincent,

It did help, but since I was looking for the ChangeSet, which was an integer, I wanted to use PropertyAsInteger instead of PropertyAsString. Thanks for the help.

Nick