diff tests/testlib/common.sh @ 6039:51249e4e9025

tests: port upstream 86f39a89b63e to our version of mkcommit() Now we can use it with --close-branch or --secret, for example.
author Anton Shestakov <av6@dwimlabs.net>
date Mon, 20 Sep 2021 19:48:47 +0300
parents 55589cb47581
children 6b7ef731141b
line wrap: on
line diff
--- a/tests/testlib/common.sh	Sun Sep 12 20:49:21 2021 +0300
+++ b/tests/testlib/common.sh	Mon Sep 20 19:48:47 2021 +0300
@@ -1,9 +1,11 @@
 . $TESTDIR/testlib/pythonpath.sh
 
 mkcommit() {
-   echo "$1" > "$1"
-   hg add "$1"
-   hg ci -m "$1"
+   name="$1"
+   shift
+   echo "$name" > "$name"
+   hg add "$name"
+   hg ci -m "$name" "$@"
 }
 
 getid() {