Defect #813
When using postgres, importing svn repo complains about improperly escaped backslashes
| Status: | Closed | Start: | 2008-03-08 | |
| Priority: | Normal | Due date: | ||
| Assigned to: | - | % Done: | 0% |
|
| Category: | - | |||
| Target version: | - | |||
| Affected version: | 0.6.3 |
Resolution: | Invalid |
|
Description
I set up a new install of redmine, and when I set the svn rep and clicked on Repository for the first time, I got a few dozen of these:
HINT: Use the escape string syntax for backslashes, e.g., E'\\'.
WARNING: nonstandard use of \\ in a string literal
LINE 1: ..."committer") VALUES('2007-04-10 23:20:09.009982', 'add ctor ...
^
HINT: Use the escape string syntax for backslashes, e.g., E'\\'.
WARNING: nonstandard use of \\ in a string literal
LINE 1: ..."committer") VALUES('2007-04-10 23:20:51.015399', 'included ...
^
HINT: Use the escape string syntax for backslashes, e.g., E'\\'.
WARNING: nonstandard use of \\ in a string literal
LINE 1: ..."committer") VALUES('2007-04-11 00:19:05.896664', 'Merged re...
Looking at a few of the log messages which trigger this, they all have \ characters in them. I'm guessing this is a postgresqlism, but I don't know enough ruby to know where to look for it.
Associated revisions
Fixed: Double dot displayed on ticket view when ticket not updated (closes #813).
History
2008-04-12 19:37 - Jean-Philippe Lang
- Status changed from New to Closed
- % Done changed from 0 to 100
Applied in changeset r1344.
2008-04-12 21:17 - Marc Horowitz
- Status changed from Closed to Reopened
- % Done changed from 100 to 0
2008-04-13 15:11 - Jean-Philippe Lang
- Status changed from Reopened to Closed
- Resolution set to Invalid
You're right, it was a mistake.
Anyway, I could reproduce your problem with Rails 1.2.6 but it's fixed in Rails 2.0.2.
Here is the corresponding log, you can see that the backslash is now properly encoded:
Changeset Create (0.000000)[0m [0mINSERT INTO changesets ("commit_date", "comments", "committed_on", "revision", "scmid", "repository_id", "committer") VALUES('2008-04-13 15:01:58.609375', E'Message with a backslash \\', '2008-04-13 15:01:58.609375', E'90', NULL, 1, E'redminez')[0m
You just need to upgrade Rails.