Mercurial > public > mercurial-scm > hg
comparison mercurial/debugcommands.py @ 50942:ad9b7017ca22
debugcapabilities: migrate `opts` to native kwargs
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Mon, 21 Aug 2023 16:51:07 -0400 |
parents | 2a7dba8658a7 |
children | 4135e7271b9e |
comparison
equal
deleted
inserted
replaced
50941:2a7dba8658a7 | 50942:ad9b7017ca22 |
---|---|
482 | 482 |
483 | 483 |
484 @command(b'debugcapabilities', [], _(b'PATH'), norepo=True) | 484 @command(b'debugcapabilities', [], _(b'PATH'), norepo=True) |
485 def debugcapabilities(ui, path, **opts): | 485 def debugcapabilities(ui, path, **opts): |
486 """lists the capabilities of a remote peer""" | 486 """lists the capabilities of a remote peer""" |
487 opts = pycompat.byteskwargs(opts) | 487 peer = hg.peer(ui, pycompat.byteskwargs(opts), path) |
488 peer = hg.peer(ui, opts, path) | |
489 try: | 488 try: |
490 caps = peer.capabilities() | 489 caps = peer.capabilities() |
491 ui.writenoi18n(b'Main capabilities:\n') | 490 ui.writenoi18n(b'Main capabilities:\n') |
492 for c in sorted(caps): | 491 for c in sorted(caps): |
493 ui.write(b' %s\n' % c) | 492 ui.write(b' %s\n' % c) |