Symbolic link in hg repository path prevents push
If the Mercurial repository directory contains a symbolic link, cloning the repository works well, but push fails with the following error message:
10:03:20.791 [http-8080-8] ERROR sonia.scm.web.HgHookCallbackServlet - could not find repository ories/hg/playhg 10:03:20.798 [Thread-54] WARN sonia.scm.web.cgi.DefaultCGIExecutor - abort: pretxnchangegroup.scm hook failed
The repository path on the Linux machine contains a symbolic link, say /srv/screpos is a link /srv/screpos -> /mnt/nas/screpos. SCM manager is installed as Tomcat webapp, scm_home points to /srv/screpos/scm-manager. The Mercurial repository directory is /srv/screpos/scm-manager/repositories/hg, my project is named 'playhg'. Everything (repo creation, settings, clone) works until it comes to push.
The problem seems to be that the repository path is incorrectly computed, maybe in HgHookCallbackServlet.getRepositoryName, the error is issued in HgHookCallbackServlet.fireHook.
If the Mercurial repository path containing the symbolic link is replaced by the resolved absolute path, the problem goes away and it works. In this example it means to replace /srv/screpos/scm-manager/repositories/hg with /mnt/nas/screpos/scm-manager/repositories/hg to resolve the issue.