Mercurial > evolve
annotate tests/testlib/common.sh @ 6135:ce7da767c7f6 stable
evolve: make _computeobsoleteset() return a frozenset
Let's make sure that obsolete.getrevs(repo, b'obsolete') returns a frozenset to
be compatible with Mercurial 6.1. This shouldn't produce any issues on older
versions, because I doubt anything tries to modify a set of obsolete revisions
by calling .add() or .remove() directly on it.
See 27fe84a8dd60 and c7e675848027 in core.
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Fri, 11 Feb 2022 18:10:51 +0300 |
parents | b1a04ff0f99e |
children |
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 |