Is it possible to sync two TFS(TFVS) repositories? - tfs

I have 2 different TFS repositories (one is TFS 2012, another is TFS 2017).
What I need is:
1) Work in single workspace on my local machine, change code, do changesets...
2) All the changes should go to both repositories (they should be identical, but located in different places)
Is it possible at all?

No, that's not possible; what you're describing is not a common or supported scenario.

Related

Sharing code between 2 TFSVC repositories with git-tfs

I have 2 different TFS repositories (one using Visual Studio Online and another using my own local on premise TFS instance) which I want to keep in sync using git-tfs. How do I need to set things up so that I can work locally in git and push changes up to both repositories? Please note both TFS repositories are using TFSVC.
As the main developer of git-tfs, believe me, that's not possible...
Git-tfs can only manage one TFVC repository.
Short answer: Not support.
If you want to sync Visual Studio Online and local TFS. You can use the TFS Integration Tools to setup a unidirectional sync, that should allow you to ensure that a TeamProject on your local TFS system remains in sync. However, they are complicated to setup and will be painfull to run. And There are commercial options that are ridiculously expensive, like OpsHub.

TFS Sparse checkout local workspace

Is there a way to "sparsely checkout" a local workspace in TFS 2012? We currently use SVN and are investigating TFS 2012. Specifically, I don't want my entire collection to be downloaded to a developer machine. We branch to provide isolation among teams and products. I'm hoping that we can selectively choose which items in the branch are downloaded locally.
You can map various parts of your source tree using different workspaces to achieve some of the effect that you're looking for. We use this to separate components in our build system. Workspaces are configured by client machine/by user.

Add source to both local TFS and TFSPreview

Is it possible to add your projects/source to two different TFS servers?
If possible it would be very handy to synchronize my local TFS server with TFSPreview.
This is definitely not supported. TFS stores cache of your local workspaces and will never allow you to map the same folder to two different servers. This is how you can work with tf.exe without specifying server switch every time.
Very simple solution for you is to mirror one workspace with robocopy in another directory. Before you start doing something on your own please look at http://tfsintegration.codeplex.com/. TFS product team is afaik using it exactly for purpose of synchronizing between 2 servers.

How to have two repository paths mapped to one local path in TFS 2010

we have 2 branches of code in tfs 2010 such as enhancement and support
Most of the developers work on enhancement as well as support.
Now, We want to create two different work spaces and map it to one local folder as we have all our virtual directories mapped to that local folder and dll registered from that location.
However, TFS does not allow this!! So what is the alternative? Also
mapping to two different local folders will occupy more spaces on each individual developer's machine.
This is not supported. As Stuart mentioned in his question - TFS is not able to decide where to do check-in, if you try to check-in your changes on one file mapped from two branches.

Comparing files in two different TFS Collections

I have two files that I would like to compare, however they are each in a different TFS collection. How can I do the comparision within TFS ?
The comparison is never performed within TFS. All that TFS does is fetch the two files, then call a comparison utility.
You can do that by hand. Get the files, then go compare them.
TFS Integration Platform, that facilitate integration between external systems and Team Foundation Server.
You cam integrate file or different TFS systems
http://tfsintegration.codeplex.com/

Resources