- 1. Commit Access
- 2. Using svnmerge for Cross-Branch Merging
- 3. Developer Branches
The subversion server uses SSL client certificates to handle authentication of users. When you are granted commit access, you will be provided two files. These files should be placed in your
The following should be placed in the
It is also recommended that you add the following to the
~/.subversion/config file. Otherwise, you will have problems using our tools for merging changes between branches.
Checkouts that come from
http://svn.asterisk.org/ are read-only copies of the repositories. When doing a checkout that you intend to commit to, it must be from
https://origsvn.digium.com/. For example:
You must install
svnmerge and the related wrappers from our
repotools repository. The wrapper scripts use
expect, so be sure to install that, too.
If you do a
svn pl -v while you are located in an svn checkout, you will see all the properties currently attached to the root directory. For instance, on a checked out copy of Asterisk trunk, you will see something like this:
and on the 1.8 branch, you will see these sort of properties:
These properties identify the following things:
- The branch changes are being merged from
- The revisions merged from that branch
- The revision explicitly not merged, or blocked, from that branch
When committing a change that applies to more than one branch, the change first goes into the oldest branch and is then merged up to the next one. If a branch is reached where the change should not be merged up, it should be explicitly blocked. The following diagram shows the current branch merge order.
"/svn/asterisk/branches/1.8" -> "/svn/asterisk/branches/1.10"
"/svn/asterisk/branches/1.10" -> "/svn/asterisk/trunk"
- 1.2 -> 1.4
- 1.4 -> 1.6.2
- 1.6.2 -> 1.8
- 1.8 -> 1.10
- 1.10 -> trunk
Sometimes a change is made in a branch and later it is decided that it should be backported to an older branch. For example, a change may have gone into the 1.8 branch and later needs to be backported to the 1.6.2 branch. To handle this, first manually make the change and commit to the 1.6.2 branch. Then, there is another wrapper similar to
block68 to record that the code from a revision already exists in the 1.8 branch. The wrapper is
Developer branches are stored in the
/team/<name> directory of each project repository (and
/team/<name>/private for private branches).
Use the following commands to create a branch and prepare it for future merge tracking of the branch you created it from. This example creates a branch off of Asterisk trunk.
Group branches are developer branches intended to be worked on by more than one developer. Instead of putting them in
/team/<name>, they go in the
/team/group directory, instead. Otherwise, they're managed in the exact same way as other developer branches.
Our subversion server provides the ability to automatically keep developer branches up to date with their parent. To enable this feature, set the
automerge-email properties on the root directory. Changes from the parent branch will be periodically (once an hour) merged into your branch. If a change from upstream conflicts with changes in the branch, the
automerge process will stop and the address(es) listed in the
automerge-email property will be notified.
Use the following commands to enable automerge on a developer branch:
For a branch with multiple developers working on it, it may be useful to have automerge emails sent to more than one email address. To do so, just separate the email addresses in the property with commas. The value of this property is literally used as the content for the
To: header of the email.
If your developer branch goes into conflict with
automerge on, and the
automerge-email property has been set, you will receive an email notifying you of the conflict and
automerge will be disabled. To resolve it, use the following commands:
svnmerge tool will merge in the changes that cause your branch to go into conflict into your local copy. Edit the files that are in conflict to resolve the problems as appropriate. Finally, tell SVN that you have resolved the problem, re-enable automerge, and commit.
A private developer branch is only visible to Digium and the branch owner. Management of a private branch is exactly the same as any other developer branch. The only difference is branch location. Instead of putting the branch in
/team/<name>/ the branch goes in
If a developer has a branch that is ready to be merged back into the trunk, here is the process:
Once this is done, the working copy will contain the trunk plus the changes from the developer branch. If you follow the above instructions for creating branches, you have probably introduced properties to the root of the branch that need to be removed.
If you are purposely introducing new properties, or purposely introducing new values for existing properties, then you might do the following instead, so as not to destroy your properties:
If everything merged cleanly, you can test compile and then:
Once the contents of your branch has been merged, please use
svn remove to remove it from the repository. It will still be accessible if needed by looking back in the repository history if needed.