This script was used to migrate data of our trac installation (around 1'800 tickets) to Github Issues. It writes json files as specified in APIv3. Partially based on github-trac-ticket-import by @adamcik.
The basic assumptions made should be documented in convert.py
.
You will definitely need to edit data.py
, which we didn't bother converting to YAML.
Find below documentation for our specific migration needs and the MIT license.
Edit tracdump.py
and modify the configuration options.
Execute python2 tracdump.py -u <trac_username> -p <trac_password>
. When this is done (it will take some time to dump the tickets) you will have a <repo>/tickets.p
file as well as a bunch of list files in your <repo>/
directory. Use the list files to build your data.py
file.
Edit convert.py
and modify any configuration options you need to.
Execute python2 convert.py
.
When everything looks good (you might not want to include all the list files generated by tracdump.py):
tar -czf fife.tar.gz <repo>/
And bother a poor github admin once more!
License
=======
The MIT License (MIT)
Copyright (c) 2013 Wayne Prasek <[email protected]>
based on work Copyright (c) 2012 Chris Oelmueller <[email protected]>
based on work Copyright (c) 2010 Thomas Adamcik
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 fur-
nished 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 LIA-
BILITY, 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.