##// END OF EJS Templates
debugcommands: introduce debugpeer command...
Gregory Szorc -
r35947:5f029d03 default
parent child Browse files
Show More
@@ -1693,6 +1693,25 b' def debugpathcomplete(ui, repo, *specs, '
1693 ui.write('\n'.join(repo.pathto(p, cwd) for p in sorted(files)))
1693 ui.write('\n'.join(repo.pathto(p, cwd) for p in sorted(files)))
1694 ui.write('\n')
1694 ui.write('\n')
1695
1695
1696 @command('debugpeer', [], _('PATH'), norepo=True)
1697 def debugpeer(ui, path):
1698 """establish a connection to a peer repository"""
1699 # Always enable peer request logging. Requires --debug to display
1700 # though.
1701 overrides = {
1702 ('devel', 'debug.peer-request'): True,
1703 }
1704
1705 with ui.configoverride(overrides):
1706 peer = hg.peer(ui, {}, path)
1707
1708 local = peer.local() is not None
1709 canpush = peer.canpush()
1710
1711 ui.write(_('url: %s\n') % peer.url())
1712 ui.write(_('local: %s\n') % (_('yes') if local else _('no')))
1713 ui.write(_('pushable: %s\n') % (_('yes') if canpush else _('no')))
1714
1696 @command('debugpickmergetool',
1715 @command('debugpickmergetool',
1697 [('r', 'rev', '', _('check for files in this revision'), _('REV')),
1716 [('r', 'rev', '', _('check for files in this revision'), _('REV')),
1698 ('', 'changedelete', None, _('emulate merging change and delete')),
1717 ('', 'changedelete', None, _('emulate merging change and delete')),
@@ -102,6 +102,7 b' Show debug commands if there are no othe'
102 debugnamecomplete
102 debugnamecomplete
103 debugobsolete
103 debugobsolete
104 debugpathcomplete
104 debugpathcomplete
105 debugpeer
105 debugpickmergetool
106 debugpickmergetool
106 debugpushkey
107 debugpushkey
107 debugpvec
108 debugpvec
@@ -281,6 +282,7 b' Show all commands + options'
281 debugnamecomplete:
282 debugnamecomplete:
282 debugobsolete: flags, record-parents, rev, exclusive, index, delete, date, user, template
283 debugobsolete: flags, record-parents, rev, exclusive, index, delete, date, user, template
283 debugpathcomplete: full, normal, added, removed
284 debugpathcomplete: full, normal, added, removed
285 debugpeer:
284 debugpickmergetool: rev, changedelete, include, exclude, tool
286 debugpickmergetool: rev, changedelete, include, exclude, tool
285 debugpushkey:
287 debugpushkey:
286 debugpvec:
288 debugpvec:
@@ -381,3 +381,24 b' Test debugcapabilities command:'
381 https
381 https
382 stream
382 stream
383 v2
383 v2
384
385 Test debugpeer
386
387 $ hg --config ui.ssh="\"$PYTHON\" \"$TESTDIR/dummyssh\"" debugpeer ssh://user@dummy/debugrevlog
388 url: ssh://user@dummy/debugrevlog
389 local: no
390 pushable: yes
391
392 $ hg --config ui.ssh="\"$PYTHON\" \"$TESTDIR/dummyssh\"" --debug debugpeer ssh://user@dummy/debugrevlog
393 running "*" "*/tests/dummyssh" 'user@dummy' 'hg -R debugrevlog serve --stdio' (glob)
394 devel-peer-request: hello
395 sending hello command
396 devel-peer-request: between
397 devel-peer-request: pairs: 81 bytes
398 sending between command
399 remote: 384
400 remote: capabilities: lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 $USUAL_BUNDLE2_CAPS_SERVER$ unbundle=HG10GZ,HG10BZ,HG10UN
401 remote: 1
402 url: ssh://user@dummy/debugrevlog
403 local: no
404 pushable: yes
@@ -948,6 +948,7 b' Test list of internal help commands'
948 debugoptEXP (no help text available)
948 debugoptEXP (no help text available)
949 debugpathcomplete
949 debugpathcomplete
950 complete part or all of a tracked path
950 complete part or all of a tracked path
951 debugpeer establish a connection to a peer repository
951 debugpickmergetool
952 debugpickmergetool
952 examine which merge tool is chosen for specified file
953 examine which merge tool is chosen for specified file
953 debugpushkey access the pushkey key/value protocol
954 debugpushkey access the pushkey key/value protocol
General Comments 0
You need to be logged in to leave comments. Login now