I accidentally hit "Get Latest Version" on item in TFS with which I'm not currently working on. This made name of the item visible in black in Source Control Explorer, which is misleading to me since I'm used to identify objects which I'm working on visually. How can I reverse this operation?
To make the item in Source Control Explorer gray out again. You could try below workaround, get specific changeset 1.
Open team explorer
Click Source Control
Right click on you file/folder
Select Advanced Click on Get specific Version
Choose Changeset Type and enter 1
The item in Source Control Explorer will gray out again. This is due to:
Changeset 1 is a special changeset on your Team Foundation Server
instance. It was created as part of the setup routine and only
contains one thing - the root node ($/) in your source control tree.
If you do a get for Changeset 1 on any actual files then they will not
exist at that point in time on the system so will be deleted locally
and the server will know this.
Note: This will change the status of your files to "Not downloaded" and will remove the local copy of the file. It will only remove files that were put there by TFS.
Assuming you are using TFVC, you can also try cloaking the folders that you don't need. This will "remove" the any unchanged files locally and exclude the folders when you get latest in future.
In the Source Control Explorer, right click on the folders that you want to exclude and go to "advanced" then select "cloak".
To start using the files locally, you can go to the same place and select "uncloak".
Related
I am working on a solution (a very big solution), and I want to check if I have left anything checked out. How do I see all the items I have checked-out?
And could you also tell me how to see all checked-out items by another user please.
simply pull up the pending changes window (View > Other Windows > Pending Changes) to see what files you have checked out!
http://msdn.microsoft.com/en-us/library/ms181395(v=vs.100).aspx
As for the other users, you would need to view the source control window to see who has checked out that file.
Simply go to View > Team Explorer then browse to the collection/project you are working on and double click on "Source Control" to open the source control explorer.
This then will show you the directory listing system where you can see who has checked out which file and what kind of check out.
also take a look at this: Can I check what files another person has checked out in Visual Studio 2010
I'm trying to compare 2 local folders. In source control explorer I right click folder, click "Compare" menu and select the target folder.
The Folder Difference folder is displayed.
I right click the file where the difference is found but the "Reconcile" menu is disabled.
I have both "Read" and "Check Out" permissions on both source and target folders.
Reconcile will not work with two local paths. It is instead used to update the changes made locally with changes on the server. It will allows you to pend server changes based on the contents of your locally mapped paths. This is the reconcile dialog:
You can thus synchronize your local tree (or a part of it) with the server from within the Compare window, which allows you fine-grained control of which files to download or which files to pend changes on. This is useful if you wanted to only get latest on certain files that had been updated on the server.
I'm interested in seeing the latest changes that landed to a solution with TFS (I'm using Visual Studio). However, I can't seem to find the option: using View History on a solution or project brings up the history of the file itself. Am I missing something?
If you right click on folder the containing a solution in the Source Control Explorer window you'll see all changesets. It's obvious but I had to ask for it too. I am using TFS2010/VS2010.
Edit
Here are the steps:
Team/Connect to Team Foundation Server / select Team Project/ in Team Explorer dblclick on Source Control and in Source Control Explore right click folder containing your solution select View History and here you are.
The View History command will list you all the changesets where the file/directory was changed (add/move/content changed, deleted, etc.).
So if you do a View History on a .sln or .csproj file you'll see only the changes that were made inside the file's content, not on the "Visual Studio Item" and its related item.
To sum up, the View History command is only a File System history, there's not a smarter logic out there.
EDIT
The only way to know what changed inside a solution or project is to do a View History on the common denominator (i.e. the directory that contains everything you want to view history). But it'll still be a File System kind of History.
There's not Logical History for Solution and Projects in Visual Studio. For instance you can't know what files where added to a given project your viewing the history from two given versions. Or what projects were added/removed in the solution.
All the pieces are there (because all the changes are stored in the .csproj or .sln), but the feature itself that parses the content and retrieve the logic you want to see doesn't exist. (by the way, it's a great feature and I agree it should be there).
Bottom line: TFS/Visual Studio gives you two history system:
Based on the source control/file system, by displaying changesets.
Based on the source control/file system, by displaying labels.
That's all...
Right click on folder in solution explorer, and choose View History. Then you can see all the Changesets listed that apply to that directory. Then right click a particular changeset and choose Changeset details... to see what changes occurred in that changeset.
I moved some code from my c drive to my d drive. When I opened the solution, it told me that:
The solution appears to be under source control, but its binding
information cannot be found. Because it is not possible to recover
this missing information automatically, the projects whose bindings
are missing will be treated as not under source control.
So I tried permanently removing the bindings and downloaded the latest version. Now my changes don't register as pending changes.
I've tried selecting the solution in the Solution Explorer and File => Source Control => Change Source control, but it does not let me bind. Server Name and Server Binding columns have "".
Generally speaking, the location of code on your machine is dependent upon where your workspace is located.
If you move your workspace to the D: drive, then there shouldn't be an issue.
However, if you simply used Explorer to copy the files to the new location, then VS isn't going to be able to maintain the bindings.
From the Workspace Editor you can map the entire tree, solutions or even individual projects to a new location.
First off, put it back and undo the changes.
Then, Go to File | Source Control | Workspaces.
Click on the work space name and then the "Edit..." button.
In the working folders area select the source control folder you want to move and give it a new local folder location.
You will need to edit your Workspaces for TFS Server to know the change that has happened at your local machine. To edit your workspace, in Visual Studio:
ensure you have no pending changes; also copy your source code folder to some location temporarily, just to be safe (you can remove after you are all set)
go to Source Control Explorer
locate the "Workspace:" dropdown
select the item "Workspaces" from the dropdown list (you will get a dialog titled "Manage Workspaces"
if you have multiple Workspaces, select the appropriate one from the list in the dialog
click on "Edit" button (you will get an "Edit Workspace..." dialog)
down below in the dialog, you will see "Working folders" grid
click on appropriate row from the grid and modify the "Local folder" path to set to your new folder location
Sometimes TFS and Visual Studio have issues in getting these workspace changes synchronized. I would always close Visual Studio and re-launch it to get my changes synchronized anytime after I make Workspace related changes.
Hope this helps.
the most crude way here (I don't know if there is any other way)
is to put the folder back to its old location , Check in your changes
then remap the project to the new folder
When you move files/folders to make the moves pending changes you need to use a TFS client to do the moves.
For one or two files the Team Explorer UI is OK, for more the command line is easiest.
See tf.exe rename on MSDN (tf move is an alias for rename). There is also step by step help on using the GUI: Move, Rename, and Delete Version-Controlled Files and Folders.
When I get latest from TFS source control, I don't see the changes made to my workspace.
I know I can go to the Output window and see the changes, but this is just a text list with no context actions.
What I really want is to see a list of changes, with the ability to right-click a file and see differences straight away.
Is there a better, alternative way to see changes like this after getting latest?
Sounds like using the command line tool tf.exe with folderdiff command would achieve what you need.
Use the folderdiff command to display
and compare a visual representation of
the differences between files in two
server folders, in a server folder and
a local folder, or in two local
folders.
From the header toolbar click the "Find Chengsets" option (it is between History and Branch options), it will open a dialog box, on that fill your required attributes and click Find button on that dialog box.