http://www.redmine.org/issues/14592

In migrate_from_trac.rake, there is this code:

      name =~ (/(.*)(\s+\w+)?/)
      fn = $1.strip
      ln = ($2 || '-').strip

The regular expression breaking up name is wrong. (.*) will match the whole
string, so the entire name is set to $1, so the entire name gets assigned
to fn, and ln is blank.

The attached patch fixes that. Also, I ran into one case where
the name was empty, so $1.strip threw an exception. I fixed that too with
the attached patch.

Related to #14567
http://www.redmine.org/issues/14593

In the migrate_from_trac.rake script,
the save method is called on several objects
to save them to the database. However, if these
objects fail validation, the object is not saved to the database.
The errors are not displayed to the user, and
the migrate_from_trac.rake script will skip saving
many different objects to the database.

This patch preserves the behavior of skipping saving certain
objects if they fail validation, but the patch
will at least try to print out the errors. This will
give the user a chance to scrub the data in Trac
so that it can be properly imported into Redmine.

During my test imports of a large Trac database into Redmine,
I was wondering why certain users and certain tickets were
not being imported into Redmine.

Related to #14567