Project

General

Profile

Actions

Defect #813

closed

When using postgres, importing svn repo complains about improperly escaped backslashes

Added by Marc Horowitz about 16 years ago. Updated about 16 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
2008-03-08
Due date:
% Done:

0%

Estimated time:
Resolution:
Invalid
Affected version:

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.

Actions #1

Updated by Jean-Philippe Lang about 16 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

Applied in changeset r1344.

Actions #2

Updated by Marc Horowitz about 16 years ago

  • Status changed from Closed to Reopened
  • % Done changed from 100 to 0

It seems very unlikely that this defect was fixed by the change in r1344, which appears to be a one-line fix for #1045.

Actions #3

Updated by Jean-Philippe Lang about 16 years ago

  • 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.

Actions

Also available in: Atom PDF