Mercurial > hg
annotate tests/test-check-commit.t @ 33299:41448fc51510
sparse: variable to track if sparse is enabled
Currently, the sparse extension sniffs repo instances for
attributes defined by the sparse extension to determine if
sparse is enabled. As we move code away from repo instances,
these checks will be a bit more brittle.
We introduce a module-level variable to track whether sparse is
enabled as a temporary workaround.
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Thu, 06 Jul 2017 12:06:37 -0700 |
parents | ddd65b4f3ae6 |
children | 8872d46643b6 |
rev | line source |
---|---|
22067
14306a686e71
test-check-commit-hg.t: automatically test all 'draft() and ::.' changesets
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
1 #require test-repo |
14306a686e71
test-check-commit-hg.t: automatically test all 'draft() and ::.' changesets
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
2 |
14306a686e71
test-check-commit-hg.t: automatically test all 'draft() and ::.' changesets
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
3 Enable obsolescence to avoid the warning issue when obsmarker are found |
14306a686e71
test-check-commit-hg.t: automatically test all 'draft() and ::.' changesets
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
4 |
29219
3c9066ed557c
tests: silence test-repo obsolete warning
timeless <timeless@mozdev.org>
parents:
28293
diff
changeset
|
5 $ . "$TESTDIR/helpers-testrepo.sh" |
22067
14306a686e71
test-check-commit-hg.t: automatically test all 'draft() and ::.' changesets
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
6 |
14306a686e71
test-check-commit-hg.t: automatically test all 'draft() and ::.' changesets
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
7 Go back in the hg repo |
14306a686e71
test-check-commit-hg.t: automatically test all 'draft() and ::.' changesets
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
8 |
14306a686e71
test-check-commit-hg.t: automatically test all 'draft() and ::.' changesets
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
9 $ cd $TESTDIR/.. |
14306a686e71
test-check-commit-hg.t: automatically test all 'draft() and ::.' changesets
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
10 |
33204
ddd65b4f3ae6
tests: alias syshg and syshgenv so they can be switched conditionally
Yuya Nishihara <yuya@tcha.org>
parents:
33116
diff
changeset
|
11 $ for node in `testrepohg log --rev 'not public() and ::. and not desc("# no-check-commit")' --template '{node|short}\n'`; do |
ddd65b4f3ae6
tests: alias syshg and syshgenv so they can be switched conditionally
Yuya Nishihara <yuya@tcha.org>
parents:
33116
diff
changeset
|
12 > testrepohg export --git $node \ |
ddd65b4f3ae6
tests: alias syshg and syshgenv so they can be switched conditionally
Yuya Nishihara <yuya@tcha.org>
parents:
33116
diff
changeset
|
13 > | contrib/check-commit > ${TESTTMP}/check-commit.out |
22067
14306a686e71
test-check-commit-hg.t: automatically test all 'draft() and ::.' changesets
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
14 > if [ $? -ne 0 ]; then |
28293
a22b6fa5a844
tests: minor grammar change for check-commit
timeless <timeless@mozdev.org>
parents:
27756
diff
changeset
|
15 > echo "Revision $node does not comply with rules" |
22067
14306a686e71
test-check-commit-hg.t: automatically test all 'draft() and ::.' changesets
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
16 > echo '------------------------------------------------------' |
14306a686e71
test-check-commit-hg.t: automatically test all 'draft() and ::.' changesets
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
17 > cat ${TESTTMP}/check-commit.out |
14306a686e71
test-check-commit-hg.t: automatically test all 'draft() and ::.' changesets
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
18 > echo |
14306a686e71
test-check-commit-hg.t: automatically test all 'draft() and ::.' changesets
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
19 > fi |
14306a686e71
test-check-commit-hg.t: automatically test all 'draft() and ::.' changesets
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
20 > done |
14306a686e71
test-check-commit-hg.t: automatically test all 'draft() and ::.' changesets
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
21 |
14306a686e71
test-check-commit-hg.t: automatically test all 'draft() and ::.' changesets
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
22 |