[PATCH 2 of 3] testlib: allow more argument to mkcommit

Pierre-Yves David pierre-yves.david at ens-lyon.org
Wed Sep 25 07:07:19 EDT 2019


# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at octobus.net>
# Date 1569409031 -7200
#      Wed Sep 25 12:57:11 2019 +0200
# Node ID ddbb9bccf64e004e6e7ee5912b701c732f8a4435
# Parent  8a8b17fc108c6859633ea810935a123cb7937530
# EXP-Topic enforce-single-head
# Available At https://bitbucket.org/octobus/mercurial-devel/
#              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r ddbb9bccf64e
testlib: allow more argument to mkcommit

This is simple and handy. See next changesets for usage.

diff --git a/tests/testlib/obsmarker-common.sh b/tests/testlib/obsmarker-common.sh
--- a/tests/testlib/obsmarker-common.sh
+++ b/tests/testlib/obsmarker-common.sh
@@ -1,7 +1,9 @@
 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() {


More information about the Mercurial-devel mailing list