TeamCity version controls systems integration is comprehensive. It’s hard to imagine a project whose source code couldn’t be retrieved by TeamCity.
Flexible VCS Configuration
TeamCity supports a broad range of version controls out of the box, from the most popular ones to somewhat deprecated but still used systems.
For a single build TeamCity can take source code from several different VCS repositories. You can even mix different types of VCS.
Suppose the majority of your project sources is located in Perforce while several modules are stored in Subversion. TeamCity allows you to configure your project to use sources from both of them simultaneously.
Storing Project Settings in VCS
TeamCity provides the two-way synchronization of project settings with the version control the same way it is done with the source code. Synchronization is supported for Git, Mercurial, Perforce, Subversion, and TFS. You can enable synchronization on the Versioned Settings page of the project administration.
Developing with feature branches in Git and Mercurial with TeamCity is extremely simple. Just tell TeamCity which branch names to monitor.
As soon as you push your branch to Git, Mercurial repository or to Perforce stream, TeamCity will detect it and start a build on your changes.
You can configure TeamCity to merge a feature branch automatically to the master if a build in the feature branch completes successfully, or if no new tests failed in this branch.
File Diff and Patches
View file differences in TeamCity’s web interface, or download a patch from TeamCity right in your IDE.
GitHub Pull Requests
Filter the GitHub pull requests by author and limit them to internal or external collaborators, or open them for everyone. There is also the option to filter pull requests by target branch.
The Pull Requests support is also available for GitLab merge requests and BitBucket server.
Enhanced Mercurial Support
TeamCity fully supports Mercurial’s bookmarks and subrepositories. The former could be used as feature branches. From the latter TeamCity gathers and shows changes.