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