|Name||Last Update||Last Commit 7df87e7aa53 – Documentation||history|
|gitlab_api||Loading commit data...|
|gitlab_direct||Loading commit data...|
|licences||Loading commit data...|
|trac2down||Loading commit data...|
|.gitignore||Loading commit data...|
|README.md||Loading commit data...|
|migrate.cfg.example||Loading commit data...|
|migrate.py||Loading commit data...|
This script migrates milestones, issues and wiki pages from trac to gitlab.
- Component & Issue-Type are converted to labels
- Comments to issues are copied over
- Supports two modes of tansfer:
- Using GitLab web API
- Direct access through GitLab's database and file system
- In direct mode, attachments are transfered and the issues and notes dates and ownership are preserved
- In API mode, attachments are not transfered, issues and notes are owned by a single user and their dates are the current date.
Migrating a trac project to GitLab is a relatively complex process involving fours steps:
- Create a new project
- Migrate the repository (can just be cloning a git repository if the trac project is already using git or could involve converting from subversion using git-svn)
- Migrate issues and milestones
- Migrate wiki pages
This script takes care of the last two bullet points.
migrate.cfg, configure the values and run it (
./migrate.py). Make sure you test it on a test project prior, if you run it twice against the same project you will get duplicated issues unless you're using direct access with overwrite set to yes.
Issues and milestones are copied to GitLab.
Wiki pages are copied to a folder on your machine and must be pushed into GitLab using wiki's git access.
The database model should correspond to the version of GitLab that you are using.
To support a new version, use pwiz.py:
$ pwiz.py -e mysql -u <user> -P <password> <database> > gitlab_direct/model<version>.py
Manual updates must then be applied, see for instance the manual updates for 6.4.
The configuration must be located in a file named "micrate.cfg"
url- xmlrpc url to trac, e.g.
project_name- the destination project including the paths to it. Basically the rest of the clone url minus the ".git". E.g.
method- direct or api
access_token- the access token of the user creating all the issues. Found on the account page, e.g.
ssl_verify- set to
yesto verify SSL server certificates.
overwrite`- if set to yes, the milestones and issues are cleared for this projects and issues are recreated with their trac id (useful to preserve trac links)
db-name- MySQL database name
db-user- MySQL user name
db-password- MySQL password
uploads- GitLab uploads directory
usernamesComma separed list of username mappings such as:
migrate- Should the wiki pages be converted?
target-directory- Directory in which the wiki pages should be written
migrate- Should we migrate issues and milestones?
LGLP license version 3.0 (see the licences directory).
- The main program has been cloned from https://github.com/neuhalje/hack-copy-track-issues-to-gitlab
- Trac2down.py (the conversion of trac wiki markup to markdown) has been cloned from https://gist.github.com/sgk/1286682 and https://gist.github.com/tcchau/4628317