Project

General

Profile

Actions

Defect #37659

open

Cannot access mercurial repositories

Added by Norbert Koch about 2 years ago. Updated about 2 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
Issues
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Affected version:

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'.


Files

redminehelper.py (8.68 KB) redminehelper.py seems to work with pythom 3.9 Norbert Koch, 2022-09-10 21:08
redminehelper.py.patch (10.8 KB) redminehelper.py.patch Patch against 5.0.2 Norbert Koch, 2022-09-10 21:08
redminehelper.py.patch (11 KB) redminehelper.py.patch Norbert Koch, 2022-09-11 12:42
redminehelper.py (8.69 KB) redminehelper.py Norbert Koch, 2022-09-11 12:42
Actions #1

Updated by Norbert Koch about 2 years ago

This is from production.log:

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

Actions #2

Updated by Norbert Koch about 2 years ago

Seems to be related to this #33784

Actions #3

Updated by Norbert Koch about 2 years ago

Python 3.9

Actions #4

Updated by Norbert Koch about 2 years 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.

Actions #5

Updated by Norbert Koch about 2 years ago

Some problems remaining in detail view.

Actions #6

Updated by Norbert Koch about 2 years ago

more testing & corrections

Actions #7

Updated by Michael Ssssssno about 2 years 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/

Actions #8

Updated by Michael Ssssssno about 2 years 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).

Actions

Also available in: Atom PDF