##// END OF EJS Templates
cmdserver: include pid of server handling requests in hello message...
Yuya Nishihara -
r23036:19f5273c default
parent child Browse files
Show More
@@ -232,6 +232,8 b' class server(object):'
232 hellomsg = 'capabilities: ' + ' '.join(sorted(self.capabilities))
232 hellomsg = 'capabilities: ' + ' '.join(sorted(self.capabilities))
233 hellomsg += '\n'
233 hellomsg += '\n'
234 hellomsg += 'encoding: ' + encoding.encoding
234 hellomsg += 'encoding: ' + encoding.encoding
235 hellomsg += '\n'
236 hellomsg += 'pid: %d' % os.getpid()
235
237
236 # write the hello msg in -one- chunk
238 # write the hello msg in -one- chunk
237 self.cout.write(hellomsg)
239 self.cout.write(hellomsg)
@@ -16,7 +16,7 b''
16 ... # run an arbitrary command to make sure the next thing the server
16 ... # run an arbitrary command to make sure the next thing the server
17 ... # sends isn't part of the hello message
17 ... # sends isn't part of the hello message
18 ... runcommand(server, ['id'])
18 ... runcommand(server, ['id'])
19 o, 'capabilities: getencoding runcommand\nencoding: *' (glob)
19 o, 'capabilities: getencoding runcommand\nencoding: *\npid: *' (glob)
20 *** runcommand id
20 *** runcommand id
21 000000000000 tip
21 000000000000 tip
22
22
@@ -531,7 +531,7 b' start without repository:'
531 ... # run an arbitrary command to make sure the next thing the server
531 ... # run an arbitrary command to make sure the next thing the server
532 ... # sends isn't part of the hello message
532 ... # sends isn't part of the hello message
533 ... runcommand(server, ['id'])
533 ... runcommand(server, ['id'])
534 o, 'capabilities: getencoding runcommand\nencoding: *' (glob)
534 o, 'capabilities: getencoding runcommand\nencoding: *\npid: *' (glob)
535 *** runcommand id
535 *** runcommand id
536 abort: there is no Mercurial repository here (.hg not found)
536 abort: there is no Mercurial repository here (.hg not found)
537 [255]
537 [255]
@@ -562,7 +562,7 b' unix domain socket:'
562 ... print '%c, %r' % (ch, data)
562 ... print '%c, %r' % (ch, data)
563 ... runcommand(conn, ['id'])
563 ... runcommand(conn, ['id'])
564 >>> check(hellomessage, server.connect)
564 >>> check(hellomessage, server.connect)
565 o, 'capabilities: getencoding runcommand\nencoding: *' (glob)
565 o, 'capabilities: getencoding runcommand\nencoding: *\npid: *' (glob)
566 *** runcommand id
566 *** runcommand id
567 eff892de26ec tip bm1/bm2/bm3
567 eff892de26ec tip bm1/bm2/bm3
568 >>> def unknowncommand(conn):
568 >>> def unknowncommand(conn):
General Comments 0
You need to be logged in to leave comments. Login now