1. Sebastian Sebastian
  2. scm-manager
  3. Issues


Issue #163 resolved

Unable to push remotely

created an issue

I have an issue in relation to the following hook:

pretxnchangegroup.scm = python:scmhooks.callback

When this is disabled my pushes go through fine but when enabled I am getting an error of Mercurial/Python process ends with return code 1

Local pushes work fine and disabling this hook also works fine. SCM Manager is running as an apache proxy in the attached example although I have tried it running on it's own too with the same result.

Attached section of log file at the point of error.


Comments (12)

  1. MikeHudson reporter

    Tried that and same result so to remove the proxy from the equation I have switched over to accessing the server directly on port 81. Same result with debug info attached.

    Removed the hook as described above from hgrc: pretxnchangegroup.scm = python:scmhooks.callback

    Pushed again with success and debug info from that also attached (notice an error but the push did complete OK)

  2. Sebastian Sebastian repo owner

    Ok here is the problem:

    remote: error: changegroup.scm hook raised an exception: addinfourl instance has no attribute 'code'

    The same error is raised from the pretxnchangegroup hook and that is why your push failed.

    Which version of python do you use with scm-manager?

  3. Sebastian Sebastian repo owner

    Could you please try the following. Start scm-manager and edit the file lib/python/scmhooks.py in the scm-manager home directory as described below:

    Search the following line:

    import os, urllib

    and replace it with:

    import os, urllib, urllib2

    Search the line:

          conn = urllib.urlopen(url, data);

    and replace it with:

          conn = urllib2.urlopen(url, data);

    Please try the push with active hooks again.

    Note: SCM-Manager rewrite the files in lib/python on every start.

  4. Log in to comment