Defect #996
closedCVS view ends up with "duplicate key violates unique constraint" after 0.7.0RC1 update
0%
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
Related issues
Updated by Jean-Philippe Lang over 16 years ago
Is it a new CVS repository or is it a repository that was already loaded before the migration to 0.7RC1 ?
Updated by Stefan Kremer over 16 years ago
Hi Jean-Philippe,
THX for your fast answer. All repositories are created before migration.
Updated by Jean-Philippe Lang over 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
Updated by Stefan Kremer over 16 years ago
BTW. We got three CVS all of them do not work since updated to 0.7.0 RC1.
Updated by Stefan Kremer over 16 years ago
Pardon!
See attached the result set.
Updated by Jean-Philippe Lang over 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 ?
Updated by Jean-Philippe Lang over 16 years ago
- Status changed from New to Resolved
- Target version set to 0.7
r1355 should fix this problem. Can you confirm please ?
Updated by Jean-Philippe Lang over 16 years ago
- Status changed from Resolved to Closed
Should be fixed in 0.7.0 release. Reopen if needed.
Updated by Sandrine LEAL over 16 years ago
- File repository2.csv repository2.csv added
- Status changed from Closed to Reopened
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
Updated by Sandrine LEAL over 16 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.
Updated by Toshi MARUYAMA almost 14 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.