Compare between TFS and SourceSafe - tfs

We recently moved all of our source to TFS from SourceSafe but forgot to get the latest versions from SourceSafe before doing so! Huge mistake.
Is there a way that I can compare files in SourceSafe with those in TFS to view the differences or any solution?

No, you can't compare between the two systems.
But you can create a TFS workspace and do a Get Latest into it, then do the equivalent in SourceSafe, then compare the two disk versions of all the files you like. If your diff tool allows it, you can even do folder comparisons.

A quick and dirty solution would be to get a checkout of the initial checkin of TFS and a latest version from SourceSafe.
Then check out all files for edit in TFS and paste over the latest version from SourceSafe.
This will give a list of pending changes that should give the difference between the two.
Be very careful with this, as it can break a lot of things.

Related

Hard Drive Wiped Clean - TFS Thinks I Have the Latest

Is there a way to tell TFS that I really don't have the latest of any files on my hard drive? My hard drive was wiped clean and I have to do a get specific every time I get the latest files because TFS thinks I already have the latest of many solutions. The problem is that we have 100 solutions and I can never remember which ones I've already done a get specific. I want TFS to act like I have no files on my system so a normal get latest works from now on.
If you do "tf workspace /delete *" all of your workspaces will be deleted and TFS will have no knowledge of which files you have.
You can also delete your workspaces in Visual Studio.

Where can I get large sample TFS repositories?

I'm building a tool to integrate with TFS and it needs to properly parse TFS logs (from the tf.exe history command) and checkout different revisions (again using tf.exe). It works great on the test TFS server I have, but I want to test it on a broad range of large repositories to make sure my parsing works properly.
I'd hoped to use Codeplex to get access to TFS repositories, but it seems you only get TFS access to Codeplex projects if you're a project member.
Are there any collections of open source code hosted on public TFS servers? Are there any other publicly available servers I could use for testing?
I would suggest using svn2tfs and choose any relatively active project on SourceForge. There are plenty of projects on SF to choose from that use SVN and not CVS. You might even get a bonus out of it and help the svn2tfs project work out any kinks.
Since you mention tf history command, I assume you want to collect/parse logs on the project's (and its files) history of checkins.
So in addition to large repository, you also need a good amount of history, am I right? If yes, then here's your set of problems:
Most projects on codeplex use Mercurial, not TFS. So even if you get access, you cannot use TFS with them.
As you mentioned, they require you to a be a member for you to access the source.
Even if you get access or find a public server (unlikely), you still would need good amount of history.
If I'm correct in my assumptions so far, here's the easiest (bit tedious though) way out:
Go to any large projects's such as Nuget or Wix
revisions
Download any old revision (go back as far as you want the history for). You can download zipped src files without being a member.
In your test server, checkin the code (src) to create the baseline.
Download the next revision.
Checkout files in your server and overwrite them with the newer revision's files.
While checkin, use the history.txt (sample) to create checkin comments
Repeat this process few times.
Voila!! You now have a large repository with lot of history!
Hope this helps.
Have you tried some of the larger projects on Codeplex?
http://www.codeplex.com
If you only need read access you should be able to play around with the various repositories.
I don't have a huge amount of tfs experience, but I would assume there are migration tools that let you ingest code repositories from other products (e.g svn or hit).
If so, you might want to find a svn/git repo for a sizable foss project, and try importing that.
"I'd hoped to use Codeplex to get access to TFS repositories, but it seems you only get TFS access to Codeplex projects if you're a project member."
This solution appears to be the general consensus amoung SO'rs. I've read some of the Codeplex TFS connection problem threads (you linked to below) and I hope the comments in this thread resolves the issue:
Connecting to Codeplex TFS as a Coordinator or Developer.
I'm wondering if you can use git-tfs project to import an existing Git project into TFS.
Download and install git-tfs
Create a new TFS project
Clone the TFS project to a Git project using git-tfs ("git tfs clone http://tfs:8080/tfs/DefaultCollection $/some_project")
Import a existing Git project of your choice into your fresh new Git project (I don't know the command but I think it's possible).
Use git-tfs to checkin to TFS Server ("git tfs checkintool")
=> Do it makes sense ? And works ?
For more information:
http://lostechies.com/jimmybogard/2011/09/20/git-workflows-with-git-tfs/

TFS - What happens if I delete a workspace?

I started work a lone developer last year and I found VSS is no longer a good option for source control so I decided to use TFS 2010 instead.
I have had to learn everything from a book - of which there are few.
I am currently creating a new build and in my workspaces I see a have 4. I want to delete one of them and rename another.
However I do not know what the consequences of doing this are. If I delete a workspace, will that remove the associated files under source control? How do I check which files these are? What happens if I change a status from active to cloaked?
As you can see, I am a beginner in all this.
Workspaces are only a mapping from SourceSontrol folders onto your local file system. Also workspace contains information about versions of the files you have locally, so when you hit 'Get Latest Version' only recent changes are sent from server to you, not the whole files. Information on what files are checked out is stored in workspace too, so if you have pending changes in the workspace and delete it then there'll be a bit of a challenge to check these changes in. Renaming of the workspace will not break anything as far as I know.
Article An introduction to TFS Workspaces may be interesting to you.
Like the others have said, the workspace only says what local files you have checked out, and the status, etc. Workspaces are pretty granulal (i.e. per user and per machine) so you could have mutliple workspaces with the same username in the same project. E.g. if you have a copy of Visual Studio at work and one at home, you could have different files checked out and you wouldn't run into any conflicts like you would have in VSS or something based on VSS Like like VSSConnect.
We've had a couple of people leave out project and have had to go in and remove their workspaces after the fact. This hasn't been a big deal in terms of any code losses but if you don't have access to the machine anymore you will have to use the TFS tools.
Try TFS Sidekicks, it provides a nice GUI to manage all the nitty-gritty back-end stuff in TFS

Converting CVS to TFS

Two questions really..
Does anyone know of a cheap solution for converting a CVS repository to TFS?
I think we may have to convert to SVN then convert to TFS. Has anyone had experience doing so?
Please, no comments on why we are using TFS.
The TFS Integration Platform on Codeplex is written to support integration into and out of TFS. Though it is primarily written for a TFS to TFS scenario, the code is available for you to tweak as necessary.
A few years ago, we used the original version of this (called the TFS to TFS Migration Tool) to facilitate our migration from Borland StarTeam to TFS. It worked really well.
The key thing you're going to need to decide is whether or not you want to bring over history. That's where things can get a bit more difficult, as you will need to rebuild the history from the beginning of the CVS repository. This means reading the first revision of all the files, checking them into TFS with appropriate comments, then getting the second changeset, checking in those files, ad infinitum.

VSS 6.0 to TFS Migration

Our team is migrating from VSS 6.0 to TFS 2008 to be used for source control purposes. I am wondering if anyone has any experience with this migration. In particular, we are interested in preserving the history of files in source control, as well as any other potential gotchas.
Do you have VSS 2005 installed? You need it rather than the previous version (6.0d).
Also, do you really need the history in TFS? Or can you draw a line in the sand and say that all history before such and such a date is in VSS and all history after that date is in TFS? If so, you can simply do a get latest from VSS and add the files into TFS. Migrating is non-trivial because you need to deal with VSS users that don't map to domain users, VSS users that don't exist anymore, and although the order of source-control operations is maintained the actual date/time of the operation isn't migrated, it is however stored in the comment as part of the migration.
This is fairly easy once setup. You will first need to create a usermap.xml. This will map your VSS users to your TFS2008 users. Then you create a project configuration file. I would post examples of mine but I can't get the XML to post.
The project configuration file will point to the usermap XML file. Then all you have to do is type the command "VSSConverter migrate settings.xml" to migrate or "VSSConverter analyze settings.xml" to analyze the project. I suggest you to analze before migrating the project.
Here is a link for more information.
http://msdn.microsoft.com/en-us/library/ms253090(VS.80).aspx
Unfortunately, when I tried this...
TF60032: The VSS Converter requires Visual SourceSafe 2005 or later to run.
Please install Visual SourceSafe 2005 or later and try again.

Resources