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(Utils.java:438)
at org.javahg.internals.Utils.decodeBytes(Utils.java:244)
at org.javahg.internals.Utils.decodeBytes(Utils.java:224)
at org.javahg.internals.HgInputStream.textUpTo(HgInputStream.java:430)

Caused by: java.nio.charset.MalformedInputException: Input length = 1
at java.base/java.nio.charset.CoderResult.throwException(CoderResult.java:274)
at java.base/java.nio.charset.CharsetDecoder.decode(CharsetDecoder.java:813)
at org.javahg.internals.Utils.decodeBytes(Utils.java:242)
… 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(HgHookBranchProvider.java:115)
at sonia.scm.repository.api.HgHookBranchProvider.collect(HgHookBranchProvider.java:125)
at sonia.scm.repository.api.HgHookBranchProvider.getDeletedOrClosed(HgHookBranchProvider.java:89)
at sonia.scm.repository.DefaultBranchDeleteProtection.protectDefaultBranch(DefaultBranchDeleteProtection.java:57)

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?

Thanks

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