Trac2Mantis
Trac2Mantis is a command-line tool that migrate Trac tickets to a Mantis database.
License (MIT)
Copyright (c) 2010 Christophe de Vienne <cdevienne@alphacent.com>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Disclaimer
This tool has been written for a one-time use, but with reusability in mind. You may find it usefull but keep in mind that I provide no warranty of any kind, and that I will not maintain the tool nor provide a stable release.
However if you need help to anderstand the code to adapt it to your needs I will be happy to give a hand.
Requirements
Trac2mantis has been successfully used with Trac 0.11.5 and Mantis 1.1.6. Other versions of these products may work.
Installation
In a virtualenv, install the version of Trac corresponding to the trac instance you want to migrate:
easy_install -f http://ftp.edgewall.com/pub/trac/ Trac==0.11.5
Go to the trac2mantis source directory and install trac2mantis:
cd path/to/trac2mantis python setup.py develop
Note that I do not provide .eggs or .zip source files. I you want some, build them from source:
python setup.py sdist python setup.py bdist_egg
Usage
trac2mantis --trac-root path/to/your/trac/instance --mantis-db mysql://USERNAME:PASSWORD@HOST/DATABASE --mantis-project PROJECTNAME --options convert.ini
The convert.ini file contains two sections:
- authorsmap. Allow to map trac users to mantis users.
- customfields. Allow to map trac fields to mantis custom fields.
Example:
[authorsmap] # trac user = mantis user Foo Bar <foo.bar@example.com> = fbar somebody = [customfields] # Mantis Field = trac field Component = component