New issue 289: Do not execute hook mercurial repository on version 0.3.3
https://bitbucket.org/conservancy/kallithea/issues/289/do-not-execute-hook-mercurial-repository

maxvinokuroff:

Text hgrc

```
#!bash
[hooks]
changegroup = /srv/kallithea/repos/puppet/maxhope/.hg/sync_maxhope_to_pm1.sh
```
Text sync_maxhope_to_pm1.sh

```
#!bash
#!/bin/sh

server_git="repo:5000"
server1="pm1"
#server2="pm2"
server_dir1="/etc/puppet/environments/production"
server_dir2="/etc/puppet/environments/testing"
server_user="root"
group_repo="puppet"
repo="maxhope"
BRANCH=$(hg log --template '{branch}' -r $HG_NODE)
#BRANCH=testing

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

        "testing")
        /usr/bin/ssh $server_user@$server1 "cd $server_dir2; /usr/bin/hg pull 
-u -f -b $BRANCH http://$server_git/$group_repo/$repo";
        ;;
esac
```
This hook executed on version 0.3.2 very well, but not execute on version 0.3.3.


_______________________________________________
kallithea-general mailing list
[email protected]
https://lists.sfconservancy.org/mailman/listinfo/kallithea-general

Reply via email to