![]() The collection of ModificationData returned by llectBuildChanges(.) should then be like this:īut this is not a simple union of collections, returned by two calls of llectBuildChange(.). Now let's assume we've got a couple of changes in our sample repository, made by different users. If you have implemented CollectChangesByIncludeRule in the way described in the listing above, you will have the following interaction. If collectBuildChanges(.) utilizes llectBuildChanges(.), it transforms the invocation into two separate calls of llectBuildChange(.). When collectBuildChanges(.) is invoked, it will receive a VcsRoot instance that corresponds to vcs://repository/project/ and a CheckoutRules instance with two IncludeRules: one for "module1" and the other for "module2". Therefore we've configured the following checkout rules: We want to monitor changes only in module1 and module2. The project root contains the following directory structure: Suppose, we have a VCS Root pointing to vcs://repository/project/. Let's consider an example with collecting changes. When implementing include rule policies, it is important to understand how they work with Checkout Rules and paths. #Teamcity versions Patch#Server-Side Part Patch Building and Change Collecting Policies However a VCS plugin can use checkout rules to speedup changes retrieval and patch building since checkout rules usually narrow a VCS Root to some its subset. Mapping is performed by TeamCity itself and VCS plugin should not worry about it. Include rule can have "from" and "to" parts ("to" part allows to map path in repository to another path on agent). change/add/remove file, add/remove directory).Ī Checkout Rule is a way of changing default file layout.Ĭheckout rules allow to map the path in repository to another path on agent or to exclude some parts of repository, read more.Ĭheckout rules consist of include and exclude rules. A collection of Modifications is what TeamCity expects as a result when asking a VCS plugin for changes.Ī Patch is a set of operations to convert the directory state from one modification to another (e.g. A Modification also contains the Version of the VCS Root right after the corresponding Changes have been applied. It most closely corresponds to a single checkin transaction (commit), when a user commits all his modifications made locally to the central repository. In other words, a change corresponds to a single increment of a file version.Ī Modification is a set of changes made by some user at a certain time interval. For the UI, TeamCity converts a Version to its display name using #getVersionDisplayName(String,).Ī Change is an atomic modification of a single file within a source repository. TeamCity does not show Versions in the UI directly. When content of the file is retrieved from the repository Usually the format of the version depends on a version control system the only requirement which comes from TeamCity is that it should be possible to sort changes by version in order of their appearance (see #getVersionComparator(). It can be a representation of a transaction number, a revision number, a date, whatever suitable enough for getting a source snapshot in a particular VCS. The current version is taken by calling #getCurrentVersion(). The current version represents the head revision at the moment of obtaining. Basic TermsĪ Version is unambiguous representation of a particular snapshot within a repository pointed at by a VCS Root. Mercurial plugin For more information on TeamCity plugins, please refer to the TeamCity Plugins section.īefore digging into the VCS plugin development details, it's important to understand the basic terms such as a Version, Modification, Change, Patch, and Checkout Rule, which are explained below. #Teamcity versions code#You can use the source code of the existing VCS plugins as a reference, for example: For pros & cons of both solutions see VCS Checkout Mode. In contrast to server-side checkout it offers a traditional approach to interacting between a CI system and VCS – when source code is checked out into the same location where it's built. The agent-side part is optional and only responsible for checking out and updating project sources on agents. This dependency may be eliminated in the future. Personal builds, which require corresponding support in IDE. Getting content of a file (for web diff, duplicates finder, and some other places) The server-side part of a VCS plugin is responsible the following major operations:īuilding of a patch from version to version (server-side part) and .AgentVcsSupportContext (agent-side part). In TeamCity a plugin for Version Control System (VCS) is seen as a set of interface implementations grouped together by instances of ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |