changeset 22992:892b2b8c1b50

test-commandserver: allow check() to make connection in different way The next patch will add connector for 'unix' mode server.
author Yuya Nishihara <yuya@tcha.org>
date Sat, 27 Sep 2014 23:14:26 +0900
parents a94594f5d52f
children 24c5fd2894f8
files contrib/hgclient.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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: