Ricardo
Ricardo

Reputation: 99

Accessing PendingChanges on a custom CodeActivity on TFS

I have a scenario where I have a gated check-in that targets a custom build process template.

I want to have a set of validations that are performed on the files that is being submitted, like if they are in the correct folder in TFS. I am thinking in creating a custom code activity to do this validation, but I am struggling to find out how can I access to the "pending check-in files" and their location on a code activity.

I haven't found out yet if this is possible or not. Anyone have some knowledge of this that can help?

Thank you

PS: Im using TFS2012

Upvotes: 0

Views: 111

Answers (2)

DaveShaw
DaveShaw

Reputation: 52798

There is a variable in the Process called Workspace.

Pass this into you activity and then you can call GetPendingChanges(), or one of the overloads to inspect the pending changes.

You can use a Convert Workspace Item to get the local path from Sources Directory and pass that in too, if you need to.

Upvotes: 0

I do not believe that it is possible. At the time you are building there are no pending changes. If the build is successful there is a single activity that does the pend and checkin at that time.

I think you would have to find the shelveset, which should be in the IBuildDetails and then check the shelve...

Upvotes: 0

Related Questions