annotate tests/test-check-commit.t @ 6768:9737dfad23ba mercurial-5.0

test-compat: merge mercurial-5.1 into mercurial-5.0
author Anton Shestakov <av6@dwimlabs.net>
date Thu, 11 Apr 2024 16:03:31 -0300
parents cdf929e69cde
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
6692
cdf929e69cde test-compat: merge mercurial-5.2 into mercurial-5.1
Anton Shestakov <av6@dwimlabs.net>
parents: 5652
diff changeset
3 Mercurial 5.1 has a really outdated contrib/check-commit compared to the
cdf929e69cde test-compat: merge mercurial-5.2 into mercurial-5.1
Anton Shestakov <av6@dwimlabs.net>
parents: 5652
diff changeset
4 current commit and code standards in evolve
cdf929e69cde test-compat: merge mercurial-5.2 into mercurial-5.1
Anton Shestakov <av6@dwimlabs.net>
parents: 5652
diff changeset
5
cdf929e69cde test-compat: merge mercurial-5.2 into mercurial-5.1
Anton Shestakov <av6@dwimlabs.net>
parents: 5652
diff changeset
6 $ exit 80
cdf929e69cde test-compat: merge mercurial-5.2 into mercurial-5.1
Anton Shestakov <av6@dwimlabs.net>
parents: 5652
diff changeset
7
5652
ccde78088d0b tests: update the experimental.evolution=all comment
Anton Shestakov <av6@dwimlabs.net>
parents: 5651
diff changeset
8 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
9
f7ce3b9167d6 tests: add the commit style checker from Mercurial
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
10 $ 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
11 > [experimental]
c7abe71d749d tests: move experimental.evolution=all config option closer to the comment
Anton Shestakov <av6@dwimlabs.net>
parents: 2672
diff changeset
12 > 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
13 > [diff]
a08bd434a19b test: avoid 'test-check-commit.t' complaining copied code
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2335
diff changeset
14 > git = yes
2335
f7ce3b9167d6 tests: add the commit style checker from Mercurial
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
15 > EOF
f7ce3b9167d6 tests: add the commit style checker from Mercurial
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
16
f7ce3b9167d6 tests: add the commit style checker from Mercurial
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
17 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
18
f7ce3b9167d6 tests: add the commit style checker from Mercurial
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
19 $ cd $TESTDIR/..
f7ce3b9167d6 tests: add the commit style checker from Mercurial
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
20
f7ce3b9167d6 tests: add the commit style checker from Mercurial
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
21 $ for node in `hg log --rev 'not public() and ::. and not desc("# no-check-commit")' --template '{node|short}\n'`; do
f7ce3b9167d6 tests: add the commit style checker from Mercurial
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
22 > hg export $node | ${RUNTESTDIR}/../contrib/check-commit > ${TESTTMP}/check-commit.out
f7ce3b9167d6 tests: add the commit style checker from Mercurial
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
23 > if [ $? -ne 0 ]; then
f7ce3b9167d6 tests: add the commit style checker from Mercurial
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
24 > 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
25 > echo '------------------------------------------------------'
f7ce3b9167d6 tests: add the commit style checker from Mercurial
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
26 > 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
27 > echo
f7ce3b9167d6 tests: add the commit style checker from Mercurial
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
28 > fi
f7ce3b9167d6 tests: add the commit style checker from Mercurial
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
29 > done