In the source control explorer it says per file if we have the latest or not, and if you right click and view properties it says the latest version and the workspace version. Is there any way to see the overall latest version and the current workspace version (and possibly to add columns for the two on a per file basis rather than having to check each file's properties one by one)?
We are using both VS2012 and VS2013.
Not from the GUI but you can use the tf properties command to get that with /recursive option
http://msdn.microsoft.com/en-us/library/tzy14b58.aspx
Related
I know I can look at the "Source Control - Team Foundation" output in the Output window but it's hard to tell where the results from the current request begin and the last request ended sometimes, and any files that I want to compare that are in the list I have to go look up.
In the past when I used subversion, I had a tool (I think tortoise) that did an awesome job showing me all the files that were changed and I could click directly on them to compare with latest version. I would often use this to do quick code reviews, and it made it much easier to make sure I wasn't about to get an updated project file that had been improperly merged.
Are there any extensions/plugins or anything that can help with this for TFS when getting latest?
Unfortunately there isn't such a tool can exactly achieve that, there is a user voice submitted here, and it's ARCHIVED.
Based on my experience, the best thing to do is a folder comparison before you get the latest version. In Source Control Explorer, you can compare the differences between two server folders, two local folders, or a server folder and a local folder. Right click on the target folder and select Compare. Read more here.
To see the changes block you can introduce the third compare tools. (e.g BeyondCompare, ExamDiff, Code Compare etc, you can reference my answer in another thread : Visual Studio TFVC Merge Lines Misaligned). In short you can get the change list from Output window, then compare each file accordingly.
Besides, you can also try using the Tf Command Line Utility and the Visual Studio extension Diff All Files for VS2013. Reference this thread for details : TFS Shortcut to do a diff on all modified files with latest version
I'm having problems with merge tool in Visual Studio 2015. I didn't need the merge tool for the longest time, I haven't used it for couple of months. Now when I need it I can't find it. I was trying to google and find an answer, checking VS settings but with no success. I can only see buttons 'Overwrite Local File or Folder' and 'Keep Local File Contents'. When I press Compare button, I see diff tool but I'm not able to accept changes (check buttons are missing).
What am I doing wrong? How can I merge two files?
Please navigate to files in source control
Right click on file/folder you want to branch>>Merge
Full list of other solutions.
This is because these files in your local folder are not been tracked by TFS Version Control. For example, you added a file "readme.txt" in you local folder and hadn't check-in them into version control. Another people in your team also added this file in the same relative path and checked it into version control. Now, when you get the latest version or check in your changes, you will get the behavior as your screenshot. A similar question can be found here: TFS Conflict Type: Writable File - A writable file by same name exists locally
It's doing exactly the same things in Visual Studio 2017.
If you had a problem in workspace and you rollback it from a save, you can have the same issue.
You need to rebind some of the project by yourself first like the asked question here : Re etablish TFS source control bindings, then if all is going well you will see the button.
If it's not working, try to use external merge tool which will allow you to edit thoses files.
Using TFS 2010
I am going back to the previous versions of several files across various projects(all of these were previously rolled back)
To do this, I View History on the project, and choose GetThisVersion.
This works fine.
I now want to see a list of all the files for which I have a previous version.
I expected these to show up in the View Pending Changes. But they don't. Why is that?
Do I have to explicitly check out the file first, and then go to a previous version?
Getting a file from the server (whichever version - latest or specific) doesn't check out the file. You have to check it out explicitely.
Depending on the options you have switched on ("Get latest version of item on checkout"), checking out a file may get the latest version at the same time. In this case, you may have to:
get a specific version first,
copy the files locally outside of TFS folders,
check out files and replace with the specific version.
I have a file that was checked in and is part of a C# project. However, this file is incorrect and it overwrote the previous change which was correct. I need the latest change of this file to revert back to the previous changeset, and I need the previous changeset to be the latest change.
How do I do that?
You can roll back to the previous changeset. This option is only available from the commandline.
tf rollback /toversion:VersionSpec ItemSpec [/recursive] [/lock:none|checkin|checkout] [/version:versionspec] [/keepmergehistory] [/login:username,[password]] [/noprompt]
Alternatively, use Get Specific Version (check all the boxes to override the files) to get the version of the file you want, check the file out and check it back in again. When prompted to resolve merge conflicts, select use local version. This will create a new version on top of the incorrectly checked-in one.
If you install the TFS Power Tool, you can roll back the changeset. With the Power Tool installed, you can do this in the GUI. Select the changeset in a history list, and right click and select Rollback entire changeset.
Here's a nice article:
http://www.edsquared.com/2010/02/02/Rollback+Or+Undo+A+Changeset+In+TFS+2010+Version+Control.aspx
From this article:
You find the TFS Power Tool here: http://visualstudiogallery.msdn.microsoft.com/c255a1e4-04ba-4f68-8f4e-cd473d6b971f
When I get the latest version from TFS, is there a way to list the files that were updated?
if you are using the Visual Studio IDE, you can see the list of files get in the "Output" window.
To see the "Output" window, select menu View-->Output.
Hope this helps!
To your question tf.exe get may help http://msdn.microsoft.com/en-us/library/fx7sdeyf.aspx.
So,
tf get c:\MyWorkspace /all /recursive /noprompt >C:\TFResults\results.txt
Yes.
Open Team Explorer
Select project
Double click Source Control
Optional to get latest: Right click the folder you need and choose Get Latest Version or Get Specific Version and then choose Latest and Overwrite.
Right click the folder you need and choose View History.
You need to take a look into the files on the Output Window. The changeset list, can give you an idea of which are the latest changes files and you can search for those changes.
But a dummy idea is to map your tfs workspace to another folder and download all the files, then user the WinMerge, BeyondCompare or another tool to compare the files in the specific folders you have to get the differences between the latest code, and your current one.
Hope this help