diff tests/_exc-util.sh @ 832:46e81a5d2d94

exchange: add test case for A.3 Allow arbitrary arguments to dotest. This allow to push --force when the push creates more heads.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Mon, 03 Mar 2014 14:59:43 -0800
parents a6af6919888d
children 001f8508910a
line wrap: on
line diff
--- a/tests/_exc-util.sh	Mon Mar 03 14:03:41 2014 -0800
+++ b/tests/_exc-util.sh	Mon Mar 03 14:59:43 2014 -0800
@@ -43,7 +43,11 @@
 # dotest TESTNAME [TARGETNODE]
 
     testcase=$1
-    target="$2"
+    shift
+    target="$1"
+    if [ $# -gt 0 ]; then
+        shift
+    fi
     targetnode=""
     desccall=""
     cd $testcase
@@ -63,10 +67,10 @@
 
     if [ -n "$target" ]; then
         echo "## pushing \"$target\"" from main to pushdest
-        hg -R main push -r "$desccall" pushdest
+        hg -R main push -r "$desccall" $@ pushdest
     else
         echo "## pushing from main to pushdest"
-        hg -R main push pushdest
+        hg -R main push pushdest $@
     fi
     echo "## post push state"
     echo "# obstore: main"
@@ -77,10 +81,10 @@
     hg -R pulldest debugobsolete
     if [ -n "$target" ]; then
         echo "## pulling \"$targetnode\"" from main into pulldest
-        hg -R pulldest pull -r $targetnode main
+        hg -R pulldest pull -r $targetnode $@ main
     else
         echo "## pulling from main into pulldest"
-        hg -R pulldest pull main
+        hg -R pulldest pull main $@
     fi
     echo "## post pull state"
     echo "# obstore: main"