Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Python module for parsing subversion dumpfile
Python
branch: master
Failed to load latest commit information.
data Small test dump
doc
svndump
.gitignore
LICENSE.txt Add copyright
README.md Add simple README
parser Simple parser that reads from stdin and writes to stdout

README.md

py-svndump

py-svndump is a python module (named svndump) for parsing and altering the output from svnadmin dump before loading it into a repository with svnadmin load.

The reason it exists was that I needed a way to filter out svn:mergeinfo from a huge dump-file before loading it to make the size of the repository smaller.

See parser for a simple skeleton for reading a dump file from standard input and writing it unaltered to standard output.

By adding the following to the for-loop we can change the author for all commits done by "erik" to "erijo" and delete all mergeinfo.

if isinstance(record, RevisionRecord):
    try:
        if record.properties["svn:author"] == "erik":
            record.properties["svn:author"] = "erijo"
    except KeyError:
        assert record.headers[record.REVISION_NUMBER_HEADER] == "0"
elif (isinstance(record, NodeRecord)
      and record.properties is not None):
    try:
        del record.properties["svn:mergeinfo"]
    except KeyError:
        pass
Something went wrong with that request. Please try again.