merge - How is the Change.MergeSources Field Populated in TFS? -
we'd generate build notes following format:
1) associated changesets: 2) - changeset 45241, joe: "patching fix foobar" 3) 'foo.cs' integrated dev v. 22 qa v. 7 4) 'bar.cs' integrated dev v. 9 qa v. 3 so far, have custom build step accomplishes 1) , 2). looks @ information produced 'associatedchangesetsandworkitems' tfs build activity. here code:
protected override bool execute(codeactivitycontext context) { streamwriter sw = new streamwriter(path.combine(buildnotespath.get(context),"build-notes.txt")); sw.writeline("associated changsets:"); foreach (changeset changeset in buildassociatedchangesets.get(context)) { sw.writeline(string.format("changeset {0}, {1}: {2}", changeset.changesetid, changeset.committer, changeset.comment)); foreach (change change in changeset.changes) { foreach (mergesource source in change.mergesources) sw.writeline(string.format("\'t{0}': integrated dev v. {1} qa v. {2}", source.serveritem, source.versionfrom, source.versionto)); } } sw.flush(); sw.dispose(); return true; } the problem we're having 'mergesources' field empty list. have field populated?
take @ mergeworkitemseventhandler.mergeworkitems , .getmergehistory along extensions.pendingmerges method in tfs 2010 merge work items event handler example of getting merge sources.
jakob enh deserves credit answer. :)
Comments
Post a Comment