[PATCH 5 of 7] test-commandserver: allow check() to make connection in different way

Yuya Nishihara yuya at tcha.org
Sat Oct 4 05:52:28 CDT 2014


# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1411827266 -32400
#      Sat Sep 27 23:14:26 2014 +0900
# Node ID 48d895c10d39e370d1029e24119441aaf5ae898e
# Parent  a2ce71101853ef1eff92b301304b86ba25fb5b90
test-commandserver: allow check() to make connection in different way

The next patch will add connector for 'unix' mode server.

diff --git a/contrib/hgclient.py b/contrib/hgclient.py
--- a/contrib/hgclient.py
+++ b/contrib/hgclient.py
@@ -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 @@ def runcommand(server, args, output=sys.
             if ch.isupper():
                 return
 
-def check(func):
+def check(func, connect=connectpipe):
     sys.stdout.flush()
     server = connect()
     try:


More information about the Mercurial-devel mailing list