Command line tool to inspect and consolidate svn:mergeinfo properties of a Subversion working copy.
Perl Makefile
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
.gitignore Initial version with documentation and test cases Sep 16, 2012




Command line tool to consolidate svn:mergeinfo properties to the root branch node (/trunk/ or /branches/X.Y/) and clean safely properties set on sub-folders in a working copy tree.

SYNOPSIS [--debug] [--verbose] [--nowrite] [path ...]

consolidates svn:mergeinfo properties in a Subversion working copy to the root node.

If the option --nowrite is enabled, consolidated properties are not written to the working copy but only reported as a summary. If one or more path are given as parameters, only consolidate this subset.

When the option --nowrite is not set, svn:mergeinfo properties are persist in the current working copy every 500 checked revisions. This threshold can be tuned with --checkpoint option. A value of 0 means no intermediate write will occur. --status [path ...]

prints a summary of svn:mergeinfo properties content as numbers of merged revisions for each branch. If one or more path are given as parameters, reports only information for this subset.


This script must be invoked from a Subversion working copy directory, usually a checkout of /trunk or of a branch.

First it parses svn:mergeinfo and scans for branch/revisions on non-root folders, eventually limited to paths given as arguments.

If a revision is already included at the root node level, it is discarded from sub-folders.

If a revision only modifies files included in the scan sub-folder, it is discarded from the sub-folder and appended at root level.

In some cases, a branch name is non consistent with the current node name, so it is left as-is for a manual check if the revision content was partially merged or not.

Without --nowrite option, every 500 revisions (defined by checkpoint) and after operation is completed, the working copy svn:mergeinfo are modified so that you can inspect the result before a commit. If the svn:mergeinfo property is empty, it is planned for removal.

In addition, the --prunebranches option discards non-live branches from svn:mergeinfo properties to keep them compact after long history.

This script does not trigger a Subversion commit to the repository. That operation is under your responsability after manual checks and validations.

It finally reports a summary of svn:mergeinfo properties content as numbers of merged revisions for each branch.


-h, --help

prints a brief help message and exit status is -2.

-m, --man

prints the manual page and exit status is -2.


prints usual "no warranty" message and license information.


prints progress messages to the standard output.


prints debug messages to the standard output.

--prunebranches, -p

discards no longer live branches from svn:mergeinfo. A test for paths on repository HEAD is done.

--nowrite, -n

disables svn propset operations of consolidated svn:mergeinfo properties.

--checkpoint, -c afterRevisions

change write threshold which defaults to 500 analyzed revisions. 0 means the script no longer partially update working copy as checkpoint.

--status, -s

only reports a summary of the current working copy svn:mergeinfo properties.


  • Does not support any file name in working copy containing " - ".

  • Does not support non-inheritable merged revision, marked with a star.


  • Test with non-standard repository structure.

  • Prompt for removal of a non-existing origin branch path.


Copyright (C) 2012 Yves Martin This program comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under certain conditions