How to open the actual file from changeset details in Visual Studio 2012, and not some hashed read-only server copy?

StackOverflow https://stackoverflow.com/questions/12163890

Pregunta

This is the first time I've tried this in a VS, much less VS 2012, so if the answer is common knowledge, I guess I'm just not that common. (Yeap, Google failed me as well --- or my Google-fu just needs some oiling.)

I'm looking through my TFS code repo history, and from the list of changesets, I opt to view changeset details. Up on the VS 2012 right sidebar, I get a list of all changed files for this particular changeset.

However, I want to open up one of these files and modify them directly (basically for purposes of light code review and housekeeping), so I right-click on one, and select Open.

Unfortunately, this doesn't open up my local copy of the file, but instead (seemingly) downloads the file from the server and gives me the server copy, with a modified filename (suffixed with a short hash). I can't modify this at all.

Is there a way to open my local file copy from the changeset details?

¿Fue útil?

Solución

If you right click and compare it to your workspace version, that will open a diff between the workspace version and the changeset version. I don't believe there is a way to open the local version of the changeset file directly, as that version doesn't really exist in your local workspace. What you are opening when you open it from the changeset is the specific version associated with that changeset. The file may not even exist in the current solution, so opening the workspace version in same cases wouldn't even be feasible (or you may have never gotten the file).

Otros consejos

What you could do is right click the file. Then choose open in source control explorer. Double click the file there.

Bob should be your uncle now.

To the best of my knowledge there is no good way to do this (I wish there was). It's a bit time consuming, but you can get the same effect with a bit of manual effort:

Open the changeset, rollback changes, go to pending changes, and open all of the files. After the last file has opened, go back to pending changes and undo changes (i.e. your rollback). All of the files from that changeset should now be current and open in visual studio.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top