annotate tests/test-check-commit.t @ 6926:e4777a1d0655 stable

Added tag 11.1.5 for changeset 6219898ee0ad
author Anton Shestakov <av6@dwimlabs.net>
date Sat, 26 Oct 2024 10:26:00 +0400
parents 03fe10eb9f2d
children 6859ed744625
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2335
f7ce3b9167d6 tests: add the commit style checker from Mercurial
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
1 #require test-repo
f7ce3b9167d6 tests: add the commit style checker from Mercurial
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
2
6853
753e378208b7 tests: use testrepohg in test-check-commit.t
Anton Shestakov <av6@dwimlabs.net>
parents: 5652
diff changeset
3 $ . "$RUNTESTDIR/helpers-testrepo.sh"
753e378208b7 tests: use testrepohg in test-check-commit.t
Anton Shestakov <av6@dwimlabs.net>
parents: 5652
diff changeset
4
5652
ccde78088d0b tests: update the experimental.evolution=all comment
Anton Shestakov <av6@dwimlabs.net>
parents: 5651
diff changeset
5 Enable obsolescence to avoid the warning issue when obsmarkers are found
2335
f7ce3b9167d6 tests: add the commit style checker from Mercurial
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
6
f7ce3b9167d6 tests: add the commit style checker from Mercurial
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
7 $ cat << EOF >> $HGRCPATH
5651
c7abe71d749d tests: move experimental.evolution=all config option closer to the comment
Anton Shestakov <av6@dwimlabs.net>
parents: 2672
diff changeset
8 > [experimental]
c7abe71d749d tests: move experimental.evolution=all config option closer to the comment
Anton Shestakov <av6@dwimlabs.net>
parents: 2672
diff changeset
9 > evolution = all
2335
f7ce3b9167d6 tests: add the commit style checker from Mercurial
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
10 > EOF
f7ce3b9167d6 tests: add the commit style checker from Mercurial
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
11
f7ce3b9167d6 tests: add the commit style checker from Mercurial
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
12 Go back in the hg repo
f7ce3b9167d6 tests: add the commit style checker from Mercurial
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
13
f7ce3b9167d6 tests: add the commit style checker from Mercurial
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
14 $ cd $TESTDIR/..
f7ce3b9167d6 tests: add the commit style checker from Mercurial
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
15
6854
03fe10eb9f2d tests: update test-check-commit.t with changes from the upstream version
Anton Shestakov <av6@dwimlabs.net>
parents: 6853
diff changeset
16 $ REVSET='not public() and ::. and not desc("# no-check-commit")'
03fe10eb9f2d tests: update test-check-commit.t with changes from the upstream version
Anton Shestakov <av6@dwimlabs.net>
parents: 6853
diff changeset
17
03fe10eb9f2d tests: update test-check-commit.t with changes from the upstream version
Anton Shestakov <av6@dwimlabs.net>
parents: 6853
diff changeset
18 $ mkdir "$TESTTMP/p"
03fe10eb9f2d tests: update test-check-commit.t with changes from the upstream version
Anton Shestakov <av6@dwimlabs.net>
parents: 6853
diff changeset
19 $ REVS=`testrepohg log -r "$REVSET" -T.`
03fe10eb9f2d tests: update test-check-commit.t with changes from the upstream version
Anton Shestakov <av6@dwimlabs.net>
parents: 6853
diff changeset
20 $ if [ -n "$REVS" ] ; then
03fe10eb9f2d tests: update test-check-commit.t with changes from the upstream version
Anton Shestakov <av6@dwimlabs.net>
parents: 6853
diff changeset
21 > testrepohg export --git -o "$TESTTMP/p/%n-%h" -r "$REVSET"
03fe10eb9f2d tests: update test-check-commit.t with changes from the upstream version
Anton Shestakov <av6@dwimlabs.net>
parents: 6853
diff changeset
22 > for f in `ls "$TESTTMP/p"`; do
03fe10eb9f2d tests: update test-check-commit.t with changes from the upstream version
Anton Shestakov <av6@dwimlabs.net>
parents: 6853
diff changeset
23 > "$RUNTESTDIR/../contrib/check-commit" < "$TESTTMP/p/$f" > "$TESTTMP/check-commit.out"
03fe10eb9f2d tests: update test-check-commit.t with changes from the upstream version
Anton Shestakov <av6@dwimlabs.net>
parents: 6853
diff changeset
24 > if [ $? -ne 0 ]; then
03fe10eb9f2d tests: update test-check-commit.t with changes from the upstream version
Anton Shestakov <av6@dwimlabs.net>
parents: 6853
diff changeset
25 > node="${f##*-}"
03fe10eb9f2d tests: update test-check-commit.t with changes from the upstream version
Anton Shestakov <av6@dwimlabs.net>
parents: 6853
diff changeset
26 > echo "Revision $node does not comply with rules"
03fe10eb9f2d tests: update test-check-commit.t with changes from the upstream version
Anton Shestakov <av6@dwimlabs.net>
parents: 6853
diff changeset
27 > echo '------------------------------------------------------'
03fe10eb9f2d tests: update test-check-commit.t with changes from the upstream version
Anton Shestakov <av6@dwimlabs.net>
parents: 6853
diff changeset
28 > cat ${TESTTMP}/check-commit.out
03fe10eb9f2d tests: update test-check-commit.t with changes from the upstream version
Anton Shestakov <av6@dwimlabs.net>
parents: 6853
diff changeset
29 > echo
03fe10eb9f2d tests: update test-check-commit.t with changes from the upstream version
Anton Shestakov <av6@dwimlabs.net>
parents: 6853
diff changeset
30 > fi
03fe10eb9f2d tests: update test-check-commit.t with changes from the upstream version
Anton Shestakov <av6@dwimlabs.net>
parents: 6853
diff changeset
31 > done
03fe10eb9f2d tests: update test-check-commit.t with changes from the upstream version
Anton Shestakov <av6@dwimlabs.net>
parents: 6853
diff changeset
32 > fi