Mercurial hooks.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2016-11-01 11:28:46 +02:00
parent d134e8b367
commit b029cb8af4
2 changed files with 34 additions and 0 deletions

23
scripts/commithook Executable file
View File

@ -0,0 +1,23 @@
#!/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

11
scripts/outgoinghook Normal file
View File

@ -0,0 +1,11 @@
#!/bin/sh
# Commit hook. Helps update bookmark.
# Put this file in your path.
#
# Edit file .hg/hgrc
#
# [hooks]
# outgoing = outgoinghook
hg push -f git+ssh://git@github.com/dismine/Valentina.git