annotate tests/testlib/common.sh @ 6884:053ce6e0b3b7 stable

tests: add a correct test header to test-tutorial.t Otherwise the title of the entire HTML doc is "Initial setup".
author Anton Shestakov <av6@dwimlabs.net>
date Wed, 02 Oct 2024 20:13:39 +0400
parents b1a04ff0f99e
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2119
e1c26c632b6d tests: adds simple test case for heads checking
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
1 . $TESTDIR/testlib/pythonpath.sh
e1c26c632b6d tests: adds simple test case for heads checking
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
2
e1c26c632b6d tests: adds simple test case for heads checking
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
3 mkcommit() {
6039
51249e4e9025 tests: port upstream 86f39a89b63e to our version of mkcommit()
Anton Shestakov <av6@dwimlabs.net>
parents: 5911
diff changeset
4 name="$1"
51249e4e9025 tests: port upstream 86f39a89b63e to our version of mkcommit()
Anton Shestakov <av6@dwimlabs.net>
parents: 5911
diff changeset
5 shift
51249e4e9025 tests: port upstream 86f39a89b63e to our version of mkcommit()
Anton Shestakov <av6@dwimlabs.net>
parents: 5911
diff changeset
6 echo "$name" > "$name"
51249e4e9025 tests: port upstream 86f39a89b63e to our version of mkcommit()
Anton Shestakov <av6@dwimlabs.net>
parents: 5911
diff changeset
7 hg add "$name"
51249e4e9025 tests: port upstream 86f39a89b63e to our version of mkcommit()
Anton Shestakov <av6@dwimlabs.net>
parents: 5911
diff changeset
8 hg ci -m "$name" "$@"
2119
e1c26c632b6d tests: adds simple test case for heads checking
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
9 }
e1c26c632b6d tests: adds simple test case for heads checking
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
10
e1c26c632b6d tests: adds simple test case for heads checking
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
11 getid() {
e1c26c632b6d tests: adds simple test case for heads checking
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
12 hg log --hidden --template '{node}\n' --rev "$1"
e1c26c632b6d tests: adds simple test case for heads checking
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
13 }
6041
6b7ef731141b tests: move the most often used glog alias to common.sh
Anton Shestakov <av6@dwimlabs.net>
parents: 6039
diff changeset
14
6b7ef731141b tests: move the most often used glog alias to common.sh
Anton Shestakov <av6@dwimlabs.net>
parents: 6039
diff changeset
15 cat >> $HGRCPATH << EOF
6b7ef731141b tests: move the most often used glog alias to common.sh
Anton Shestakov <av6@dwimlabs.net>
parents: 6039
diff changeset
16 [alias]
6043
b1a04ff0f99e tests: add \n to glog alias, just in case
Anton Shestakov <av6@dwimlabs.net>
parents: 6042
diff changeset
17 glog = log -GT "{rev}:{node|short} {desc}\n ({bookmarks}) {phase} {instabilities}\n"
6041
6b7ef731141b tests: move the most often used glog alias to common.sh
Anton Shestakov <av6@dwimlabs.net>
parents: 6039
diff changeset
18 EOF