# HG changeset patch # User Yuya Nishihara # Date 1411827266 -32400 # Node ID 892b2b8c1b500f454187584a28f42f9918a393e3 # Parent a94594f5d52fb7941c8e2e8de23f080dd6c597a1 test-commandserver: allow check() to make connection in different way The next patch will add connector for 'unix' mode server. diff -r a94594f5d52f -r 892b2b8c1b50 contrib/hgclient.py --- 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: