Mercurial - push pretxnchangegroup.scm hook failed

When i try to push a changeset to remote repository is failing with the following message: pretxnchangegroup.scm hook failed

2023-07-27 17:16:34.054 [HgHookWorker-1] [7ITlEB6O718] ERROR sonia.scm.repository.spi.HgHookChangesetProvider - could not retrieve changesets
org.javahg.internals.RuntimeIOException: Input length = 1
at org.javahg.internals.Utils.asRuntime(
at org.javahg.internals.Utils.decodeBytes(
at org.javahg.internals.Utils.decodeBytes(
at org.javahg.internals.HgInputStream.textUpTo(

Caused by: java.nio.charset.MalformedInputException: Input length = 1
at java.base/java.nio.charset.CoderResult.throwException(
at java.base/java.nio.charset.CharsetDecoder.decode(
at org.javahg.internals.Utils.decodeBytes(
… 37 common frames omitted
2023-07-27 17:16:34.079 [HgHookWorker-1] [7ITlEB6O718] WARN sonia.scm.repository.hooks.DefaultHookHandler - unknown error on hook occurred
java.lang.NullPointerException: null
at sonia.scm.repository.api.HgHookBranchProvider.changesets(
at sonia.scm.repository.api.HgHookBranchProvider.collect(
at sonia.scm.repository.api.HgHookBranchProvider.getDeletedOrClosed(
at sonia.scm.repository.DefaultBranchDeleteProtection.protectDefaultBranch(

Found this errors on logs. Not sure the reason.

  • SCM-Manager version and installed package: 2.45.2

Any tips on whats causing this issue?


Does this only occur for one repository or each hg repo on your scm-server? Seems like your push doesn’t contain a branch? What exactly are you trying to push?

Hi Eduard,

I’m trying to push some files to my repo. This is only happening on one of my repos. I clone this repo and try to push only one file and it works. I suspect this is being caused by one of the files.

Hi Eduard,

After some tests i found the issue. I was trying to push a file with accent. Filename: “test cópia.xml”

SCM Manager doesn’t support filenames with accent’s?

Hey, sorry for the late response.

Yes, this seems to be the cause. We have an similar issue on GitHub but could not fix it yet.

Here some further information regarding that topic: EncodingStrategy - Mercurial