Defect #6681

Mercurial, Bazaar and Darcs auto close issue text should be commit id instead of revision number

Added by Toshi MARUYAMA almost 7 years ago. Updated almost 7 years ago.

Status:ClosedStart date:2010-10-15
Priority:NormalDue date:
Assignee:-% Done:

50%

Category:SCM
Target version:1.1.0
Resolution:Fixed Affected version:1.0.2

Description

Mercurial and Bazaar have revision numbers.
Mercurial revision numbers are far too brittle (#3724).
Same Bazaar problem is reported at http://www.redmine.org/boards/2/topics/17587?r=17591#message-17591 .
Redmine generates pseudo revision number for Darcs at source:tags/1.0.2/app/models/repository/darcs.rb#L73 .

If "closes #issue_number" is in commit log, Redmine adds "Applied in changeset rN" at issue journal.

Following two Mercurial repository are full synchronized.
And revision 1 and 2 are different for each other.

If we delete the repository from project setting and re-add another repository,
"rN" points other revision.

$ hg glog
o  changeset:   2:9d5b5b004199
|  tag:         tip
|  parent:      0:0885933ad4f6
|  user:        jsmith <jsmith@foo.bar>
|  date:        Fri Dec 14 10:24:01 2007 +0100
|  summary:     Added 2 files and modified one.
|
| @  changeset:   1:505aa36abc94
|/   branch:      branch00
|    user:        jsmith <jsmith@foo.bar>
|    date:        Fri Oct 15 20:09:50 2010 +0900
|    summary:     test.
|
o  changeset:   0:0885933ad4f6
   user:        jsmith <jsmith@foo.bar>
   date:        Fri Dec 14 10:22:52 2007 +0100
   summary:     Initial import.
$ hg glog
@  changeset:   2:505aa36abc94
|  branch:      branch00
|  tag:         tip
|  parent:      0:0885933ad4f6
|  user:        jsmith <jsmith@foo.bar>
|  date:        Fri Oct 15 20:09:50 2010 +0900
|  summary:     test.
|
| o  changeset:   1:9d5b5b004199
|/   user:        jsmith <jsmith@foo.bar>
|    date:        Fri Dec 14 10:24:01 2007 +0100
|    summary:     Added 2 files and modified one.
|
o  changeset:   0:0885933ad4f6
   user:        jsmith <jsmith@foo.bar>
   date:        Fri Dec 14 10:22:52 2007 +0100
   summary:     Initial import.

I post a patch and a Mercurial image.
This patch master is http://bitbucket.org/yuja/redmine-mq-issue4455/src/d6bc15c54f5d/hg-use-scmid.patch/issue-auto-close.diff .

issue-auto-close.diff Magnifier (1.59 KB) Toshi MARUYAMA, 2010-10-15 14:45

auto-close-hg.png (55.3 KB) Toshi MARUYAMA, 2010-10-15 14:45


Related issues

Related to Redmine - Defect #3724: Mercurial repositories display revision ID instead of cha... Closed 2009-08-10
Related to Redmine - Defect #8030: Bazaar integration doesn't notice new commits to repository New 2011-03-31

Associated revisions

Revision 4490
Added by Jean-Philippe Lang almost 7 years ago

Fixes Changeset#text_tag for numeric scmid (#6681).

Contributed by Toshi MARUYAMA.

Revision 4858
Added by Toshi MARUYAMA over 6 years ago

scm: in repository tree, use find_changeset_by_name instead of changesets.find_by_revision (#3724, #3421).

Mercurial revision numbers are far too brittle.
Please see #6681 description.

History

#1 Updated by Jean-Philippe Lang almost 7 years ago

  • Status changed from New to Closed
  • Target version set to 1.1.0
  • Resolution set to Fixed

Latest patch found in #4155 committed in r4490.
Thanks.

Also available in: Atom PDF