Mercurial > evolve
annotate tests/test-check-commit.t @ 6853:753e378208b7 stable
tests: use testrepohg in test-check-commit.t
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Sun, 13 Oct 2024 17:39:40 +0400 |
parents | ccde78088d0b |
children | 03fe10eb9f2d |
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 |
2672
a08bd434a19b
test: avoid 'test-check-commit.t' complaining copied code
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
2335
diff
changeset
|
10 > [diff] |
a08bd434a19b
test: avoid 'test-check-commit.t' complaining copied code
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
2335
diff
changeset
|
11 > git = yes |
2335
f7ce3b9167d6
tests: add the commit style checker from Mercurial
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
12 > EOF |
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 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
|
15 |
f7ce3b9167d6
tests: add the commit style checker from Mercurial
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
16 $ cd $TESTDIR/.. |
f7ce3b9167d6
tests: add the commit style checker from Mercurial
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
17 |
6853
753e378208b7
tests: use testrepohg in test-check-commit.t
Anton Shestakov <av6@dwimlabs.net>
parents:
5652
diff
changeset
|
18 $ for node in `testrepohg log --rev 'not public() and ::. and not desc("# no-check-commit")' --template '{node|short}\n'`; do |
753e378208b7
tests: use testrepohg in test-check-commit.t
Anton Shestakov <av6@dwimlabs.net>
parents:
5652
diff
changeset
|
19 > testrepohg export $node | ${RUNTESTDIR}/../contrib/check-commit > ${TESTTMP}/check-commit.out |
2335
f7ce3b9167d6
tests: add the commit style checker from Mercurial
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
20 > if [ $? -ne 0 ]; then |
f7ce3b9167d6
tests: add the commit style checker from Mercurial
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
21 > echo "Revision $node does not comply with rules" |
f7ce3b9167d6
tests: add the commit style checker from Mercurial
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
22 > echo '------------------------------------------------------' |
f7ce3b9167d6
tests: add the commit style checker from Mercurial
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
23 > cat ${TESTTMP}/check-commit.out |
f7ce3b9167d6
tests: add the commit style checker from Mercurial
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
24 > echo |
f7ce3b9167d6
tests: add the commit style checker from Mercurial
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
25 > fi |
f7ce3b9167d6
tests: add the commit style checker from Mercurial
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
26 > done |