Create a “label” in subversion indicating which files should be in the next version

I have been using StarTeam for version control for some time, but am transitioning to Subversion. I read the Subversion book and it seems that one of the main functions that StarTeam does not have that Subversion does not do is the concept of shortcuts. I know that Subversion has labels, but they mean something different in StarTeam. In StarTeam, I can mark a set of files as “ready to build,” and then just check them and include them in a specific release. Then I can create a frozen label indicating which files were included in this version (similar to the Subversion tag, except in those specific versions, and not in all directories).

Is there a way to get this functionality in Subversion? I know that you can indicate which version is for the tag, but what happens when you have the code and are going to release and find an error, or someone decides that a particular change should not be included. I know that you can create a tag based on the repository and your local working copy, but this includes checking for specific file changes that should not be included, and creating the tag. With the readiness to create a “tag,” you would not put this tag on the head version of files that you do not need. There is no automatic way to specify some changes to build in Subversion. This is not the case when a new function should be developed in a branch, but more if the revision is in the trunk (or wherever you send the tag), but should not be included. Perhaps it does not need to be returned - the change may be appropriate, but in a future release, and not in this current one. If you do not have a specific version with the exact version of the file, you need to have to manually mix and match the data from the repository and your working copy.

In a similar situation, if you have files in Subversion that are not part of the release and do not need to be tagged. In StarTeam, you will not attach assembly-ready tags to them, but in Subversion everything seems to be in a directory. Is there any way to exclude such files from assembly and tag? Is that for svndumpfilter exclude for?

In short, is there a way to include only certain changes to some files in a tag, or should it be either a specific revision in the repository, or a manual combination of the files in the repository and your working copy?

+4
source share
5 answers

If I understand your problem correctly, I believe that it can be handled by branching at some point before the release (for example, at that moment all the basic functions that you want to include in this version were completed), and then carefully manage That unites in this branch of "release". The "main trunk" is free for new things. For example, if an error is identified, then it can be (a) recorded on the main highway, and then a decision is made whether to merge it into a release branch; or (b) is fixed on a branch. This is the process we follow, and it works quite well (but it also requires discipline and a certain amount of formal processes).

+2
source

You will enter a branch or mark a specific revision. You can change the branch to include certain changes or updates that you want in this branch. After you enter a branch, you can change any number of files you want and update them only for this branch. So yes, individually you can upgrade your files to an older version and then transfer them to a branch.

+5
source

Subversion allows you to atomically tag an entire revision of a source tree. The functionality you are looking for requires some connection between your original control and the ticketing system, which supports not only changes, but also files that have been changed for each ticket

Trac, for example, analyzes commit logs for each revision associated with any number of tickets, using C # syntax in the commit log.

You will need a module that supports tickets associated with the new version, and then calculates which files should be included in the delta release package.

+1
source

I think it's best to use branches. Depending on how you work on the new version, you can either create a clean branch that is not used for active development, or keep the trunk clean and use branches for active development. Then, when you have ready-made and ready-made files for the next build, you merge these file changes only into a clean branch.

Say, for example, we work in the trunk and release version 1.0. Then we create a branch called maint-1.0, which no one touches. We continue to evolve in the trunk, and as some functions or functionality are completed, we move these modified files to the maint-1.0 branch. Please note that you may have to have two working copies and just copy the modified files. Doing the actual merge will want to merge all the changes, not just specific files.

The end result is that your maint-1.0 branch has only the changes you want in your next build.

+1
source

I think that there are quite a few other answers there, but in order to make them explicit, this situation handles the release branch very well.

The idea is to assume at an early stage of development (or from an early revision) that you want everything to be separated from the branch at an early stage of development, and use the usual merge mechanism to push the revisions off the backbone. If subsequently (or a set of corrections) the revision option is changed, you can return these mergers. Your merge tracking (this works very well in the turtle) shows you what is on and what else needs to be done, and you can skip the revisions, merge them out of order and generally damage as much as you need for your work to work. Obviously, skipping and smoothing the order, you can create more work for you, since you have to manually resolve conflicts, but this is a tool available as needed.

This has advantages over working with individual files, as all sets of functions are promoted / deleted as needed - you do not need to manually search for different files, deleting changes here and there. But this requires that you have sensible commits and comments - do not let your developers commit to "Agree on Friday so everything is safe."

+1
source

Source: https://habr.com/ru/post/1286209/


All Articles