How to copy a project from one TFS account to another? - tfs

I have a project under the TFS account provided by my company. I want to copy the project under my personal TFS account so that I can play with it and do some changes for learning.
How can I do this?

It totally depends on what you want to do.
Executing a complete migration can be hard. You need specialized tooling like the TFS Integration Tools.
Probably the easiest solution is to do a snapshot migration of your source code (where you lose all history). Migrating work items can be done by using Excel and some copy/paste work.
Currently there are no out of the box options for migrating build definitions (although the build workflows are part of source control), test results and release templates.
If possible, just migrate your source code and the work items if you have them.
UPDATE
If you only want to migrate source code without history you can do this by taking a copy of the source code from TFS and then checking it into your new TFS server. Have a look at Understanding TFS migrations from on-premises to Visual Studio Online – Part 2: Walkthrough for a walkthrough created by the ALM Rangers to help you with this.

Related

Copy Team Project with History in VSTS

I'm hoping to copy an existing team project to a new one in order to clean up the content, whilst preserving the history / allowing me to do a dry run of this task before doing it for real, without impacting those currently working on that project.
We're using VSTS (aka VSO) as our version control solution.
I've previously copied projects between TFS and VSTS using the OpsHub migration utility. I had hoped that I could copy team projects using the same tool, but it appears that this tool is locked to only allow the source to be a self-hosted Team Foundation solution; not VSTS.
Is anyone aware of how team projects can be copied within VSTS?
Suggested Duplicate: Migrating source code from TFS to VSTS
My question differs from the above as that relates to TFS to VSTS, as opposed to VSTS to VSTS as discussed in my question. The free OpsHub tool takes care of the TFS to VSTS question, but (the free version) doesn't cover the VSTS to VSTS scenario.
There is no easy way to copy team projects and all their associated artifacts. You've already found the OpsHub utility, it has a more expensive bigger brother, the Integration Manager, which is able to do what you need for a significant price per project.
Product: http://opshub.com/products/opshub-integration-manager/
Pricing: http://opshub.com/products/pricing-oim/
There are also a few open source solutions available that each fill in part of the gaps, some copy work items, other sources and others test artifacts, but there are few tools that offer a full solution.
The easiest way is to start over and migrate without history, just snapshot your current working set and keep the old data around. If that really isn't an option, prepare for a frustrating or expensive (or both) period ahead.
The commercial version of OpsHub Migration Utility also allows copying of VSTS projects from one account to another.
Product: http://opshub.com/products/opshub-visual-studio-migration-utility/
Pricing: http://opshub.com/products/pricing-ovsmu/

How can I merge/migrate TFS source code into existing Visual Studio Team System project preserving work items

We have a situation where at a point in our project's life, we needed to split off work item tracking and source control into 2 separate TFS projects, with the work items being in a VS Team Services project, and the source on-prem in TFS 2013.
The reason at the time being, we needed to grant access for our stakeholders to the product backlog, without them being on the corporate network where TFS is hosted. At the time there was concerns about security of the source code, hence the whole project was not lifted and shifted, just the backlog.
Now we're realizing some of the security concerns were not warranted, and we are missing out on the integration of ALM provided by a single project having both responsibilities, and would like to merge our source control out into the cloud-based VSTS project.
The problem is, the migration tools are overwriting the Work Items in VSTS. Is there some way we could merge, preserving that data, or any alternative to merge these two things together somehow?
I think you're looking at the Team Foundation Server Integration Tools here if you want to migrate source code history. Bear in mind that it's not going to be perfect (data time stamps will not be the same etc.).
If you can get away with it then just stick the latest code in VSTS and consider the on-prem server your archive should you need to go back. That doesn't tend to be too popular so you'll be wrestling with the integration tools. It's not the most friendly thing to use but mostly it will get the job done.
When you configure your session, you will want to choose Team Foundation Server\VersionControl.xml for your configuration. Then select a One-way-migration between your on-prem and VSTS.
You'll need to install VS 2012 or at least the Team Explorer.
Edit Coincidentally I had to do this myself so I blogged about the process here

Keeping History when moving Team Projects TFS

I am working on a TFS Implementation where the original Project that was created has a cpace in the name. This is causing issue in our builds since we need to kick off a batch file for the Deploy process and the space in the name creates some issues with the path name of the build folder. With this, I want to create a new project without the space. As you can imagine, I would like to keep the revision history of the Source Code if possible.
I have looked at this StackOverflow
Team Foundation Server - Moving Source with History
But I am a bit confused about what I would need to do. Is there someone out there that can point me to a document that is more friendly to someone who doesn't have a lot of TFS experience.
We've been faced with a similar task and we've used the TFS Integration Platform which might be of use to you.
Here's a couple of good blog posts on how to use it:
TFS Integration Tools - Part 1
TFS Integration Tools - Part 2

TFS 2010 - Create a new project from an existing one in TFS

I need to create a new project from an existing one in TFS. This is for source control only. I do not need to copy any work items.
so now i need to create NewTeamProject in NewProjectCollection and use the source branch of OldTeamProject in OldProjectCollection.
Kindly advise to go ahead with this.. Thanks a lot for your help in advance..
Manual Split
Create a new team project in your existing collection
Pick the branch from team project option in the creation wizard
Follow the split a team project collection guidance
However, I have a feeling that this will not bring all the history along with it, and it's not a particularly nice option, especially when it comes to the collection splitting.
TFS Integration Tools
Another way is to use the tfs integration platform, which basically replays all the checkins on a new team project, which can be in your new collection. You will lose the original date/time of the checkin, due to the way this program works but will still be able to see what each checkin changed.
TFS Integration Tools
Tfs integration tools blog posts and references
There is one risky way to get your timestamps correct, by manually updating the database

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/

Resources