Project

General

Profile

Actions

Patch #2748

open

Improved Trac-Importer with subversion repository migration

Added by Mathias Kühn about 15 years ago. Updated about 14 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Importers
Target version:
-
Start date:
2009-02-13
Due date:
% Done:

0%

Estimated time:

Description

I've spent some time improving the trac import script and also to provide a tool to also migrate the associated Subversion repository.

The following changes were done to the trac migration process:
  • The original trac ticket id is stored in a new custom field named TracID
  • The modification of all Wiki-like texts is done after all tickets have been migrated as only then all newly assigned ticket ids are defined.
  • Numbered lists are now supported
  • Source links are done the same way as milestones are treated
  • The modification of any Wiki-like texts (Milestone descriptions, Issue descriptions, Issue change notes, and Wiki pages) was added

In addition to the migration of the trac repository, we had to modify the associated svn repository since the checkin comments were also having references to tickets in the commit messages. The new rake task redmine:migrate_svn_commits can be run after the trac repository has been migrated. The new task is recreating the association between trac ticket id and newly created redmine ticket id. Then all commit messages in the provided repository are extracted and converted with the same wiki translation during the trac migration. All ticket references are modified to point to the newly assigned redmine ticket identifiers.

Running the tool gives you the following output:

rake redmine:migrate_svn_commits RAILS_ENV="production" 

WARNING: all commit messages with references to trac pages will be modified
Are you sure you want to continue ? [y/N] y

Subversion repository url []: http://svn.server.dom/project
Subversion repository username []: user
Subversion repository password []: secret
Redmine project identifier []: project-id

In order for the script to succeed, the subversion repository must allow modification
of revision properties. This can be accomplished by enabling the pre-revprop-change hook script
that returns 0 to the caller. The script can be as simple as the following:

A Windows pre-revprop-change.cmd:

exit 0

...or a unix executable script pre-revprop-change

#!/bin/sh
exit 0


Files

migrate_from_trac.rake (38.5 KB) migrate_from_trac.rake Modified importer Mathias Kühn, 2009-02-13 23:22
Actions

Also available in: Atom PDF