TFS - Find details of known changeset ID - visual-studio-2010

I know the ID of a changeset that im interested in seeing the details of. Is there anywhere i can enter the ID of a changeset in order to see what changes were included in the commit without having to know what branch the change was made in?
Im using VS2010 / TFS2010.

Set the focus on SourceControlExplorer in VS and press CTRL+G

In the Source Control Explorer in VS2010, click the "Find Changeset" icon on the toolbar.

From the command line you can use 'tf.exe changeset ID'.
Be aware that your current directory needs to be a mapped workspace on the server you're trying to look up the changeset on. Otherwise you need to specify /s:servername (e.g. /s:http://tfsserver:8080/tfs

Extension to Rassi's answer to get everything on command prompt
From the command line you can use tf.exe changeset <<changeset ID>> /noprompt
Microsoft link

Related

When viewing the history of a file, how can you get a double-click to compare with the previous version?

Using TFVC in Visual Studio, when I right-click a folder and click on View History, it opens the History view with the source location set to that folder. When I double-click a specific changeset, it opens that changeset's details in Team Explorer. Excellent. And then when I double-click a file in the Changeset Details, it automatically compares that changeset's version of the file with the previous version so I can see what actual changes were made to a file in that specific changeset. Perfect.
However, when the source location in the History view is set to a file, double-clicking a changeset just opens that version of the file rather than opening the Changeset Details. This is fairly useless, seeing as I use History to compare and not to just view. Is there a way to change the double-click behavior in this case? Opening the Changeset Details would be good. Automatically jumping to "Compare with Previous Version" would be better.
When you view the history for a single file , you could right click the changesest select Changeset Details or directly click the shotcut.
Then you could also see the changeset details in Team Explorer, select the specific file in changeset details, double click it, will get the same result as view a folder level history you described above.
I don't think there is any way to change the behaviour. I would think, the thinking would have been that you are already in the context of file and are clicking on the file from a history view. So it's showing you that particular version

Edit changeset comments - save disabled

I need to find my recent changesets so I can add something to each one.
I tried doing a View History in source control explorer, but I don't see a way to filter that by user. (If I use this approach, I can open a changeset and successfully change the comment. However, this is a pain because it's not filtered by user.)
I also tried right-clicking on a team project and doing Find -> Find changesets. That brings up a dialog where I can find changesets just for me. However, the save button is disabled? Why?
How can I get the save button enabled? Or, if that can't happen, how can I find just my changesets and add some data to each comment?
I see this in Visual Studio 2012, not sure about 2013. The Save button is disabled, but I know a workaround - if I type in the Comment area by adding a space and then removing it (from anywhere), then select a file below to take focus off the Comment box, then go back to type in the Comment area again, it is enabled. Visual Studio bug.
This is Visual Studio bug. Workaround is even simpler than suggested above. Type at the end of comment [Space], [Backspace], [Space] and Save button is enabled.
To use the changeset command you must have the Read permission set to Allow for any files or folders in the changeset for which you wish to display full information. The only users who can modify the notes and comments that are associated with a changeset are the users who created the changeset or a user who has the Revise other user's changes global permission.
Check in - Users who have this permission can check in items and revise any committed changeset comments. Pending changes are committed at check-in.
As per 1 & 2 you should be able to edit your changeset comments without any special permissions, I verified this in our TFS server. I am able to edit and save the comments (since am an admin I can revise others changes too). I also locked (took out check-in permissions for my ID) for an entire branch and then tried to edit my changeset comments and it worked too. I use VS 2010 and TFS 2010.
Update: Check if you have the "Edit project-level information" set to allow. I noticed that when I remove this access my "save" button also gets disabled when I go through the Find -> Find changeset route. You can get there by VS -> Team -> Team project Settings -> Security
Source Link: LINK1
Source Link: LINK2

view Changeset details by tfs sdk?

i will click changeset Details
and can i use sdk to popup this window???
You can do it via command line as follows: tf changeset 13684I am not aware of a direct way to get the same kind of thing via SDK, but, if you have to do with code, you can always wrap the console-call.

TFS 2010: Seeing and comparing changes after getting latest

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.

How do we keep track of our working copy's branch?

Are there any good techniques to help us know which branch (or trunk) our working copy is from? We recently converted to Subversion and we're using release branches. I had two developers commit changes to the release branch that should have been committed to the trunk. We're using CI (TeamCity), so I recognized the problem right away and was able to revert the changes but I'd like to prevent it from happening again. From within Visual Studio, especially, it's easy to make a mistake and commit to the wrong branch.
We're using TortoiseSVN and AnkhSVN.
Edited to add:
Just to clarify, I'm looking for a method to prevent careless mistakes, I already know how to find this information. There are two careless mistakes I'm trying to prevent:
Doing work on the wrong branch. If this is caught before commit, the developer has to merge the changes back into the correct branch.
Committing to the wrong branch. This combines the pain of point 1 with having to revert the changes in Subversion.
Edited to add: We just made the switch to the VisualSVN VS plugin and it has a toolbar that displays the path of the current working copy. I really like the reassurance that I'm working on the right branch.
Perhaps you should consider using a pre-commit hook: http://svnbook.red-bean.com/nightly/en/svn.reposadmin.create.html
Then you could do something like only approve checkins that have 'for release' in the comments for that particular branch or something like that and return an error message otherwise.
In AnkhSVN (in Visual Studio) the project url of your working copy is from is displayed in the 'Working on' field of the Pending Changes Window (View->Pending Changes).
The url of a file/folder is also displayed in the Visual Studio project window when you select a file in the Pending Changes Window or Working Copy Explorer (and in many cases even when you select a file in the Solution explorer; but this depends on the project type).
[Update: I just added AnkhSVN issue #581 for extension of the commit dialog.]
Tortoise SVN adds columns to the Windows Explorer view. In "Details" mode, right-click on column headers to get a list of available columns, at the bottom, select "More" to get a dialog of all available column types.
SVN short URL should quickly show you what the location is in the repository.
But this doesn't appear to work under vista ...
Right click the folder, move to the subversion tab, there it says the project it's linked to.
Also, in the commit dialog, it says so at the top of the dialog.
From the working directory:
svn info
URL will contain the branch your working directory points to.
<EDIT> Seeing how many people dislike the command line, the closes thing I found from TortoiseSVN is the "repo browser" which seems to use the selected branch as your starting path in the repo. </EDIT>
Avoid re-using working copies. If you're working on 2 places in the repository, have 2 working copies, named appropriately, like: Project-trunk, Project-release.
Here is a simple idea which might help:
Create an empty text file named "branch_XX" (or any name) and add it to your branch.
commit this and then when you switch to the trunk, the file will not appear in the solution explorer.
It sounds stupid... but it does the trick.
I really hope they will add something that might mark what branch we are using without going to other windows.
In AnkhSVN (in Visual Studio), right click on your project/solution, then Source Control -> Subversion -> Select in Repository Explorer. It will automatically select the branch you're currently working on (i.e. the branch you're switched to).
I don't think that the accepted answer for AnkhSVN works for Projects, since I always see the same URL in the "Pending Changes" even after I use the option "Switch Project" on a project.

Resources