Hiya Mike ,
On 24/09/14 00:35, Mike Duigou wrote:
Hello all;

This is a one line change to the hgforest command to pass the command line 
options to the serve command. This is mostly useful for passing --port option

https://bugs.openjdk.java.net/browse/JDK-8059000

Mike

diff --git a/common/bin/hgforest.sh b/common/bin/hgforest.sh
--- a/common/bin/hgforest.sh
+++ b/common/bin/hgforest.sh
@@ -297,7 +297,7 @@ if [ "${command}" = "serve" ] ; then
        echo "serving root repo ${serving}" > ${status_output}
echo "hg${global_opts} serve" > ${status_output}
-      (PYTHONUNBUFFERED=true hg${global_opts} serve -A ${status_output} -E ${status_output} --pid-file 
${tmp}/serve.pid --web-conf ${tmp}/serve.web-conf; echo "$?" > ${tmp}/serve.pid.rc ) 
2>&1 &
+      (PYTHONUNBUFFERED=true hg${global_opts} serve -A ${status_output} -E ${status_output} --pid-file 
${tmp}/serve.pid --web-conf ${tmp}/serve.web-conf ${command_args}; echo "$?" > 
${tmp}/serve.pid.rc ) 2>&1 &
      ) 2>&1 | sed -e "s@^@serve:   @" > ${status_output}
    ) &
  else

As a non-reviewer, it looks good, but I would ask whether 'hg${global_opts}' would be better written as 'hg ${global_opts' i.e. with the additional whitespace between the hg command and any global options ? Just a thought ...

--
​Dave Pointon FIAP MBCS - Contractor engaged by IBM

Now I saw, tho' too late, the folly of beginning a work before we count the 
cost and
before we we judge rightly of our strength to go thro' with it - Robinson Crusoe

Reply via email to