annotate tests/testlib/common.sh @ 6053:be2008649675

branching: preserve test changes on stable CORE-TEST-OUTPUT-UPDATE: 5ced12cfa41b CORE-TEST-OUTPUT-UPDATE: 5105a9975407
author Anton Shestakov <av6@dwimlabs.net>
date Tue, 12 Oct 2021 10:19:05 +0300
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