hg debugpeer <path> will establish a connection to a peer repository
and print information about it.
If you add --debug, it will log low-level protocol request info. This
will be useful for upcoming tests around protocol handshaking.
( )
yuja |
hg-reviewers |
hg debugpeer <path> will establish a connection to a peer repository
and print information about it.
If you add --debug, it will log low-level protocol request info. This
will be useful for upcoming tests around protocol handshaking.
Automatic diff as part of commit; lint not applicable. |
Automatic diff as part of commit; unit tests not applicable. |
Path | Packages | |||
---|---|---|---|---|
M | mercurial/debugcommands.py (19 lines) | |||
M | tests/test-completion.t (2 lines) | |||
M | tests/test-debugcommands.t (21 lines) | |||
M | tests/test-help.t (1 line) |
for spec in specs: | for spec in specs: | ||||
f, d = complete(spec, acceptable or 'nmar') | f, d = complete(spec, acceptable or 'nmar') | ||||
files.update(f) | files.update(f) | ||||
dirs.update(d) | dirs.update(d) | ||||
files.update(dirs) | files.update(dirs) | ||||
ui.write('\n'.join(repo.pathto(p, cwd) for p in sorted(files))) | ui.write('\n'.join(repo.pathto(p, cwd) for p in sorted(files))) | ||||
ui.write('\n') | ui.write('\n') | ||||
@command('debugpeer', [], _('PATH'), norepo=True) | |||||
def debugpeer(ui, path): | |||||
"""establish a connection to a peer repository""" | |||||
# Always enable peer request logging. Requires --debug to display | |||||
# though. | |||||
overrides = { | |||||
('devel', 'debug.peer-request'): True, | |||||
} | |||||
with ui.configoverride(overrides): | |||||
peer = hg.peer(ui, {}, path) | |||||
local = peer.local() is not None | |||||
canpush = peer.canpush() | |||||
ui.write(_('url: %s\n') % peer.url()) | |||||
ui.write(_('local: %s\n') % (_('yes') if local else _('no'))) | |||||
ui.write(_('pushable: %s\n') % (_('yes') if canpush else _('no'))) | |||||
@command('debugpickmergetool', | @command('debugpickmergetool', | ||||
[('r', 'rev', '', _('check for files in this revision'), _('REV')), | [('r', 'rev', '', _('check for files in this revision'), _('REV')), | ||||
('', 'changedelete', None, _('emulate merging change and delete')), | ('', 'changedelete', None, _('emulate merging change and delete')), | ||||
] + cmdutil.walkopts + cmdutil.mergetoolopts, | ] + cmdutil.walkopts + cmdutil.mergetoolopts, | ||||
_('[PATTERN]...'), | _('[PATTERN]...'), | ||||
inferrepo=True) | inferrepo=True) | ||||
def debugpickmergetool(ui, repo, *pats, **opts): | def debugpickmergetool(ui, repo, *pats, **opts): | ||||
"""examine which merge tool is chosen for specified file | """examine which merge tool is chosen for specified file |
debuginstall | debuginstall | ||||
debugknown | debugknown | ||||
debuglabelcomplete | debuglabelcomplete | ||||
debuglocks | debuglocks | ||||
debugmergestate | debugmergestate | ||||
debugnamecomplete | debugnamecomplete | ||||
debugobsolete | debugobsolete | ||||
debugpathcomplete | debugpathcomplete | ||||
debugpeer | |||||
debugpickmergetool | debugpickmergetool | ||||
debugpushkey | debugpushkey | ||||
debugpvec | debugpvec | ||||
debugrebuilddirstate | debugrebuilddirstate | ||||
debugrebuildfncache | debugrebuildfncache | ||||
debugrename | debugrename | ||||
debugrevlog | debugrevlog | ||||
debugrevspec | debugrevspec | ||||
debuginstall: template | debuginstall: template | ||||
debugknown: | debugknown: | ||||
debuglabelcomplete: | debuglabelcomplete: | ||||
debuglocks: force-lock, force-wlock, set-lock, set-wlock | debuglocks: force-lock, force-wlock, set-lock, set-wlock | ||||
debugmergestate: | debugmergestate: | ||||
debugnamecomplete: | debugnamecomplete: | ||||
debugobsolete: flags, record-parents, rev, exclusive, index, delete, date, user, template | debugobsolete: flags, record-parents, rev, exclusive, index, delete, date, user, template | ||||
debugpathcomplete: full, normal, added, removed | debugpathcomplete: full, normal, added, removed | ||||
debugpeer: | |||||
debugpickmergetool: rev, changedelete, include, exclude, tool | debugpickmergetool: rev, changedelete, include, exclude, tool | ||||
debugpushkey: | debugpushkey: | ||||
debugpvec: | debugpvec: | ||||
debugrebuilddirstate: rev, minimal | debugrebuilddirstate: rev, minimal | ||||
debugrebuildfncache: | debugrebuildfncache: | ||||
debugrename: rev | debugrename: rev | ||||
debugrevlog: changelog, manifest, dir, dump | debugrevlog: changelog, manifest, dir, dump | ||||
debugrevspec: optimize, show-revs, show-set, show-stage, no-optimized, verify-optimized | debugrevspec: optimize, show-revs, show-set, show-stage, no-optimized, verify-optimized |
phases | phases | ||||
heads | heads | ||||
pushkey | pushkey | ||||
remote-changegroup | remote-changegroup | ||||
http | http | ||||
https | https | ||||
stream | stream | ||||
v2 | v2 | ||||
Test debugpeer | |||||
$ hg --config ui.ssh="\"$PYTHON\" \"$TESTDIR/dummyssh\"" debugpeer ssh://user@dummy/debugrevlog | |||||
url: ssh://user@dummy/debugrevlog | |||||
local: no | |||||
pushable: yes | |||||
$ hg --config ui.ssh="\"$PYTHON\" \"$TESTDIR/dummyssh\"" --debug debugpeer ssh://user@dummy/debugrevlog | |||||
running "*" "*/tests/dummyssh" 'user@dummy' 'hg -R debugrevlog serve --stdio' (glob) | |||||
devel-peer-request: hello | |||||
sending hello command | |||||
devel-peer-request: between | |||||
devel-peer-request: pairs: 81 bytes | |||||
sending between command | |||||
remote: 384 | |||||
remote: capabilities: lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 $USUAL_BUNDLE2_CAPS_SERVER$ unbundle=HG10GZ,HG10BZ,HG10UN | |||||
remote: 1 | |||||
url: ssh://user@dummy/debugrevlog | |||||
local: no | |||||
pushable: yes |
complete "names" - tags, open branch names, bookmark names | complete "names" - tags, open branch names, bookmark names | ||||
debugobsolete | debugobsolete | ||||
create arbitrary obsolete marker | create arbitrary obsolete marker | ||||
debugoptADV (no help text available) | debugoptADV (no help text available) | ||||
debugoptDEP (no help text available) | debugoptDEP (no help text available) | ||||
debugoptEXP (no help text available) | debugoptEXP (no help text available) | ||||
debugpathcomplete | debugpathcomplete | ||||
complete part or all of a tracked path | complete part or all of a tracked path | ||||
debugpeer establish a connection to a peer repository | |||||
debugpickmergetool | debugpickmergetool | ||||
examine which merge tool is chosen for specified file | examine which merge tool is chosen for specified file | ||||
debugpushkey access the pushkey key/value protocol | debugpushkey access the pushkey key/value protocol | ||||
debugpvec (no help text available) | debugpvec (no help text available) | ||||
debugrebuilddirstate | debugrebuilddirstate | ||||
rebuild the dirstate as it would look like for the given | rebuild the dirstate as it would look like for the given | ||||
revision | revision | ||||
debugrebuildfncache | debugrebuildfncache |