Defect #37659

Cannot access mercurial repositories

Added by Norbert Koch 24 days ago. Updated 13 days ago.

Status:ResolvedStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Issues
Target version:-
Resolution: Affected version:5.0.2

Description

I have a running but old redmine configuration using sqlite3 as database:
  • FreeBSD9.1, Redmine 2.8.9, Ruby 2.1.8, Rails 3.2.22.1, thin 1.6.4, Mercurial 3.7.2, Sqlite 3.10.2
I migrated to a different system:
  • FreeBSD13.1, Redmine 5.0.2, Ruby 3.0.4, Rails 6.1.6, thin 1.8.1, Mercurial 6.1.4, Sqlite 3.39.2

After copying attachments and the database file and running db:migrate without errors all looks good,
with one exception:
I cannot access any existing or cloned Mercurial repository in either an existing or a new project.

Redmine always responds with 'The entry or revision was not found in the repository'.

redminehelper.py Magnifier - seems to work with pythom 3.9 (8.68 KB) Norbert Koch, 2022-09-10 21:08

redminehelper.py.patch Magnifier - Patch against 5.0.2 (10.8 KB) Norbert Koch, 2022-09-10 21:08

redminehelper.py.patch Magnifier (11 KB) Norbert Koch, 2022-09-11 12:42

redminehelper.py Magnifier (8.69 KB) Norbert Koch, 2022-09-11 12:42

History

#1 Updated by Norbert Koch 24 days ago

This is from production.log:

hg: error during getting info: hg exited with non-zero status: 255

#2 Updated by Norbert Koch 23 days ago

Seems to be related to this #33784

#3 Updated by Norbert Koch 23 days ago

Python 3.9

#4 Updated by Norbert Koch 23 days ago

I've run 2to3.9 over redminehelper.py from redmine 5.0.2 and then applied the patch from #33784 with some manual work. This works for me afaics, but I did not yet test it in all details.

#5 Updated by Norbert Koch 22 days ago

Some problems remaining in detail view.

#6 Updated by Norbert Koch 22 days ago

more testing & corrections

#7 Updated by Michael Ssssssno 20 days ago

thank you
With this it seems to work for me too (on ubuntu 22.04 server with redmine 5.0.2 and mercurial 6.1.1).
I could not run the patch but I just copied your file redminehelper.py into the directory lib/redmine/scm/adapters/mercurial/

#8 Updated by Michael Ssssssno 13 days ago

I had another small problem with one of the reprositories (1 of 20)

The apache error message when accessing the repositry page in redmine was:
App 24173 output: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xfc in position 23: invalid start byte

After the hint here
https://stackoverflow.com/questions/19699367/for-line-in-results-in-unicodedecodeerror-utf-8-codec-cant-decode-byte
I replaced 'utf-8' in the redminehelper.py file with 'ISO-8859-1' and everything worked (including the previous repos).

Also available in: Atom PDF