[wait-for-feedback] Do not execute hook mercurial repository on version 0.3.3

Issue #289 closed
maxvinokuroff created an issue

Text hgrc

changegroup = /srv/kallithea/repos/puppet/maxhope/.hg/sync_maxhope_to_pm1.sh

Text sync_maxhope_to_pm1.sh


BRANCH=$(hg log --template '{branch}' -r $HG_NODE)

case "$BRANCH" in 
        /usr/bin/ssh $server_user@$server1 "cd $server_dir1; /usr/bin/hg pull -u -f -b $BRANCH http://$server_git/$group_repo/$repo"

        /usr/bin/ssh $server_user@$server1 "cd $server_dir2; /usr/bin/hg pull -u -f -b $BRANCH http://$server_git/$group_repo/$repo"

This hook executed on version 0.3.2 very well, but not execute on version 0.3.3.

Comments (14)

  1. Andrej Shadura

    I'm not sure hgrc hooks were ever really supported. @kiilerix, @domruf? The only change which touched something near that was cce5a8388cde… but it is not clear to me how that could affect hooks.

  2. maxvinokuroff reporter

    I am downgrade to 0.3.2 and now all work. Снимок экрана - 03.08.2017 - 00:45:59.png And more that's worked about two years. Git hooks worked too, but I don't checking for version 0.3.3.

  3. Andrej Shadura

    Thanks for that observation, but working and being supported are two different things. However, let's wait for Dominik and Mads to respond.

  4. domruf

    I'm writing this from my mobile, so I can't check it right now. But I guess the used mercurial version may play a role in this.

  5. maxvinokuroff reporter
    repo ~ # uname -a
    Linux repo.hid.maxhope.in.ua 3.16.0-4-amd64 #1 SMP Debian 3.16.43-2+deb8u1 (2017-06-18) x86_64 GNU/Linux
    repo ~ # dpkg -l | grep mercurial
    ii  mercurial                  3.1.2-2+deb8u3                   amd64        easy-to-use, scalable distributed version control system
    ii  mercurial-common           3.1.2-2+deb8u3                   all          easy-to-use, scalable distributed version control system (common files)

    I use Debian 8 old-stable, version mercurial from main repository. All time since 2015 made two security update. Link Text I think version mercurial in this case don't make sense.

  6. domruf

    I now tried to reproduce the problem on windows and on ubuntu 17.04. But on both systems changegroup and prechangegroup hooks got executed when configured in hgrc file. So I'm afraid I need more information.

    How did you install and run Kallithea?

    Did you use virtualenv?

    Did you upgrade from an old Kallithea version or was this a new installation?

    Are there any other differences between the 0.3.3 and the 0.3.2 installation?

    Can you try it with the following, very simple hook?

    prechangegroup = (>&2 echo "my message") && /bin/false
  7. maxvinokuroff reporter

    I install Kallithea use puppet module

      "name": "rauch-kallithea",
      "version": "0.3.0",
      "author": "Robert Rauch (GNS Systems)",
      "summary": "Manage Kallithea, a free source code management system",
      "license": "Apache-2.0",
      "source": "https://github.com/rauchrob/puppet-kallithea",

    That module create virtualenv in home directory user kallithea path /srv/kallithea. Create site.pp next parameters:

    class { 'kallithea':
      version     => '0.3.2',
      admin_mail  => 'kallithea@exempla.org',
      admin_pass  => 'admin_passwd',
      manage_git  => true,
      seed_db     => true,
      config_hash => {
        'DEFAULT'     => {
          'debug'          => false,
          'app_email_from' => 'Kallithea <kallithea@exempla.org>',
          'smtp_server'    => 'smtp.exempla.org',
          'smtp_username'  => 'kallithea@exempla.org',
          'smtp_password'  => 'passwd_smtp',
          'smtp_port'      => '25',
          'smtp_auth'      => 'PLAIN',
        'server:main' => {
          'host' => '',
          'port' => '5000',
        'app:main'    => {
          'force_https'        => true,
          'use_htsts'          => true,
          #'lang'               => 'ru',
          'sqlalchemy.db1.url' => 'postgresql://user_db:passw_db@ip_db/name_db',

    With this module you can exactly replicate my environment. Install the puppet. Create directory 'modules' copy the module in that directory and run about this command

    puppet apply site.pp --modulepath=./modules
  8. maxvinokuroff reporter

    I may create test node with version 0.3.3 and give access. Give me yours pub key for ssh.

  9. domruf

    @kiilerix @andrew_shadura I have no clue about puppet. Can one of you take a look at this?

    @maxvinokuroff what about my other questions?

  10. domruf

    I still can't reproduce your problem.

    I did the following on my ubuntu system:

    1. puppet module install rauch/kallithea
    2. create kallithea.pp like above but I used a sqlite database, used version 0.3.3 and host
    3. sudo puppet apply kallithea.pp --modulepath=./.puppet/etc/code/modules/ There were some warnings and an error but I continued
    4. cd /srv/kallithea/
    5. . venv/bin/activate
    6. since I have no ssl I changed force_https = false in kallithea.ini
    7. paster serve kallithea.ini
    8. create a repository
    9. create /srv/kallithea/repos/myrepo/.hg/hgrc with
    prechangegroup = (>&2 echo "my message") && /bin/false

    Now when trying to push something to the repository it correctly fails because of the hook.

  11. maxvinokuroff reporter

    How did you install and run Kallithea? I install in clean new lxc container with Puppet deployment instruments.

    Did you use virtualenv? Yes, this module create virtualenv.

    Did you upgrade from an old Kallithea version or was this a new installation? No, I install new instance.

    Are there any other differences between the 0.3.3 and the 0.3.2 installation? I will install two node, and make diff.

  12. Log in to comment