Project

General

Profile

Actions

Defect #32041

closed

Unable to reuse project name after delete

Added by James Byrne over 4 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Database
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Invalid
Affected version:

Description

I created a test project (testgit) and an associated git repo (testgit.git). I then deleted the project and created a new project with a different name (testgit2) using the same repo. I then deleted the second project and added the first test project again. When I attempted to add the repo I got this message:

ActiveRecord::RecordNotUnique (PG::UniqueViolation: ERROR:  duplicate key value violates unique constraint "changesets_repos_rev" 
DETAIL:  Key (repository_id, revision)=(24, e8b0e6b24474df93f13ccce8f2367686901f35f2) already exists.
: INSERT INTO "changesets" ("repository_id", "revision", "scmid", "committer", "commit_date", "committed_on", "comments", "user_id") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"):
  app/models/repository/git.rb:220:in `save_revision'
  app/models/repository/git.rb:209:in `block (2 levels) in save_revisions'
  app/models/repository/git.rb:206:in `block in save_revisions'
  app/models/repository/git.rb:205:in `each'
  app/models/repository/git.rb:205:in `save_revisions'
  app/models/repository/git.rb:155:in `fetch_changesets'
  app/controllers/repositories_controller.rb:86:in `show'
  lib/redmine/sudo_mode.rb:63:in `sudo_mode'
Actions

Also available in: Atom PDF