equal
deleted
inserted
replaced
5 # format to stdout. |
5 # format to stdout. |
6 # |
6 # |
7 # $ ./hg serve --cmds pipe | ./contrib/debugcmdserver.py - |
7 # $ ./hg serve --cmds pipe | ./contrib/debugcmdserver.py - |
8 # o, 52 -> 'capabilities: getencoding runcommand\nencoding: UTF-8' |
8 # o, 52 -> 'capabilities: getencoding runcommand\nencoding: UTF-8' |
9 |
9 |
10 import sys, struct |
10 from __future__ import absolute_import, print_function |
|
11 import struct |
|
12 import sys |
11 |
13 |
12 if len(sys.argv) != 2: |
14 if len(sys.argv) != 2: |
13 print 'usage: debugcmdserver.py FILE' |
15 print('usage: debugcmdserver.py FILE') |
14 sys.exit(1) |
16 sys.exit(1) |
15 |
17 |
16 outputfmt = '>cI' |
18 outputfmt = '>cI' |
17 outputfmtsize = struct.calcsize(outputfmt) |
19 outputfmtsize = struct.calcsize(outputfmt) |
18 |
20 |