valentina/scripts/commithook
Roman Telezhynskyi b029cb8af4 Mercurial hooks.
--HG--
branch : develop
2016-11-01 11:28:46 +02:00

24 lines
368 B
Bash
Executable file

#!/bin/sh
# Commit hook. Helps update bookmark.
# Put this file in your path.
#
# Edit file .hg/hgrc
#
# [hooks]
# commit = commithook
DEVELOP_BRANCH="develop"
RELEASE_BRANCH="release"
CURRENT_BRANCH=$(hg branch)
if [ $CURRENT_BRANCH = $DEVELOP_BRANCH ];
then
hg bookmark -f master;
fi
if [ $CURRENT_BRANCH = $RELEASE_BRANCH ];
then
hg bookmark -f release;
fi