I am in the following situation:
A Team Member worked on a task which was partially done in few changesets, few months back. These changesets were reverted and many more changes are done on same files in subsequent changesets.
I want to get the latest version of code (which I have taken) and have some option to get the older changesets (even I can merge changesets one by one) and merge it.
Though I find option to changeset GetThisVersion which gives me whole old codebase. I don't find relevant option in Visual Studio 2010. It would be great to have GUI option and not command line one.
Please help. Thanks in advance.
You can get specific version of a file from file history (view or get specific version) or with command line Need command to get a file from TFS without a workspace. But to get a folder (project, solution) state seems to be necessary to have a workspace How to get specific version of folder from tfs without creating a workspace?. I don't think that there is a possibility to merge an old and newer version. When I want to resuscitate some old code I use view in history and copy/paste.
Related
I have a Visual Studio solution and am using TFS for version control.
When I've made a bunch of changes to my working copy of the solution, the Team Explorer window will show me all the files that I've changed, and allow me to compare my version with either the workspace (original) version, or the latest version in TFS.
However, before I check in my changes, I first want to integrate any changes that have been made (by other people) to the latest TFS version since I got the source from TFS.
I could do a Get Latest Version and hope for the best. However, I would generally prefer to know what will be changed, and have the opportunity to look in detail at those changes, before overwriting my local files.
Is there a way to either compare my workspace (original) version against the latest version in TFS, or to see what the effects of a "Get" will be before I actually execute it?
To be useful, this would have to be a at a solution level - I would not want to have to go through each individual file.
Use Compare... and select Latest Version. That's best executed from the commandline or the Source Control Explorer.
If you compare "Latest Version" (remote) with "Workspace version" (local), then it'll tell you what has changes on the server since the last get-latest.
If you compare "Latest version (remote) with "Latest version" (local), then it'll tell you what has changed both locally and remotely.
The command line is your friend you can use the /preview switch to see what will happen if you do the get
tf get $/MyTeamProject/MySourcePath /recursive /preview
I've got a file managed by Visual Sourcesafe 2005 which I have edited. I'd like to check in the file exactly as-is on my box, but VSS always merges it with the file in the repository, breaking my code.
I don't know what I expected to happen...
Is there any way to check the file in without merge shy of deleting the existing file from the repo and adding my copy back in?
I've looked for command line options to no avail.
You could just do "Undo check out" for all files, keeping their local versions on your machine; then again check out this files without getting latest versions from Visual SourceSafe; then check in all of them. In this case history is preserved. You just overwrite latest versions of files without any merge. Seems for me it's what you wanted.
I had the same problem and sorted it out in that way.
I'm putting this answer here, but still really hoping that a better one comes up.
I figured that I can go into the VSS GUI and rename the file to ".old", then add my local file into the repo. It's extremely hacky, but allows me to keep the file history.
Such issue might happen when the file was checked out by multple people and there was a newer version checked in by others after your checkout. (See Four scenarios that merge may be performed #2 of the article for more details.)
I don't see a option in SourceSafe CheckIn command to control that either. If you don't want merge happen, you may exclusively check out the file before editing.
We are currently use TFS 2010 source control. I have a change-set that I want to rollback but I want to checkout all the included files and shelf them before checking in the old code. Does anyone know if this is possible? There are many many files and I do not want to go through and check them out by hand.
Since the rollback will not actually remove the old files, but will create a new version with the changes removed, you can always see the old version of the files by getting that original changeset number.
No need for shelvesets. Just use get specific version and retrieve the old versions of the file.
My solution structure looks something like this:
MySolution
FirstProject
SecondProject
SolutionFolder1
SolutionFolder2
SolutionItem1.txt
SolutionItem2.txt
Then there are two workspaces with
this solution at the same version
used by two users on different
computers.
A solution item is removed in the first workspace and the change is checked in into TFS.
In the second workspace the latest version is get from the TFS (the workspace is without local modifications and no files are checked out). Visual Studio displays this message:
Your action caused a check out of the
file(s) C:\MySolution \MySolution.sln,
and a new version from source control
has been loaded in the development
environment.
Now, there are two items in pending changes in the second workspace: solution file is checked out and the solution item is deleted. After undoing these changes and getting latest version, they appear again. These conflicts are resolved only during checkin which is a little bit confusing.
Is there a way how to get rid of this TFS oddity? Thanks.
I cannot find any answer but there is a workaround. Solution probably is not the best place to store complex folder hierarchies with a lot of files. When these folders and files are moved to own VS project then everything works well.
In showing a colleague how to use SVN yesterday, we created a test folder and file within our existing Visual Studio Solution. We'll call it "Test" folder with two files, "Test.ascx" and "Test.ascx.cs". We added it (or Visual SVN added it, 'cos it's awesome), and committed it. We also added and committed other files elsewhere in the project.
We can see it in the repository (and the other files).
Doing an update on my own machine to pull down these new files resulted in the other files being pulled down correctly, BUT the Test folder does not appear. No matter how many times I try Updating from various points in VS and in TortoiseSVN (urgh) Repo browser, it can't see that there are any changes to pull down.
Where am I going wrong?
This is a known problem.
You can use
$ svn update --depth=infinity
to force the update. With TortoiseSVN, use the "Update to revision" command in the Submenu, then change the depth combobox to "fully recursive".
I've had ghost errors like this before and found the easiest work around is to delete the parent folder and update it's parent:
Project Root
Project
NewFolder
Delete Project, then Update Project Root
We can see it in the repository (and the other files).
...
No matter how many times I try Updating from various points in VS and in TortoiseSVN (urgh) Repo browser, it can't see that there are any changes to pull down.
So you can or cannot see it in the repository browser?
Did you commit and update the parent folder of your Test folder?
I don't know, svn is always telling me to clean, did you try that?
It's not an answer, I know, but I have tried all the solutions you guys have kindly suggested and I just end up with conflicts, crashed TortoiseSVN and built up Karma. Therefore, a trusty edit in the .svn/entries file sorted it.
I have until now been a single developer using SVN just to manage my source code. Other people don't have problems, and I just check in stuff. I use Visual SVN as a layer to frig SVN for .NET (which it isn't great with) and I seem to constantly run into issues. I am performing very simple operations, not even branching/tagging. Simple simple simple. And yet I have issues with it?