Importing an existing Mercurial repository

I’m new to SCM-Manager using 4.20.0 on Windows and I’m trying to import an existing mercurial repository.
Tried three ways. new repository, clone, pull, push, import from hgweb and import zip of .hg folder.
All fail and I’m guessing at a configuration issue. Is there any information about how to configure SCM-Manager and my Mercurial install to get them to work together ?

Thanks Tim

Hey Tim,

could you describe what exactly fails? Do you get any kind of stacktraces in your server log?

Regarding your HG configuration you can check your global settings:

Do HG repositories work in general besides your imports?

Regards, Eduard

hi Eduard,
I think I was trying to run before I could walk :frowning:
My hg binary is at C:\Program Files\TortoiseHg\hg.exe
I tried again to just create a repository and initialize it
Got error …
Error: Could not modify repository
The requested modification to the repository was rejected. The most likely reason for this are checks from plugins. Please check your settings. See the following messages for more details:
unknown error
Repository: scmadmin/Utils
Transaction ID EUTPVVsZd10
Error Code CHRM7IQzo1 (64.0 KB)
Attached are my log files.
I’m sure I’ve not set something correctly


Thanks for the logs.

Your error is unknown revision 'b47b074e9e506bef0b532ef7ac91e5aca7a1d00d'.

Which version of Mercurial and which SCM-Manager plugins are you using? Do you have any custom HG extensions installed?

Hi, I’ve got the plugins it installed legacy, git, mercurial and subversion. The only plugin I’ve added is the one for LDAP
The version of hg.exe is 6.2.3 it’s the 64 bit version does SCM need the 32 bit one?
I don’t know about custom hg extensions I just use it inside TortoiseHg. I’m wondering if my lack of knowledge about how to configure HG is my problem

Do you have a reason to use tortoiseHG instead of mercurial? I think this could be the issue. Could you install mercurial and try this binary instead?

Hi, tried Mercurial 6.3.1 and appears to be the same result . (49.7 KB)
Stupid question … Should it work or is this something that’s not supported on the Windows version of SCM ?

There are no stupid questions. :grin:

SCM-Manager supports all features on Windows. As far as i know there should be no restrictions by today.

We will try to reproduce this error on our machines and get back to you asap.

Could you please try to import this example repository?

It could be that you have to provide credentials. Just use any credentials since this repository is public.

Hi, With fake credentials it worked, so must be something wrong with my multi branch big respository.
In the meantime I found and enabled the setting <logger name="org.javahg" level="DEBUG" />
Attached is the log of trying to create a respository and the two goes to import the hello one. (53.5 KB)
I may well be reading it wrong but it looks as if the first file is pushed into a work sub folder respository but never committed/pulled back into the real one ?


Hey Tim,

We are still unsure where these errors are coming from on your end. To rule out a configuration error, you could start the SCM-Manager with Docker and try to import your repository there. If this does not help, we would be grateful if you could provide us with a sample repository so that we can search in more depth.

Guide for Docker:

Thanks for the reply.
It turns out I can’t use docker without changing the bios on the PC which is 50 miles away.

So stuck on Windows I’ve tried again with following your instructions at (25.3 KB)

The zip contains the log and the text of the commands I used.
I get the same error as before.

In the meantime I’m rebuilding my Ubuntu VirtualBox image, may well be tomorrrow before its upto date :slight_smile:

Hi, It turns out that it’s the OS that’s the problem.
SCM-Manger cannot create/update Mercurial repositories on Windows Server 2019.

I guess my question now is, did I pick the only Microsoft OS it doesn’t work on or does it fail on all versions of Windows Server?

I didn’t spot anything in the documentation about supported versions of Windows, so can I suggest that it’s updated.

Thanks Tim

Hey Tim,

generally speaking SCM-Manager should support (almost) all features on Windows. Mercurial should be no exception here. One of our team member develops SCM-Manager on a Windows (10?) machine. We will check the compatibility with different Windows distribution and try to find a solution.

By the way, could you provide us the actual error or some more information?

Regards, Eduard

Hi, All the logs and errors I’ve attached and reported are from Server 2019 machines.
Attached is a zip of creating and init a mercurial respository on both Windows 10 (that works) and Server 2019 (which fails).
The text of the error message is …

Error: Could not modify repository

The requested modification to the repository was rejected. The most likely reason for this are checks from plugins. Please check your settings. See the following messages for more details:

unknown error


  • Repository: scmadmin/Test

Transaction ID 4FTQ4tflC11

Error Code CHRM7IQzo1

What else do you need?


1 Like

Sorry forgot to add the zip (24.4 KB)

I think that should be enough for now. Thank you very much for the details.

Since we are going on Christmas break soon, it might take some time to figure out where exactly the error is coming from. At the moment, it looks like the internal Mercurial process is blocked or restricted and therefore could not resolve the revision properly (file access problem?).

It could also be that the encoding which your Windows Server is enforcing does not work with your Mercurial. Maybe try to change your system default encoding?

We need more testing here…

Hi, I’ve been testing on desktop versions of Windows with the same version of scm-manager hg.exe and JRE I can create and initialise a mercurial repository on Windows 10 but not Windows 11 .
Attached a zip of both attempts (19.7 KB)