##// END OF EJS Templates
debugcommands: use command executor for invoking commands...
Gregory Szorc -
r37670:fe8c6f9f default
parent child Browse files
Show More
@@ -3001,7 +3001,9 def debugwireproto(ui, repo, path=None,
3001 3001 ui.status(_('remote output: %s\n') %
3002 3002 stringutil.escapestr(output))
3003 3003 else:
3004 res = peer._call(command, **pycompat.strkwargs(args))
3004 with peer.commandexecutor() as e:
3005 res = e.callcommand(command, args).result()
3006
3005 3007 ui.status(_('response: %s\n') % stringutil.pprint(res))
3006 3008
3007 3009 elif action == 'batchbegin':
@@ -211,7 +211,7 Test listkeys for listing namespaces
211 211 s> bookmarks\t\n
212 212 s> namespaces\t\n
213 213 s> phases\t
214 response: b'bookmarks\t\nnamespaces\t\nphases\t'
214 response: {b'bookmarks': b'', b'namespaces': b'', b'phases': b''}
215 215
216 216 Same thing, but with "httprequest" command
217 217
@@ -277,7 +277,7 Client with HTTPv2 enabled advertises th
277 277 s> Content-Length: 41\r\n
278 278 s> \r\n
279 279 s> 0000000000000000000000000000000000000000\n
280 response: b'0000000000000000000000000000000000000000\n'
280 response: [b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00']
281 281
282 282 $ killdaemons.py
283 283 $ enablehttpv2 empty
@@ -1367,7 +1367,7 Test listkeys for listing namespaces
1367 1367 o> bookmarks\t\n
1368 1368 o> namespaces\t\n
1369 1369 o> phases\t
1370 response: b'bookmarks\t\nnamespaces\t\nphases\t'
1370 response: {b'bookmarks': b'', b'namespaces': b'', b'phases': b''}
1371 1371
1372 1372 testing ssh2
1373 1373 creating ssh peer from handshake results
@@ -1398,7 +1398,7 Test listkeys for listing namespaces
1398 1398 o> bookmarks\t\n
1399 1399 o> namespaces\t\n
1400 1400 o> phases\t
1401 response: b'bookmarks\t\nnamespaces\t\nphases\t'
1401 response: {b'bookmarks': b'', b'namespaces': b'', b'phases': b''}
1402 1402
1403 1403 $ cd ..
1404 1404
@@ -1443,7 +1443,7 With no bookmarks set
1443 1443 i> flush() -> None
1444 1444 o> bufferedreadline() -> 2:
1445 1445 o> 0\n
1446 response: b''
1446 response: {}
1447 1447
1448 1448 testing ssh2
1449 1449 creating ssh peer from handshake results
@@ -1470,7 +1470,7 With no bookmarks set
1470 1470 i> flush() -> None
1471 1471 o> bufferedreadline() -> 2:
1472 1472 o> 0\n
1473 response: b''
1473 response: {}
1474 1474
1475 1475 With a single bookmark set
1476 1476
@@ -1505,7 +1505,7 With a single bookmark set
1505 1505 o> bufferedreadline() -> 3:
1506 1506 o> 46\n
1507 1507 o> bufferedread(46) -> 46: bookA\t68986213bd4485ea51533535e3fc9e78007a711f
1508 response: b'bookA\t68986213bd4485ea51533535e3fc9e78007a711f'
1508 response: {b'bookA': b'68986213bd4485ea51533535e3fc9e78007a711f'}
1509 1509
1510 1510 testing ssh2
1511 1511 creating ssh peer from handshake results
@@ -1533,7 +1533,7 With a single bookmark set
1533 1533 o> bufferedreadline() -> 3:
1534 1534 o> 46\n
1535 1535 o> bufferedread(46) -> 46: bookA\t68986213bd4485ea51533535e3fc9e78007a711f
1536 response: b'bookA\t68986213bd4485ea51533535e3fc9e78007a711f'
1536 response: {b'bookA': b'68986213bd4485ea51533535e3fc9e78007a711f'}
1537 1537
1538 1538 With multiple bookmarks set
1539 1539
@@ -1570,7 +1570,7 With multiple bookmarks set
1570 1570 o> bufferedread(93) -> 93:
1571 1571 o> bookA\t68986213bd4485ea51533535e3fc9e78007a711f\n
1572 1572 o> bookB\t1880f3755e2e52e3199e0ee5638128b08642f34d
1573 response: b'bookA\t68986213bd4485ea51533535e3fc9e78007a711f\nbookB\t1880f3755e2e52e3199e0ee5638128b08642f34d'
1573 response: {b'bookA': b'68986213bd4485ea51533535e3fc9e78007a711f', b'bookB': b'1880f3755e2e52e3199e0ee5638128b08642f34d'}
1574 1574
1575 1575 testing ssh2
1576 1576 creating ssh peer from handshake results
@@ -1600,7 +1600,7 With multiple bookmarks set
1600 1600 o> bufferedread(93) -> 93:
1601 1601 o> bookA\t68986213bd4485ea51533535e3fc9e78007a711f\n
1602 1602 o> bookB\t1880f3755e2e52e3199e0ee5638128b08642f34d
1603 response: b'bookA\t68986213bd4485ea51533535e3fc9e78007a711f\nbookB\t1880f3755e2e52e3199e0ee5638128b08642f34d'
1603 response: {b'bookA': b'68986213bd4485ea51533535e3fc9e78007a711f', b'bookB': b'1880f3755e2e52e3199e0ee5638128b08642f34d'}
1604 1604
1605 1605 Test pushkey for bookmarks
1606 1606
@@ -1646,7 +1646,7 Test pushkey for bookmarks
1646 1646 o> 2\n
1647 1647 o> bufferedread(2) -> 2:
1648 1648 o> 1\n
1649 response: b'1\n'
1649 response: True
1650 1650
1651 1651 testing ssh2
1652 1652 creating ssh peer from handshake results
@@ -1683,7 +1683,7 Test pushkey for bookmarks
1683 1683 o> 2\n
1684 1684 o> bufferedread(2) -> 2:
1685 1685 o> 1\n
1686 response: b'1\n'
1686 response: True
1687 1687
1688 1688 $ hg bookmarks
1689 1689 bookA 0:68986213bd44
@@ -1729,7 +1729,7 Phases on empty repo
1729 1729 o> bufferedreadline() -> 3:
1730 1730 o> 15\n
1731 1731 o> bufferedread(15) -> 15: publishing\tTrue
1732 response: b'publishing\tTrue'
1732 response: {b'publishing': b'True'}
1733 1733
1734 1734 testing ssh2
1735 1735 creating ssh peer from handshake results
@@ -1757,7 +1757,7 Phases on empty repo
1757 1757 o> bufferedreadline() -> 3:
1758 1758 o> 15\n
1759 1759 o> bufferedread(15) -> 15: publishing\tTrue
1760 response: b'publishing\tTrue'
1760 response: {b'publishing': b'True'}
1761 1761
1762 1762 Create some commits
1763 1763
@@ -1811,7 +1811,7 Two draft heads
1811 1811 o> 20b8a89289d80036e6c4e87c2083e3bea1586637\t1\n
1812 1812 o> c4750011d906c18ea2f0527419cbc1a544435150\t1\n
1813 1813 o> publishing\tTrue
1814 response: b'20b8a89289d80036e6c4e87c2083e3bea1586637\t1\nc4750011d906c18ea2f0527419cbc1a544435150\t1\npublishing\tTrue'
1814 response: {b'20b8a89289d80036e6c4e87c2083e3bea1586637': b'1', b'c4750011d906c18ea2f0527419cbc1a544435150': b'1', b'publishing': b'True'}
1815 1815
1816 1816 testing ssh2
1817 1817 creating ssh peer from handshake results
@@ -1842,7 +1842,7 Two draft heads
1842 1842 o> 20b8a89289d80036e6c4e87c2083e3bea1586637\t1\n
1843 1843 o> c4750011d906c18ea2f0527419cbc1a544435150\t1\n
1844 1844 o> publishing\tTrue
1845 response: b'20b8a89289d80036e6c4e87c2083e3bea1586637\t1\nc4750011d906c18ea2f0527419cbc1a544435150\t1\npublishing\tTrue'
1845 response: {b'20b8a89289d80036e6c4e87c2083e3bea1586637': b'1', b'c4750011d906c18ea2f0527419cbc1a544435150': b'1', b'publishing': b'True'}
1846 1846
1847 1847 Single draft head
1848 1848
@@ -1879,7 +1879,7 Single draft head
1879 1879 o> bufferedread(58) -> 58:
1880 1880 o> c4750011d906c18ea2f0527419cbc1a544435150\t1\n
1881 1881 o> publishing\tTrue
1882 response: b'c4750011d906c18ea2f0527419cbc1a544435150\t1\npublishing\tTrue'
1882 response: {b'c4750011d906c18ea2f0527419cbc1a544435150': b'1', b'publishing': b'True'}
1883 1883
1884 1884 testing ssh2
1885 1885 creating ssh peer from handshake results
@@ -1909,7 +1909,7 Single draft head
1909 1909 o> bufferedread(58) -> 58:
1910 1910 o> c4750011d906c18ea2f0527419cbc1a544435150\t1\n
1911 1911 o> publishing\tTrue
1912 response: b'c4750011d906c18ea2f0527419cbc1a544435150\t1\npublishing\tTrue'
1912 response: {b'c4750011d906c18ea2f0527419cbc1a544435150': b'1', b'publishing': b'True'}
1913 1913
1914 1914 All public heads
1915 1915
@@ -1944,7 +1944,7 All public heads
1944 1944 o> bufferedreadline() -> 3:
1945 1945 o> 15\n
1946 1946 o> bufferedread(15) -> 15: publishing\tTrue
1947 response: b'publishing\tTrue'
1947 response: {b'publishing': b'True'}
1948 1948
1949 1949 testing ssh2
1950 1950 creating ssh peer from handshake results
@@ -1972,7 +1972,7 All public heads
1972 1972 o> bufferedreadline() -> 3:
1973 1973 o> 15\n
1974 1974 o> bufferedread(15) -> 15: publishing\tTrue
1975 response: b'publishing\tTrue'
1975 response: {b'publishing': b'True'}
1976 1976
1977 1977 Setting public phase via pushkey
1978 1978
@@ -2021,7 +2021,7 Setting public phase via pushkey
2021 2021 o> 2\n
2022 2022 o> bufferedread(2) -> 2:
2023 2023 o> 1\n
2024 response: b'1\n'
2024 response: True
2025 2025
2026 2026 testing ssh2
2027 2027 creating ssh peer from handshake results
@@ -2059,7 +2059,7 Setting public phase via pushkey
2059 2059 o> 2\n
2060 2060 o> bufferedread(2) -> 2:
2061 2061 o> 1\n
2062 response: b'1\n'
2062 response: True
2063 2063
2064 2064 $ hg phase .
2065 2065 4: public
General Comments 0
You need to be logged in to leave comments. Login now