test-serve: make the 'listening at *' lines optional
The daemonized serve process doesn't print these lines out (see 448d0c452140).
I was able to get it to with the following hack:
diff --git a/mercurial/win32.py b/mercurial/win32.py
--- a/mercurial/win32.py
+++ b/mercurial/win32.py
@@ -418,6 +418,11 @@
return str(ppid)
def spawndetached(args):
+
+ import subprocess
+ return subprocess.Popen(args, cwd=pycompat.getcwd(), env=encoding.environ,
+ creationflags=subprocess.CREATE_NEW_PROCESS_GROUP).pid
+
# No standard library function really spawns a fully detached
# process under win32 because they allocate pipes or other objects
# to handle standard streams communications. Passing these objects
However, MSYS translates --prefixes starting with '/' to 'C:/MinGW/msys/1.0',
which changes the output. The output isn't so important that I want to spend a
bunch of time on this, and risk breaking some subtle behavior of `hg serve -d`
with the more complicated code.
Minimal hgk check
$ echo "[extensions]" >> $HGRCPATH
$ echo "hgk=" >> $HGRCPATH
$ hg init repo
$ cd repo
$ echo a > a
$ hg ci -Am adda
adding a
$ hg debug-cat-file commit 0
tree a0c8bcbbb45c
parent 000000000000
author test 0 0
revision 0
branch default
phase draft
adda
$ echo b > b
$ hg ci -Am addb
adding b
$ hg log -T '{node}\n'
102a90ea7b4a3361e4082ed620918c261189a36a
07f4944404050f47db2e5c5071e0e84e7a27bba9
$ hg debug-diff-tree 07f494440405 102a90ea7b4a
:000000 100664 000000000000 1e88685f5dde N b b
$ hg debug-diff-tree 07f494440405 102a90ea7b4a --patch
diff --git a/b b/b
new file mode 100644
--- /dev/null
+++ b/b
@@ -0,0 +1,1 @@
+b
Ensure that diff-tree output isn't affected by diffopts
$ hg --config diff.noprefix=True debug-diff-tree 07f494440405 102a90ea7b4a
:000000 100664 000000000000 1e88685f5dde N b b
$ hg --config diff.noprefix=True debug-diff-tree --patch 07f494440405 102a90ea7b4a
diff --git a/b b/b
new file mode 100644
--- /dev/null
+++ b/b
@@ -0,0 +1,1 @@
+b
$ cd ..