infra/codestorage/hg-ssh

Paddy 2015-10-14 Parent:bc0c83d5015d

4:1b1ca7817a10 Go to Latest

infra/codestorage/hg-ssh/post-commit-broadcast.sh

Set trust settings to avoid annoying message. Update the hgrc to trust the .hgrc files of everyone in the committers group, because I got tired of seeing the "not trusting file /mounted/repos/blah-blah/.hg/hgrc from untrusted user root, group committers" message every time I pushed.

History
1 #!/bin/bash
3 cwd=`/bin/pwd`
4 me=`whoami`
5 stripped=${cwd#/home/$me/repos/}
7 if [ $stripped = $cwd ]
8 then
9 stripped=${cwd#/mounted/repos/}
10 fi
12 if [ $stripped = $cwd ]
13 then
14 echo "Can't get repo name from ${cwd} aborting"
15 exit 0
16 fi
18 FRONTENDS=$(dig mercurial-uwsgi-headless +short +search)
19 for fe in $FRONTENDS
20 do
21 hg push http://${fe}:8080/${stripped}
22 done
24 exit 0