comparison tests/test-check-commit-hg.t @ 22067:14306a686e71

test-check-commit-hg.t: automatically test all 'draft() and ::.' changesets We introduce a test-check-commit-hg.t file that will happily run the check-commit file on all draft changeset under the working directory. This should help newcomers to catch up with the rules. (And will helps old timer from time to time).
author Pierre-Yves David <pierre-yves.david@fb.com>
date Wed, 06 Aug 2014 01:40:51 -0700
parents
children fab9dda0f2a3
comparison
equal deleted inserted replaced
22059:d5cef58d8ec8 22067:14306a686e71
1 #require test-repo
2
3 Enable obsolescence to avoid the warning issue when obsmarker are found
4
5 $ cat > obs.py << EOF
6 > import mercurial.obsolete
7 > mercurial.obsolete._enabled = True
8 > EOF
9 $ echo '[extensions]' >> $HGRCPATH
10 $ echo "obs=${TESTTMP}/obs.py" >> $HGRCPATH
11
12 Go back in the hg repo
13
14 $ cd $TESTDIR/..
15
16 $ for node in `hg log --rev 'draft() and ::.' --template '{node|short}\n'`; do
17 > hg export $node | contrib/check-commit > ${TESTTMP}/check-commit.out
18 > if [ $? -ne 0 ]; then
19 > echo "Revision $node does not comply to commit message rules"
20 > echo '------------------------------------------------------'
21 > cat ${TESTTMP}/check-commit.out
22 > echo
23 > fi
24 > done
25
26