Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/debugcommands.py @ 43116:defabf63e969
debugcommands: add a few more writenoi18n()
Differential Revision: https://phab.mercurial-scm.org/D7027
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Tue, 08 Oct 2019 15:15:37 -0700 |
parents | d783f945a701 |
children | 8ff1ecfadcd1 |
comparison
equal
deleted
inserted
replaced
43115:4aa72cdf616f | 43116:defabf63e969 |
---|---|
2946 idlen = len(shortfn(r.node(i))) | 2946 idlen = len(shortfn(r.node(i))) |
2947 break | 2947 break |
2948 | 2948 |
2949 if format == 0: | 2949 if format == 0: |
2950 if ui.verbose: | 2950 if ui.verbose: |
2951 ui.write( | 2951 ui.writenoi18n( |
2952 (b" rev offset length linkrev" b" %s %s p2\n") | 2952 (b" rev offset length linkrev" b" %s %s p2\n") |
2953 % (b"nodeid".ljust(idlen), b"p1".ljust(idlen)) | 2953 % (b"nodeid".ljust(idlen), b"p1".ljust(idlen)) |
2954 ) | 2954 ) |
2955 else: | 2955 else: |
2956 ui.writenoi18n( | 2956 ui.writenoi18n( |
2957 b" rev linkrev %s %s p2\n" | 2957 b" rev linkrev %s %s p2\n" |
2958 % (b"nodeid".ljust(idlen), b"p1".ljust(idlen)) | 2958 % (b"nodeid".ljust(idlen), b"p1".ljust(idlen)) |
2959 ) | 2959 ) |
2960 elif format == 1: | 2960 elif format == 1: |
2961 if ui.verbose: | 2961 if ui.verbose: |
2962 ui.write( | 2962 ui.writenoi18n( |
2963 ( | 2963 ( |
2964 b" rev flag offset length size link p1" | 2964 b" rev flag offset length size link p1" |
2965 b" p2 %s\n" | 2965 b" p2 %s\n" |
2966 ) | 2966 ) |
2967 % b"nodeid".rjust(idlen) | 2967 % b"nodeid".rjust(idlen) |
3251 except KeyError: | 3251 except KeyError: |
3252 raise error.Abort(_(b'invalid revision identifier %s') % rev) | 3252 raise error.Abort(_(b'invalid revision identifier %s') % rev) |
3253 if sidedata: | 3253 if sidedata: |
3254 sidedata = list(sidedata.items()) | 3254 sidedata = list(sidedata.items()) |
3255 sidedata.sort() | 3255 sidedata.sort() |
3256 ui.write((b'%d sidedata entries\n' % len(sidedata))) | 3256 ui.writenoi18n(b'%d sidedata entries\n' % len(sidedata)) |
3257 for key, value in sidedata: | 3257 for key, value in sidedata: |
3258 ui.write((b' entry-%04o size %d\n' % (key, len(value)))) | 3258 ui.writenoi18n(b' entry-%04o size %d\n' % (key, len(value))) |
3259 if ui.verbose: | 3259 if ui.verbose: |
3260 ui.write((b' %s\n' % stringutil.pprint(value))) | 3260 ui.writenoi18n(b' %s\n' % stringutil.pprint(value)) |
3261 | 3261 |
3262 | 3262 |
3263 @command(b'debugssl', [], b'[SOURCE]', optionalrepo=True) | 3263 @command(b'debugssl', [], b'[SOURCE]', optionalrepo=True) |
3264 def debugssl(ui, repo, source=None, **opts): | 3264 def debugssl(ui, repo, source=None, **opts): |
3265 '''test a secure connection to a server | 3265 '''test a secure connection to a server |