Defect #6706

Resolving issues with the commit message produces the wrong comment with CVS

Added by Jim Naslund almost 12 years ago. Updated over 11 years ago.

Status:ClosedStart date:2010-10-20
Priority:NormalDue date:
Assignee:Toshi MARUYAMA% Done:


Target version:1.2.0
Resolution:Fixed Affected version:0.9.5


The comment redmine automatically closes the issue with will say something like 'Applied in changeset r_4.' instead of the actual changeset number.

cvs-close-text.png (74.7 KB) Toshi MARUYAMA, 2010-11-17 08:45

cvs-issue.png (77.8 KB) Toshi MARUYAMA, 2011-02-07 12:46

cvs-revision.png (46.4 KB) Toshi MARUYAMA, 2011-02-07 12:46

Related issues

Related to Redmine - Defect #996: CVS view ends up with "duplicate key violates unique cons... Closed 2008-04-04

Associated revisions

Revision 4801
Added by Toshi MARUYAMA over 11 years ago

scm: cvs: change temporary revision number from "_N" to "tmpN" (#996, #3761, #6706).

'_' is SQL "like" special character.

Revision 4802
Added by Toshi MARUYAMA over 11 years ago

scm: cvs: generate pseudo scmid for auto issue close text (#6706).


#1 Updated by Jean-Baptiste Barth almost 12 years ago

You mean there's a "_" in the message that shouldn't be here ? And can you test if it's still the case in 1.0.x versions ?

#2 Updated by Jim Naslund almost 12 years ago

Sorry, I should of clarified that -- no. Our actual revision numbers are in the thousands, but the numbers in the update message are always small. It looks like they are maybe temporary revisions used to group the CVS file changes into one changeset. I've also noticed that if I refresh the activity page while redmine is polling the respository the same 'changeset r_4' messages will appear. If I refresh after it is done they end up as real changeset numbers e.g. r9779.

I can't easily check the 1.0.x versions without upgrading our server.

#3 Updated by Toshi MARUYAMA almost 12 years ago

I confirmed svn trunk has this problem.

I attach an image.

The reason is following.

  1. cvs adapter creates changeset with temporary revison "_X" at source:tags/1.0.3/app/models/repository/cvs.rb#L121
  2. Changeset.after_create() is called and new journal is added at source:tags/1.0.3/app/models/changeset.rb#L76
  3. cvs adapter changes revisons "_X" to "Y" at source:tags/1.0.3/app/models/repository/cvs.rb#L148

#4 Updated by Toshi MARUYAMA over 11 years ago

  • Category set to SCM

#5 Updated by Toshi MARUYAMA over 11 years ago

  • Status changed from New to 7
  • Assignee set to Toshi MARUYAMA

#6 Updated by Toshi MARUYAMA over 11 years ago

To fix this issue, I generate pseudo scmid "branch_name-YYYYMMDD-HHMMSS".
Redmine generates pseudo revision number, and using this number for auto close issue text is very difficult.
Redmine supports scmid of Git, Mercurial, Bazaar and Darcs.
Redmine supports "commit:scmid" in wiki. You can use first some letters of scmid.
For example, "commit:branch_name-YYYYMMDD-HHMM".

Also available in: Atom PDF