Merge lp:~shypike/trac-launchpad-migrator/bugfixes-custom-mappings into lp:trac-launchpad-migrator
Proposed by
shypike
Status: | Merged | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Approved by: | Graham Binns | ||||||||||||
Approved revision: | 21 | ||||||||||||
Merged at revision: | not available | ||||||||||||
Proposed branch: | lp:~shypike/trac-launchpad-migrator/bugfixes-custom-mappings | ||||||||||||
Merge into: | lp:trac-launchpad-migrator | ||||||||||||
Diff against target: |
266 lines (+81/-41) 2 files modified
README (+2/-0) migrate.py (+79/-41) |
||||||||||||
To merge this branch: | bzr merge lp:~shypike/trac-launchpad-migrator/bugfixes-custom-mappings | ||||||||||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Graham Binns (community) | code | Approve | |
Review via email: mp+23046@code.launchpad.net |
Description of the change
This change contains:
- Customizable mapping of users and milestones and nickname.
- Add xmlns attribute to <LaunchpadBugs> and <Bug>.
- Prevent crashes when encountering empty Trac fields.
- Convert [[br]] formatting in text fields to newlines.
- Map Trac-type "enhancement" to Lauchpad importance "Wishlist".
- Removed embedded "elisa" project customizations.
To post a comment you must log in.
On Thu, Apr 08, 2010 at 06:59:39PM -0000, shypike wrote:
> shypike has proposed merging lp:~shypike/trac-launchpad-migrator/bugfixes-custom-mappings into lp:trac-launchpad-migrator.
>
> Requested reviews:
> Graham Binns (gmb)
>
>
> This change contains:
>
> - Customizable mapping of users and milestones and nickname.
>
> - Add xmlns attribute to <LaunchpadBugs> and <Bug>.
>
> - Prevent crashes when encountering empty Trac fields.
>
> - Convert [[br]] formatting in text fields to newlines.
>
> - Map Trac-type "enhancement" to Lauchpad importance "Wishlist".
>
> - Removed embedded "elisa" project customizations.
>
Hi,
First, thanks for this branch. It's great to have people contributing
their code to this script.
There are a few issues with your branch that need fixing before we can
merge it with trunk. I've pointed these out below. Please reply to this
when you've made the changes I request and pushed them to Launchpad and
I'll happily do the merge for you.
Cheers,
Graham
> === modified file 'README' ------- ------- ----- ####### ####### ####### ####### ####### ####### ####### ####### ####### ####### ####### ####### ###
> --- README 2009-06-17 14:46:38 +0000
> +++ README 2010-04-08 18:59:38 +0000
> @@ -18,6 +18,8 @@
> Running the migration tool
> -------
>
> +First customize the top part of the migrate.py script for your project.
> +
> To create an XML export of a Trac ticket database, run the following
> command:
>
>
> === modified file 'migrate.py'
> --- migrate.py 2009-10-20 10:31:04 +0000
> +++ migrate.py 2010-04-08 18:59:38 +0000
> @@ -23,12 +23,31 @@
> print "You can install EaseXML by running `easy_install easexml`."
> sys.exit()
>
> -# This can be set to a hostname that will be used to create
> -# email addresses from trac users that only have a username set but not
> -# an email address. It should probably be set to the mailname of the
> +######
> +# Start of customization
> +
> +# This can be set to a hostname that will be used to create
> +# email addresses from trac users that only have a username set but not
> +# an email address. It should probably be set to the mailname of the
> # system that was running the trac instance.
> TRAC_HOSTNAME = None
>
> +
> +# Nickname to be used as a prefix of your TRAC issue numbers
> +# So TRAC bug 123 will result in Nickname-123
> +NICKNAME = 'name'
Thanks for fixing this one; it's been something I've needed to fix but
never got around to.
It's really important that this isn't just left as 'name', so I think it
should be None by default and make the script exit if it hasn't been
changed. What do you think?
> +
> +# Map TRAC aliases to real Lanchpad users
> +USER_ALIAS = {
For the sake of my sanity, this should be USER_ALIASES.
> + 'somebody' : 'user1',
> + 'anonymous' : 'user2',
> +}
Minor niggle, but our coding guidelines state that the closing brace of
a dict should be indented by 4 spacesi [1] (i.e. to line up with the contents
of the dict).
> +
> +# When reporters do not have valid account data
> +# set here which default user to use instead.
> +# If you leave this empty, a warning will be printed and the comment skipped.
> +DEFAULT_REPORTER = 'use...