I just received instructions to add the TFS element number to the comment of any changeset I commit. I find this mesure redundant because I already have to assign the TFS element to my changeset.
I was told it was because it was hard to obtain the list of TFS element a developper worked on.
Isn't there a smarter way to obtain this information?
With using Work Item links between a Changeset and Work Items (the recommended approach - assuming your are using TFVC), you could write a bit of code against the TFS API, or a query against the TFS Data Warehouse to retrieve all changesets by Developer A, then traverse the WI links to find all WI's.
Related
I'd like to see what changesets were merged to create a changeset on a branch in the history. This doesn't seem to be straight forward. I've tried to use the Track Changeset functionality, but I can't seem to see anything useful. I would also like it if I could do this from the command line so that I could potentially script a way to pull out appropriate changesets separately.
Edit
Ok, seems that using Timeline Tracking, I can get the changesets from the Track Changes feature. Now is there a way to do this from the command line?
Using Tracking Changeset window is the right way to View where and when changesets have been merged.
For the overview and some meaning of the elements in tracking changeset window, you could refer above link. And switch to timeline view will make the result more directly,clearly.
Afraid you could not do this through command line. There is a Merges Command, but could not specific a single changeset.
However, you could use TFS API to achieve this, take a look at below two similar questions:
Find changeset id parent of a branch in tfs
Is there a way to find out the source changeset from which a particular branch was created in TFS?
The answer contains a link to a blog post which contains many details, including TFS API and a custom command-line tool.
Is it possible to filter changesets in TFS 2012 to exclude the ones from a single user?
The commit history of the solution I currently work on contains quite a lot of noise due to an automated process making a commit each time a build is queued.
I'd like to filter it out to make the commit history more readable.
An alternative, try to install Team Foundation Sidekicks, and check History Sidekick. You can export the records to a .csv file and then filter the user in it:
There is no single query can achieve what you need. You may have to use TFS API.
If you want to get the changesets in a solution via TFS API. The folder history will be the simplest approach. Details please refer this: TFS client C# API - get all changesets of an Item You can exclude those changesets from the special user using Changeset.Committer Property which gets the user who committed the changeset.
Is there a way, by any means, to get the workspace from where a specific check-in was made?
Using Team Foundation Sidekicks I can see the workspace, computer and local path of current checked-out items, but not of changesets. Does TFS keep track of this?
Update
It might help to explain what I really want. Someone performed a check-in using another team member's account (or at least that is what he alleges haha), and I was trying to get to the bottom of this mess by finding the workspace of the changeset because it contains enough information to make a call. Right now the only information I have besides the comment is the date and time, but perhaps there is something else I could use.
Thanks.
Not to my knowledge. I've spent some time looking at our TFS Collection Database, and I cannot find anything that links a changeset to a workspace.
The tables that I've been using have been:
ADObjects
tbl_Workspace
tbl_WorkspaceMapping
tbl_Changeset
tbl_LocalVersion
tbl_PendingChange
Because a workspace only deals with items that are stored on the local machine, I don't believe that information is sent up to the TFS server when a changeset is committed.
We're trailing the use of the built in bug tracking, and have written some integration into our helpdesk software that allows for escalation via workitems.
One thing I haven't found out how to do, is to merge all changes associated with a work item (say to go from dev branch to main) - I appreciate you can double click on a changeset in the merge dialog to view if it is associated with a workitem, and also that I can select individual changesets, and groups of adjacent changesets; but there doesn't appear to be any way to merge changes by workitem?
It is correct that you can't merge based on work items. It is probably not a good idea to do that anyway. It would be very difficult to make sure you get all the necessary changes needed for the main branch to build correctly. I would look into how you do your branching and a good starting point would be: Microsoft Team Foundation Server Branching Guidance
In TFS 2005 and 2008 the check in history will not be transferred between branches. You will get this in TFS 2010.
Merge changesets by workitem - https://tfsprod.codeplex.com/
Check out the ExtendedMerge feature.
Enjoy! :)
We have a rule in TFS that requires all checkins to be associated with a work item. We have an automated daily build process that uses tf.exe to check in the files. However, I did not find any way to associate files with a work item.
I heard of tfpt, and have it installed, however, I did not have any success using it to associate files with a changeset either.
Is there another way to do this?
Thanks!
I'm pretty sure tf.exe / tfpt.exe cannot do this except through their UI. If you need to use the -noprompt parameter for automation then you're likely out of luck.
Luckily, it's not hard to use the API directly. MSDN link. Basically just build up an array of WorkItemCheckinInfo[] and pass it along with your request.
Team Foundation Power Tools has a command for dealing with work items.
tfpt.exe help workitem