Defect #36258

Support revision without any message in Mercurial repositories

Added by salman mp 12 months ago. Updated 3 months ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Go MAEDA% Done:

0%

Category:SCM
Target version:5.0.3
Resolution:Fixed Affected version:

Description

In sophesticated position a repository may contain revision without message.

empty_message.diff Magnifier (809 Bytes) salman mp, 2021-11-29 16:32

0001-Update-test-fixtures-repositories-mercurial_reposito.patch Magnifier (31.5 KB) Yuichi HARADA, 2021-12-24 06:38

0002-Update-tests-and-add-a-test-for-empty-commit-message.patch Magnifier (4.67 KB) Yuichi HARADA, 2021-12-24 06:38

Associated revisions

Revision 21792
Added by Go MAEDA 3 months ago

Support revision without any message in Mercurial repositories (#36258).

Patch by salman mp and Yuichi HARADA.

Revision 21794
Added by Go MAEDA 3 months ago

Merged r21792 from trunk to 5.0-stable (#36258).

History

#1 Updated by Go MAEDA 11 months ago

I'm not familiar with Mercurial, so I don't understand the improvements the patch brings. Could you explain the benefits?

#2 Updated by salman mp 11 months ago

Mercurial is very similar to git. I added another source to my repository, and when did pull from that source, unbelievably there is a revision without any commit message. When I wanted to fetch changesets, there was an exception (line that patched).

#3 Updated by Go MAEDA 11 months ago

Thank you, I understand the situation.

Can you please paste the error message in production.log?

#4 Updated by salman mp 11 months ago

Go MAEDA wrote:

Thank you, I understand the situation.

Can you please paste the error message in production.log?

Started GET "/projects/test/repository" for 31.57.0.155 at 2021-12-22 11:18:02 +0330
App 2260378 output: Processing by RepositoriesController#show as HTML
App 2260378 output:   Parameters: {"id"=>"test"}
App 2260378 output:   Current user: user (id=1)
App 2260378 output: Completed 500 Internal Server Error in 706ms (ActiveRecord: 6.4ms)
App 2260378 output:   
App 2260378 output: TypeError (no implicit conversion of nil into String):
App 2260378 output:   
App 2260378 output: lib/redmine/scm/adapters/mercurial_adapter.rb:233:in `unescape'
App 2260378 output: lib/redmine/scm/adapters/mercurial_adapter.rb:233:in `block in each_revision'
App 2260378 output: lib/redmine/scm/adapters/mercurial_adapter.rb:203:in `each'
App 2260378 output: lib/redmine/scm/adapters/mercurial_adapter.rb:203:in `each_revision'
App 2260378 output: app/models/repository/mercurial.rb:194:in `block in fetch_changesets'
App 2260378 output: app/models/repository/mercurial.rb:193:in `step'
App 2260378 output: app/models/repository/mercurial.rb:193:in `fetch_changesets'
App 2260378 output: app/controllers/repositories_controller.rb:87:in `show'
App 2260378 output: lib/redmine/sudo_mode.rb:61:in `sudo_mode'

#5 Updated by Yuichi HARADA 11 months ago

I have confirmed this issue. Applying the patch(empty_message.diff) solved it. thank you.
I created MercurialAdapterTest#test_empty_message because there was no test.

#6 Updated by Go MAEDA 11 months ago

  • Target version set to Candidate for next minor release

#7 Updated by Go MAEDA 5 months ago

  • Target version changed from Candidate for next minor release to 5.0.3

Setting the target version to 5.0.3.

#8 Updated by Future Link Corporation pkgsrc team 3 months ago

Any way we can get this merged ASAP? It's the only issue blocking 5.0.3. We're unable to upgrade our Redmine ATM, because pkgsrc has Rails 6.1.6.1 which is supported only by the next minor release.

#9 Updated by Go MAEDA 3 months ago

  • Status changed from New to Closed
  • Assignee set to Go MAEDA

Committed the patches. Thank you for your contribution.

#10 Updated by Go MAEDA 3 months ago

  • Status changed from Closed to Reopened

#11 Updated by Go MAEDA 3 months ago

  • Status changed from Reopened to Closed

#12 Updated by Go MAEDA 3 months ago

  • Tracker changed from Patch to Defect
  • Subject changed from Support revision without any message to Support revision without any message in Mercurial repositories
  • Resolution set to Fixed

Also available in: Atom PDF