test-commandserver: allow check() to make connection in different way
The next patch will add connector for 'unix' mode server.
--- a/contrib/hgclient.py Sat Sep 27 22:39:01 2014 +0900
+++ b/contrib/hgclient.py Sat Sep 27 23:14:26 2014 +0900
@@ -2,7 +2,7 @@
import sys, struct, subprocess, cStringIO
-def connect(path=None):
+def connectpipe(path=None):
cmdline = ['hg', 'serve', '--cmdserver', 'pipe']
if path:
cmdline += ['-R', path]
@@ -62,7 +62,7 @@
if ch.isupper():
return
-def check(func):
+def check(func, connect=connectpipe):
sys.stdout.flush()
server = connect()
try: