Project

General

Profile

Actions

Defect #996

closed

CVS view ends up with "duplicate key violates unique constraint" after 0.7.0RC1 update

Added by Stefan Kremer almost 16 years ago. Updated about 13 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Toshi MARUYAMA
Category:
SCM
Target version:
-
Start date:
2008-04-04
Due date:
% Done:

0%

Estimated time:
Resolution:
Affected version:

Description

This error first time came up after 0.7.0RC1 migration. SVN repository works fine. Only CVS repositories are affected.

Processing RepositoriesController#show (for 172.22.150.25 at 2008-04-02 17:31:40) [GET]
Session ID: e6ad346ab116a5d1e4df25d930061c49
Parameters: {"action"=>"show", "id"=>"project", "controller"=>"repositories"}

ActiveRecord::StatementInvalid (PGError: ERROR: duplicate key violates unique constraint "changesets_repos_rev"
: UPDATE changesets SET "scmid" = NULL, "comments" = E'no message', "commit_date" = '2007-12-03', "committer" = E'USER', "committed_on" = '2007-12-03 00:00:00.000000', "repository_id" = 5, "revision" = 1 WHERE "id" = 14):

Version: 0.7.0RC1
Database: Postgre


Files

test.csv (533 Bytes) test.csv Query Result Stefan Kremer, 2008-04-08 13:20
repository2.csv (6.03 KB) repository2.csv Partial query result Sandrine LEAL, 2008-07-10 17:53

Related issues

Related to Redmine - Defect #3761: Most recent CVS revisions are missing in "revisions" viewClosedToshi MARUYAMA2009-08-19

Actions
Related to Redmine - Defect #6706: Resolving issues with the commit message produces the wrong comment with CVSClosedToshi MARUYAMA2010-10-20

Actions
Has duplicate Redmine - Defect #1098: Upgrading from 0.6.3 to 0.7 , get repsoitiory page info errorClosed2008-04-24

Actions
Actions #1

Updated by Jean-Philippe Lang almost 16 years ago

Is it a new CVS repository or is it a repository that was already loaded before the migration to 0.7RC1 ?

Actions #2

Updated by Stefan Kremer almost 16 years ago

Hi Jean-Philippe,

THX for your fast answer. All repositories are created before migration.

Actions #3

Updated by Jean-Philippe Lang almost 16 years ago

I don't have a clue.
Could you post (as attached file) the result of this query:

select id, revision, committed_on from changesets where repository_id = 5

Thanks

Actions #4

Updated by Stefan Kremer almost 16 years ago

BTW. We got three CVS all of them do not work since updated to 0.7.0 RC1.

Actions #5

Updated by Stefan Kremer almost 16 years ago

Pardon!

See attached the result set.

Actions #6

Updated by Jean-Philippe Lang almost 16 years ago

  • Category set to SCM

I can't see what is happening. I've imported a CSV repository in a 0.6.4 install with a postgresql DB then migrated to 0.7.0RC1 and everything works as expected. New CVS commits are properly added to the database.
Could you post the error log so I can see exactly where this error comes from ?

Actions #7

Updated by Jean-Philippe Lang almost 16 years ago

  • Status changed from New to Resolved
  • Target version set to 0.7

r1355 should fix this problem. Can you confirm please ?

Actions #8

Updated by Jean-Philippe Lang almost 16 years ago

  • Status changed from Resolved to Closed

Should be fixed in 0.7.0 release. Reopen if needed.

Actions #9

Updated by Sandrine LEAL over 15 years ago

I've got the same error with redmine 0.7.3 and a CVS repository:

[4;36;1mChangeset Update (0.000000)[0m [0;1mMysql::Error: #23000Duplicate entry '2-423' for key 2: UPDATE `changesets` SET `committer` = 'nicolas', `scmid` = NULL, `comments` = 'Nature : Modification fonctionnelle\nSofts Impact', `revision` = '423', `committed_on` = '2008-03-07 15:00:32', `repository_id` = 2, `commit_date` = '2008-03-07' WHERE `id` = 901[0m

The repository was created with Redmine 0.6.3 before migration to 0.7.3

Config :
Redmine : 0.7.3
Rails : 2.0.2
DB : mySQL 5.0.27
OS: windows server 2003

Attached query result
[4;36;1mChangeset Load (0.781000)[0m [0;1mSELECT * FROM `changesets` WHERE (changesets.repository_id = 2 AND (revision LIKE '_%')) ORDER BY committed_on ASC, id ASC, changesets.committed_on DESC, changesets.id DESC[0m

Actions #10

Updated by Jean-Philippe Lang over 15 years ago

  • Target version deleted (0.7)
Actions #11

Updated by Sandrine LEAL over 15 years ago

Is there anybody working on this bug because it's very important for us ? Some of our repositories doesn't work anymore and there is no workaround.

Actions #12

Updated by Toshi MARUYAMA about 13 years ago

  • Assignee set to Toshi MARUYAMA
Actions #13

Updated by Toshi MARUYAMA about 13 years ago

  • Status changed from Reopened to Closed

I commit some revisions to SVN trunk.
If you still have a problem in SVN trunk r4802, please reopen this issue.

Actions

Also available in: Atom PDF