Details
Details
- Reviewers
spectral pulkit - Group Reviewers
hg-reviewers - Commits
- rHGdefabf63e969: debugcommands: add a few more writenoi18n()
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Lint Skipped - Unit
Unit Tests Skipped
| spectral | |
| pulkit |
| hg-reviewers |
| Lint Skipped |
| Unit Tests Skipped |
| Path | Packages | |||
|---|---|---|---|---|
| M | mercurial/debugcommands.py (10 lines) |
| Commit | Parents | Author | Summary | Date |
|---|---|---|---|---|
| e2efbbb3fcfc | 37af48031d6f | Martin von Zweigbergk | Oct 8 2019, 6:15 PM |
| Status | Author | Revision | |
|---|---|---|---|
| Closed | martinvonz | ||
| Closed | martinvonz |
| # There might not be anything in r, so have a sane default | # There might not be anything in r, so have a sane default | ||||
| idlen = 12 | idlen = 12 | ||||
| for i in r: | for i in r: | ||||
| idlen = len(shortfn(r.node(i))) | idlen = len(shortfn(r.node(i))) | ||||
| break | break | ||||
| if format == 0: | if format == 0: | ||||
| if ui.verbose: | if ui.verbose: | ||||
| ui.write( | ui.writenoi18n( | ||||
| (b" rev offset length linkrev" b" %s %s p2\n") | (b" rev offset length linkrev" b" %s %s p2\n") | ||||
| % (b"nodeid".ljust(idlen), b"p1".ljust(idlen)) | % (b"nodeid".ljust(idlen), b"p1".ljust(idlen)) | ||||
| ) | ) | ||||
| else: | else: | ||||
| ui.writenoi18n( | ui.writenoi18n( | ||||
| b" rev linkrev %s %s p2\n" | b" rev linkrev %s %s p2\n" | ||||
| % (b"nodeid".ljust(idlen), b"p1".ljust(idlen)) | % (b"nodeid".ljust(idlen), b"p1".ljust(idlen)) | ||||
| ) | ) | ||||
| elif format == 1: | elif format == 1: | ||||
| if ui.verbose: | if ui.verbose: | ||||
| ui.write( | ui.writenoi18n( | ||||
| ( | ( | ||||
| b" rev flag offset length size link p1" | b" rev flag offset length size link p1" | ||||
| b" p2 %s\n" | b" p2 %s\n" | ||||
| ) | ) | ||||
| % b"nodeid".rjust(idlen) | % b"nodeid".rjust(idlen) | ||||
| ) | ) | ||||
| else: | else: | ||||
| ui.writenoi18n( | ui.writenoi18n( | ||||
| r = getattr(r, '_revlog', r) | r = getattr(r, '_revlog', r) | ||||
| try: | try: | ||||
| sidedata = r.sidedata(r.lookup(rev)) | sidedata = r.sidedata(r.lookup(rev)) | ||||
| except KeyError: | except KeyError: | ||||
| raise error.Abort(_(b'invalid revision identifier %s') % rev) | raise error.Abort(_(b'invalid revision identifier %s') % rev) | ||||
| if sidedata: | if sidedata: | ||||
| sidedata = list(sidedata.items()) | sidedata = list(sidedata.items()) | ||||
| sidedata.sort() | sidedata.sort() | ||||
| ui.write((b'%d sidedata entries\n' % len(sidedata))) | ui.writenoi18n(b'%d sidedata entries\n' % len(sidedata)) | ||||
| for key, value in sidedata: | for key, value in sidedata: | ||||
| ui.write((b' entry-%04o size %d\n' % (key, len(value)))) | ui.writenoi18n(b' entry-%04o size %d\n' % (key, len(value))) | ||||
| if ui.verbose: | if ui.verbose: | ||||
| ui.write((b' %s\n' % stringutil.pprint(value))) | ui.writenoi18n(b' %s\n' % stringutil.pprint(value)) | ||||
| @command(b'debugssl', [], b'[SOURCE]', optionalrepo=True) | @command(b'debugssl', [], b'[SOURCE]', optionalrepo=True) | ||||
| def debugssl(ui, repo, source=None, **opts): | def debugssl(ui, repo, source=None, **opts): | ||||
| '''test a secure connection to a server | '''test a secure connection to a server | ||||
| This builds the certificate chain for the server on Windows, installing the | This builds the certificate chain for the server on Windows, installing the | ||||
| missing intermediates and trusted root via Windows Update if necessary. It | missing intermediates and trusted root via Windows Update if necessary. It | ||||