annotate tests/testlib/common.sh @ 6041:6b7ef731141b

tests: move the most often used glog alias to common.sh
author Anton Shestakov <av6@dwimlabs.net>
date Mon, 20 Sep 2021 20:47:31 +0300
parents 51249e4e9025
children 1cbafebe874b
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]
6b7ef731141b tests: move the most often used glog alias to common.sh
Anton Shestakov <av6@dwimlabs.net>
parents: 6039
diff changeset
17 glog = log -GT "{rev}:{node|short} {desc}\n ({bookmarks}) {phase}"
6b7ef731141b tests: move the most often used glog alias to common.sh
Anton Shestakov <av6@dwimlabs.net>
parents: 6039
diff changeset
18 EOF