We are using Visual Studio 2010 and before each release to our test server we apply a label to that version. I have been tasked with doing a security review of all code changes before each release. So instead of asking each team member to send me a list of files they have touched, I was wondering if there is a way to view a history of changes per label.
If you're using TFS 2010, you can see the changes between 2 labels like this:
tf.exe history /server:http://tfs:8080 "$/ProjectName/src" /version:LMain-CI_20100831.6~LMain-CI_20100927.1 /recursive /noprompt /brief
(taken from here)
Related
I understand that TFS Local Workspaces are designed to help users work more seamlessly when not connected to the TFS server; however, unlike when using Server Workspaces, I cannot see the status of a file from Visual Studio Source Control Explorer. Our team is connected to the TFS Server 90% of the time. It seems that Local Workspaces should be able to communicate file checked-out status back to the TFS Server when connected. As a team manager I would like to know what files team members currently have checked out in several scenarios, while still retaining the flexibility offered by Local Workspaces.
I want to know how often team members are checking in their code (or not).
I want to know if someone is already working on a file before checking it out as well.
I want to handle a lost/broken laptop scenario by knowing which files had un-checked-in changes.
Is there a way to do this with Visual Studio Source Control Explorer or another tool?
Generally the items checked out will display automatically when you navigate to the specific items in Source Control Explorer. Reference below screenshot.
I want to know how often team members are checking in their code (or
not).
You just need to check the changesets history.
I want to know if someone is already working on a file before checking it out as well.
Just navigate to the specific items in Source Control Explorer as I mentioned above, it will shown the status in Pending Change column.
I want to handle a lost/broken laptop scenario by knowing which files had un-checked-in changes.
Generally the files with status displayed under Pending Change column are the files which have un-checked-in changes.
However there is a tool called Team Foundation Sidekicks which is a suite of tools ( includes Code Review Sidekick, Shelveset Sidekick, Labels Sidekick, History Sidekick, Workspace Sidekick and Status) for TFS administrators and advanced users providing rich GUI for administrative and advanced version control tasks, you can use it to check and track the things you required. (Unfortunately it's no available for VS 2017, the latest version 6.0 only works for VS 2015)
I'm was looking for the proper way to exclude folders/files from team foundation server (2012) using visual studio 2012. I found:
how-to-exclude-certain-folders-from-visual-studio-2012-detected-changes-list on stackoverflow. However the shown detect changes link is missing in my team explorer. There should be a detect changes link in the red circle as compared to the screenshot in the linked question
I could not comment on the original question to ask this, so I made a new one. Does anyone know where the detected changes link went. (and yes the project had pending changes when I tested)
That's not a verb ("detect changes"), it's a noun: "detected changes". Which are changes that were found on the filesystem by watching your activity, but will not be included in the checkin.
This occurs when you use a local workspace. You will not see it if you are using a server workspace, since you must pend changes manually.
If you have changes that were made on the filesystem that were not pended, and you would like to detect them, run tfpt online from the TFS Power Tools. Or convert to a local workspace, and find them in the detected changes tab.
Another user has made several changes in different places throughout a specific project.
How do I see which files have been checked-in by a specific user?
From the command line issue:
tf history $/ProjectName /user:domain\user /recursive /noprompt
That will list all the changesets of that user
Then issue:
tf changeset 12345 /noprompt
To list all the changes in that changeset.
Currently I can't think of one command which will give you both. But you might be able to use Powershell or a custom console app that leverages the TFS Client Object Model to piece something together that does.
tf.exe can be found in the following folder: C:\Program Files (x86)\Microsoft Visual Studio {VISUAL STUDIO VERSION}\Common7\IDE. The easiest way to use it, is to open the command prompt using the "Visual Studio / Developer Command Prompt" item in the start menu that is created when you install Visual Studio.
As Tim Mentions, you can use the TFS Side Kicks to query this information as well. For Visual Studio 2010, this is still a stand alone application, for Visual Studio 2013 it nicely integrates into the Source Control Explorer context menu:
tfs sidekicks using the history sidekick will give you a GUI version of what the user's touched.
Is there a way to have Visual Studio 2010 automatically commit a file and push it to a git repository when the file is saved?
I would like to be able to have a pop up box appear to allow me to write the commit message on save. I feel that this would force some good habits on me, because sadly I can miss a day or ten of commits on occasion and as I am the sole developer this isn't a job requirement here.
From a configuration manager point of view I completely disagree with your "always commit" policy.
Insted, I don't know if have you tried Visual Local History 2005. I've used it in the 2005 and 2008 versions, but I've never tried with the 2010 version. It simply create a subdirectory and save there a local copy every save you make. So you could watch the history per-file.
THEN you could commit at the right point (when it really makes sense).
Let me know if it works as you would.
I've grown accustomed to reviewing file version history in TortoiseHg where I can right click on a file and show history. It gives me every change to that file across branches and repos in one linear history and gives me a summary comparison. Like this
I now need to use Visual Studio and TFS to review changesets and I don't find it as intuitive. This there a plugin or extension that allows me to view TFS changesets in a similar way to the Tortoise line of version control clients?
I've looked at TFS Power Tools, but that still just provides the default VS review options from Windows explorer.
The history feature in Team Explorer allows you to follow merges and it also provides the track changeset where you can see the origin of a specific change and trace it through multiple branches. However, I haven't seen any plugins that provide the visual representation you're looking for.