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

login
register
mail settings
Submitter Pierre-Yves David
Date Sept. 25, 2019, 11:07 a.m.
Message ID <ddbb9bccf64e004e6e7e.1569409639@nodosa.octobus.net>
Download mbox | patch
Permalink /patch/41753/
State Accepted
Headers show

Comments

Pierre-Yves David - Sept. 25, 2019, 11:07 a.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@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.

Patch

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() {