The MergeProcessor is a tool to automatically merge svn changes from one branch to another. One part of the MergeProcessor is running on the server the other one on the developers machine.
Everytime a developer commits a change to the svn repository the post-commit hook starts a script on the server.
This script analyses the commit and checks a file with merge rules if this commit should get merged into another branch.
If so the script creates a merge unit with all the commit and merge informations.
These merge units are stored on the server. Each user has its own folder with four subfolders:
All new merge units are placed in the
todo folder. E.g.:
The client-side MergeProcessor connects via SSH to the server and looks for merge units in the
todo folder of the user.
The user can then start the merge process and the changes will be merged to the next branch. The corresponding merge unit will then be moved to the
If the developer decides that a merge unit must not be merge the developer can ignore this merge unit and it will be moved to the
Setup & Contribution
CONTRIBUTING.md and follow the instructions of the document.
Prerequisites | Server-Side
- Linux (tested with 'SUSE Linux Enterprise Server 11 (x86_64)')
- SSH access for every developer
- running Apache Subversion repository (tested with SVN version 1.8)
- Perl (tested with version 5.10)
Installation | Server-Side
This repository only contains the client part of the whole merge process. The client checks for new merge units on the server and executes them on the local machine where it is installed.
- Place the content of the
serverfolder under the path
/var/subversion/mergetriggerof the subversion server.
- Change the owner and group of the folder
/var/subversion/mergetriggerand all of it's files so that the subversion process (e.g.
wwwrun:www) can read, write files and execute the scripts.
- Add the content of
server/scripts/post-committo the post-commit hook of the repository. E.g.:
- Create a cron job which periodically deletes merge units older than X days in the
find /var/subversion/mergetrigger/merges/*/ignored* -type f -mtime +62 -delete; find /var/subversion/mergetrigger/merges/*/done* -type f -mtime +62 -delete
- Create a cron job which periodically deletes logs older than X days in the log folder under
find /var/subversion/mergetrigger/logs/ -type f -mtime +62 -delete
Prerequisites | Client-Side
- Microsoft Windows (tested with 'Microsoft Windows 10 Professional x64')
- AdoptOpenJDK 11 (tested with 'jdk-11.0.3+7')
- Subversion 1.9.3 (tested with 'CollabNetSubversion Client 1.9.3 (r1718519)')
- TortoiseSVN (tested with 'TortoiseSVN 1.9.3, Build 27038 - 64 Bit')
Installation | Client-Side
- Place the content of the
client/bin/MergeProcessor_%VERSION%.7zfolder under the path
- Create a shortcut in the start menu of user to the
- If the MergeProcessor should automatically start place a shortcut in the autostart folder of the user.
- Create a file and name it
org.aposin.mergeprocessor.prefs. Save it under the path
%USERPROFILE%\AppData\Roaming\MergeProcessor. After this, define the variables with a simple format, e.g.
Variablessection below for more information on which variables are available to use.
WORKING_FOLDERthe folder where the MergeProcessor can create a working copy and store files.
SFTP_USERNAMEthe username for accessing the SVN server (SFTP access, i.e. not used for SVN access)
SFTP_PASSWORDthe password for accessing the SVN server (SFTP access, i.e. not used for SVN access)
SFTP_HOSTthe server where the merge units are stored.
SFTP_MERGEFOLDERdirectory on the SVN server where to look for the merge units
GIT_REPOSITORIES_FOLDERlocal directory where to clone required GIT repositories to merge on
RENAME_DATABASE_URLJDBC URL to the renaming database (optional)
RENAME_DATABASE_USERusername for accessing the renaming database (optional)
RENAME_DATABASE_PASSWORDpassword for accessing the renaming database (optional)
VERSION_INFO_FILESfiles in the SVN repository for identifying the branch version (required when using renaming database). Multiple files can be defined, separated by a
The renaming database is used to merge renamed and linked files. Without the definition and usage of the database renamed files and directories cannot be found correctly during the merge process and have to be done manually.
This table is used for renamed artifacts of a repository. It is based on the file structure and contains directories and files. The column "Version" defines the version of the branch, where the renaming of the artifact was done. Future renaming actions can be added to the table.
|OLD_NAME||the old name of an artifact including its path before renaming|
|NEW_NAME||the new name of an artifact including its path after renaming|
|VERSION||the branch version where the renaming of the artifact was done|
|REPOSITORY||the repository where the artifact is versioned|
- OLD_NAME = "platform/java/plugins/org.aposin.framework"
- NEW_NAME = "platform/java/plugins/org.opin.framework"
- VERSION = "18.5.105"
This table is used for linked artifacts of a repository. It is based on the file structure and contains directories and files. The column "Version" defines the version of the branch, where the linking of the artifact was done. Future renaming actions can be added to the table.
|NAME1||name of an artifact including its path, showing the same content as column NAME2|
|NAME2||name of an artifact including its path, showing the same content as column NAME1|
|VERSION||the branch version where the linking of the artifact was done|
|REPOSITORY||the repository where the artifact is versioned|
Searches for merge units on the server and updates the view.
ON. When the MergeProcessor finds new merge units with status todo it tries to merge them automatically.
OFF. Also show merged merge units.
OFF. Also show ignored merge units.
Open Log Folder
Opens the log folder of the MergeProcessor. On every start the MergeProcessor creates a new log file.
Opens the prefrences dialog with further configuration.
Delete Password Cache
Deletes the password cache of the MergeProcessor. When SVN server request should be done the MergeProcessor will ask for the user credentials and cache them internally.
Shows a dialog with description of the toolbar buttons.
Merges the currently in the table selected merge units.
Ignores the currently in the table selected merge units.
Must be initially defined as property in the configuration. The folder where the MergeProcessor can create a working copy and store files.
%USERNAME%. The user id of the user for which the merge files should be merged.
60. Interval in seconds in which the MergeProcessor looks for new merge unit.
INFO. Log level to control the verbosity of the logging output.
Must be initially defined as property in the configuration. Username used to connect via SFTP to the server.
Must be initially defined as property in the configuration. Password used to connect via SFTP to the server.
Must be initially defined as property in the configuration. The server where the merge units are stored.
SFTP Merge Folder
Must be initially defined as property in the configuration. The path on the server where the merge units are stored.
50,50. X and Y coordinates of the location of the MergeProcessor main window.
631,218. Width and height of the MergeProcessor main window.
Sorted Table column
Date. The column by which the table should be ordered.
Down. The direction in which the columns should be ordered.
Application paht (Eclipse Workspace Start)
Local path to an installed Eclipse application.
Parameters (Eclipse Workspace Start)
Parameters for starting an installed Eclipse application.
Database URL (Renaming)
JDBC URL to access the renaming database.
Database User Id (Renaming)
Username to access the renaming database.
Database Password (Renaming)
Password to access the renaming database.
- The MergeProcessor merges all files changed with a specific SVN revision. There does not exist a filter mechanism to specify the content or files.
- Renamed files and directories can only be identified correctly if the renaming database is used and filled with the renaming information. Otherwise the merges have to be done manually, because of tree conflicts.
- The SVN password is cached on the users computer. Everytime the user changes this password those caches should be deleted. To delete the SVN cache delete the folder
%APPDATA%\Subversion\auth. To delete the MergeProcessor cache click
Preferences - Security - Secure Storage - Contents - Delete.
- SVN sometime got problems merging deleted elements. During the merge it deletes the element and then tries to set properties on that element. Or it first sets the properties and tries to delete the element but can't because it has been modified (by the property). Both problems lead to a tree conflict. If this happens, right click on the working copy directory
C:\dev\mp\wc\and open in the context menu
TortoiseSVN - Check for modifications. Here you will find the element in a Tree Conflict state. You can right click the element and delete it. Then right click it again and resolve the conflict.