scm-manager is breaking repository pushes via changes to hgrc file!

666 views
Skip to first unread message

Eric Rose

unread,
Jan 8, 2015, 5:24:50 PM1/8/15
to scmma...@googlegroups.com
Hi again Sebastian and all others,

It's me again... ;-)

When I import a bunch of my Mercurial repositories into scm-manager, it seems to add these lines to my hgrc files:

    [hooks]
    changegroup.scm = python:scmhooks.callback
    pretxnchangegroup.scm = python:scmhooks.callback

These lines break pushes to the repositories when other people try to push changes to the repos:

    transaction abort!
    rollback completed
    abort: pretxnchangegroup.scm hook is invalid (import of "scmhooks" failed)

I was able to fix the problem by simply deleting these lines from the hgrc file, but then when I restarted the scm-server service, it re-added them!

Why are these hooks failing? I'm not seeing any errors in the scm-log file (these errors are coming from Mercurial)

BTW, I'm on version 1.44, and using Mercurial

Any pointers or clues would be appreciated!

thanks!

-Eric


Sebastian Sdorra

unread,
Jan 9, 2015, 2:36:23 AM1/9/15
to scmma...@googlegroups.com
Removing those lines will break a lot of scm-manager functions. These hooks are the bridge between the mercurial hook system and the one of scm-manager (which is used by many functions and plugins). So you see removing those lines is not a solution.

The most common reason, why these hooks are failing, is a wrong configured reverse proxy. Do you use a reverse proxy? Which plugins do you have installed? Could you post the scm logs (/var/log/scm)?

Sebastian

--
You received this message because you are subscribed to the Google Groups "scmmanager" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scmmanager+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Michael Augustin

unread,
Feb 2, 2015, 9:57:40 AM2/2/15
to scmma...@googlegroups.com
Hi Eric,

the most common problem here may be your setup. You imported the repos into SCM-manager but write to them still via file interface and not through SCM-manager http-access.

The solution: Use SCM-manager URLs to read/write from this repositories, even if file access would be possible.

Kind regards,
Michael

Eric Rose

unread,
Feb 2, 2015, 11:42:04 AM2/2/15
to scmma...@googlegroups.com
Hi Michael,

Thanks for replying to this... The problem with this (for us), is that we already have an active development community. Restructuring the way everybody (including all our tools) accesses Mercurial would have been a big project.

I wound up not using scm-manager, and instead used ssh to access Mercurial for the few, new (remote) users that needed remote access.
This way, everyone local didn't have to change their way of doing things. And the remote people can easily access the necessary repositories over ssh, using the new syntax, which happily co-exists with people accessing the repository via NFS.

Here's a link to one of the best descriptions (I have found) of how to set it all up properly:
(in fact, this is part of a great, well-written Mercurial tutorial that covers many topics from this Mercurial consultant: http://mercurial.aragost.com/kick-start/en/)

Best regards,

-Eric
Reply all
Reply to author
Forward
0 new messages