Show More
@@ -70,7 +70,9 b' def checkseclevel(ui, doc, name, initlev' | |||||
70 | continue |
|
70 | continue | |
71 | nextlevel = mark2level[mark] |
|
71 | nextlevel = mark2level[mark] | |
72 | if curlevel < nextlevel and curlevel + 1 != nextlevel: |
|
72 | if curlevel < nextlevel and curlevel + 1 != nextlevel: | |
73 | ui.warnnoi18n('gap of section level at "%s" of %s\n' % (title, name)) |
|
73 | ui.warnnoi18n( | |
|
74 | 'gap of section level at "%s" of %s\n' % (title, name) | |||
|
75 | ) | |||
74 | showavailables(ui, initlevel) |
|
76 | showavailables(ui, initlevel) | |
75 | errorcnt += 1 |
|
77 | errorcnt += 1 | |
76 | continue |
|
78 | continue | |
@@ -88,7 +90,9 b' def checkcmdtable(ui, cmdtable, namefmt,' | |||||
88 | for k, entry in cmdtable.items(): |
|
90 | for k, entry in cmdtable.items(): | |
89 | name = k.split(b"|")[0].lstrip(b"^") |
|
91 | name = k.split(b"|")[0].lstrip(b"^") | |
90 | if not entry[0].__doc__: |
|
92 | if not entry[0].__doc__: | |
91 | ui.notenoi18n('skip checking %s: no help document\n' % (namefmt % name)) |
|
93 | ui.notenoi18n( | |
|
94 | 'skip checking %s: no help document\n' % (namefmt % name) | |||
|
95 | ) | |||
92 | continue |
|
96 | continue | |
93 | errorcnt += checkseclevel( |
|
97 | errorcnt += checkseclevel( | |
94 | ui, entry[0].__doc__, namefmt % name, initlevel |
|
98 | ui, entry[0].__doc__, namefmt % name, initlevel | |
@@ -113,7 +117,9 b' def checkhghelps(ui):' | |||||
113 | ): |
|
117 | ): | |
114 | mod = extensions.load(ui, name, None) |
|
118 | mod = extensions.load(ui, name, None) | |
115 | if not mod.__doc__: |
|
119 | if not mod.__doc__: | |
116 | ui.notenoi18n('skip checking %s extension: no help document\n' % name) |
|
120 | ui.notenoi18n( | |
|
121 | 'skip checking %s extension: no help document\n' % name | |||
|
122 | ) | |||
117 | continue |
|
123 | continue | |
118 | errorcnt += checkseclevel( |
|
124 | errorcnt += checkseclevel( | |
119 | ui, mod.__doc__, '%s extension' % name, initlevel_ext |
|
125 | ui, mod.__doc__, '%s extension' % name, initlevel_ext |
@@ -775,7 +775,9 b' def phabsend(ui, repo, *revs, **opts):' | |||||
775 | try: |
|
775 | try: | |
776 | writediffproperties(unfi[newnode], diffmap[old.node()]) |
|
776 | writediffproperties(unfi[newnode], diffmap[old.node()]) | |
777 | except util.urlerr.urlerror: |
|
777 | except util.urlerr.urlerror: | |
778 |
ui.warnnoi18n( |
|
778 | ui.warnnoi18n( | |
|
779 | b'Failed to update metadata for D%s\n' % drevid | |||
|
780 | ) | |||
779 | # Remove local tags since it's no longer necessary |
|
781 | # Remove local tags since it's no longer necessary | |
780 | tagname = b'D%d' % drevid |
|
782 | tagname = b'D%d' % drevid | |
781 | if tagname in repo.tags(): |
|
783 | if tagname in repo.tags(): |
@@ -216,4 +216,6 b' def extsetup(ui):' | |||||
216 | # command line options is not yet applied when |
|
216 | # command line options is not yet applied when | |
217 | # extensions.loadall() is called. |
|
217 | # extensions.loadall() is called. | |
218 | if b'--debug' in sys.argv: |
|
218 | if b'--debug' in sys.argv: | |
219 | ui.writenoi18n(b"[win32mbcs] activated with encoding: %s\n" % _encoding) |
|
219 | ui.writenoi18n( | |
|
220 | b"[win32mbcs] activated with encoding: %s\n" % _encoding | |||
|
221 | ) |
@@ -1250,11 +1250,17 b' def debugformat(ui, repo, **opts):' | |||||
1250 | def debugfsinfo(ui, path=b"."): |
|
1250 | def debugfsinfo(ui, path=b"."): | |
1251 | """show information detected about current filesystem""" |
|
1251 | """show information detected about current filesystem""" | |
1252 | ui.writenoi18n(b'path: %s\n' % path) |
|
1252 | ui.writenoi18n(b'path: %s\n' % path) | |
1253 | ui.writenoi18n(b'mounted on: %s\n' % (util.getfsmountpoint(path) or b'(unknown)')) |
|
1253 | ui.writenoi18n( | |
|
1254 | b'mounted on: %s\n' % (util.getfsmountpoint(path) or b'(unknown)') | |||
|
1255 | ) | |||
1254 | ui.writenoi18n(b'exec: %s\n' % (util.checkexec(path) and b'yes' or b'no')) |
|
1256 | ui.writenoi18n(b'exec: %s\n' % (util.checkexec(path) and b'yes' or b'no')) | |
1255 | ui.writenoi18n(b'fstype: %s\n' % (util.getfstype(path) or b'(unknown)')) |
|
1257 | ui.writenoi18n(b'fstype: %s\n' % (util.getfstype(path) or b'(unknown)')) | |
1256 | ui.writenoi18n(b'symlink: %s\n' % (util.checklink(path) and b'yes' or b'no')) |
|
1258 | ui.writenoi18n( | |
1257 |
|
|
1259 | b'symlink: %s\n' % (util.checklink(path) and b'yes' or b'no') | |
|
1260 | ) | |||
|
1261 | ui.writenoi18n( | |||
|
1262 | b'hardlink: %s\n' % (util.checknlink(path) and b'yes' or b'no') | |||
|
1263 | ) | |||
1258 | casesensitive = b'(unknown)' |
|
1264 | casesensitive = b'(unknown)' | |
1259 | try: |
|
1265 | try: | |
1260 | with pycompat.namedtempfile(prefix=b'.debugfsinfo', dir=path) as f: |
|
1266 | with pycompat.namedtempfile(prefix=b'.debugfsinfo', dir=path) as f: | |
@@ -1938,7 +1944,9 b' def debugmergestate(ui, repo, *args):' | |||||
1938 | ui.writenoi18n(b'other: %s\n' % record) |
|
1944 | ui.writenoi18n(b'other: %s\n' % record) | |
1939 | elif rtype == b'm': |
|
1945 | elif rtype == b'm': | |
1940 | driver, mdstate = record.split(b'\0', 1) |
|
1946 | driver, mdstate = record.split(b'\0', 1) | |
1941 | ui.writenoi18n(b'merge driver: %s (state "%s")\n' % (driver, mdstate)) |
|
1947 | ui.writenoi18n( | |
|
1948 | b'merge driver: %s (state "%s")\n' % (driver, mdstate) | |||
|
1949 | ) | |||
1942 | elif rtype in b'FDC': |
|
1950 | elif rtype in b'FDC': | |
1943 | r = record.split(b'\0') |
|
1951 | r = record.split(b'\0') | |
1944 | f, state, hash, lfile, afile, anode, ofile = r[0:7] |
|
1952 | f, state, hash, lfile, afile, anode, ofile = r[0:7] | |
@@ -1951,7 +1959,9 b' def debugmergestate(ui, repo, *args):' | |||||
1951 | b'file: %s (record type "%s", state "%s", hash %s)\n' |
|
1959 | b'file: %s (record type "%s", state "%s", hash %s)\n' | |
1952 | % (f, rtype, state, _hashornull(hash)) |
|
1960 | % (f, rtype, state, _hashornull(hash)) | |
1953 | ) |
|
1961 | ) | |
1954 | ui.writenoi18n(b' local path: %s (flags "%s")\n' % (lfile, flags)) |
|
1962 | ui.writenoi18n( | |
|
1963 | b' local path: %s (flags "%s")\n' % (lfile, flags) | |||
|
1964 | ) | |||
1955 | ui.writenoi18n( |
|
1965 | ui.writenoi18n( | |
1956 | b' ancestor path: %s (node %s)\n' |
|
1966 | b' ancestor path: %s (node %s)\n' | |
1957 | % (afile, _hashornull(anode)) |
|
1967 | % (afile, _hashornull(anode)) | |
@@ -2797,7 +2807,9 b' def debugrevlog(ui, repo, file_=None, **' | |||||
2797 | fmt2 = dfmtstr(totalsize) |
|
2807 | fmt2 = dfmtstr(totalsize) | |
2798 | ui.writenoi18n(b'revisions : ' + fmt2 % numrevs) |
|
2808 | ui.writenoi18n(b'revisions : ' + fmt2 % numrevs) | |
2799 | ui.writenoi18n(b' merges : ' + fmt % pcfmt(nummerges, numrevs)) |
|
2809 | ui.writenoi18n(b' merges : ' + fmt % pcfmt(nummerges, numrevs)) | |
2800 | ui.writenoi18n(b' normal : ' + fmt % pcfmt(numrevs - nummerges, numrevs)) |
|
2810 | ui.writenoi18n( | |
|
2811 | b' normal : ' + fmt % pcfmt(numrevs - nummerges, numrevs) | |||
|
2812 | ) | |||
2801 | ui.writenoi18n(b'revisions : ' + fmt2 % numrevs) |
|
2813 | ui.writenoi18n(b'revisions : ' + fmt2 % numrevs) | |
2802 | ui.writenoi18n(b' empty : ' + fmt % pcfmt(numempty, numrevs)) |
|
2814 | ui.writenoi18n(b' empty : ' + fmt % pcfmt(numempty, numrevs)) | |
2803 | ui.writenoi18n( |
|
2815 | ui.writenoi18n( | |
@@ -2808,7 +2820,9 b' def debugrevlog(ui, repo, file_=None, **' | |||||
2808 | b' delta : ' |
|
2820 | b' delta : ' | |
2809 | + fmt % pcfmt(numemptydelta, numemptytext + numemptydelta) |
|
2821 | + fmt % pcfmt(numemptydelta, numemptytext + numemptydelta) | |
2810 | ) |
|
2822 | ) | |
2811 | ui.writenoi18n(b' snapshot : ' + fmt % pcfmt(numfull + numsemi, numrevs)) |
|
2823 | ui.writenoi18n( | |
|
2824 | b' snapshot : ' + fmt % pcfmt(numfull + numsemi, numrevs) | |||
|
2825 | ) | |||
2812 | for depth in sorted(numsnapdepth): |
|
2826 | for depth in sorted(numsnapdepth): | |
2813 | ui.write( |
|
2827 | ui.write( | |
2814 | (b' lvl-%-3d : ' % depth) |
|
2828 | (b' lvl-%-3d : ' % depth) | |
@@ -2881,7 +2895,9 b' def debugrevlog(ui, repo, file_=None, **' | |||||
2881 | ui.write(b'\n') |
|
2895 | ui.write(b'\n') | |
2882 | fmt = pcfmtstr(numdeltas) |
|
2896 | fmt = pcfmtstr(numdeltas) | |
2883 | fmt2 = pcfmtstr(numdeltas, 4) |
|
2897 | fmt2 = pcfmtstr(numdeltas, 4) | |
2884 | ui.writenoi18n(b'deltas against prev : ' + fmt % pcfmt(numprev, numdeltas)) |
|
2898 | ui.writenoi18n( | |
|
2899 | b'deltas against prev : ' + fmt % pcfmt(numprev, numdeltas) | |||
|
2900 | ) | |||
2885 | if numprev > 0: |
|
2901 | if numprev > 0: | |
2886 | ui.writenoi18n( |
|
2902 | ui.writenoi18n( | |
2887 | b' where prev = p1 : ' + fmt2 % pcfmt(nump1prev, numprev) |
|
2903 | b' where prev = p1 : ' + fmt2 % pcfmt(nump1prev, numprev) | |
@@ -2893,8 +2909,12 b' def debugrevlog(ui, repo, file_=None, **' | |||||
2893 | b' other : ' + fmt2 % pcfmt(numoprev, numprev) |
|
2909 | b' other : ' + fmt2 % pcfmt(numoprev, numprev) | |
2894 | ) |
|
2910 | ) | |
2895 | if gdelta: |
|
2911 | if gdelta: | |
2896 | ui.writenoi18n(b'deltas against p1 : ' + fmt % pcfmt(nump1, numdeltas)) |
|
2912 | ui.writenoi18n( | |
2897 |
|
|
2913 | b'deltas against p1 : ' + fmt % pcfmt(nump1, numdeltas) | |
|
2914 | ) | |||
|
2915 | ui.writenoi18n( | |||
|
2916 | b'deltas against p2 : ' + fmt % pcfmt(nump2, numdeltas) | |||
|
2917 | ) | |||
2898 | ui.writenoi18n( |
|
2918 | ui.writenoi18n( | |
2899 | b'deltas against other : ' + fmt % pcfmt(numother, numdeltas) |
|
2919 | b'deltas against other : ' + fmt % pcfmt(numother, numdeltas) | |
2900 | ) |
|
2920 | ) | |
@@ -3113,8 +3133,12 b' def debugrevspec(ui, repo, expr, **opts)' | |||||
3113 | arevs = revset.makematcher(treebystage[b'analyzed'])(repo) |
|
3133 | arevs = revset.makematcher(treebystage[b'analyzed'])(repo) | |
3114 | brevs = revset.makematcher(treebystage[b'optimized'])(repo) |
|
3134 | brevs = revset.makematcher(treebystage[b'optimized'])(repo) | |
3115 | if opts[b'show_set'] or (opts[b'show_set'] is None and ui.verbose): |
|
3135 | if opts[b'show_set'] or (opts[b'show_set'] is None and ui.verbose): | |
3116 | ui.writenoi18n(b"* analyzed set:\n", stringutil.prettyrepr(arevs), b"\n") |
|
3136 | ui.writenoi18n( | |
3117 |
|
|
3137 | b"* analyzed set:\n", stringutil.prettyrepr(arevs), b"\n" | |
|
3138 | ) | |||
|
3139 | ui.writenoi18n( | |||
|
3140 | b"* optimized set:\n", stringutil.prettyrepr(brevs), b"\n" | |||
|
3141 | ) | |||
3118 | arevs = list(arevs) |
|
3142 | arevs = list(arevs) | |
3119 | brevs = list(brevs) |
|
3143 | brevs = list(brevs) | |
3120 | if arevs == brevs: |
|
3144 | if arevs == brevs: | |
@@ -3418,7 +3442,9 b' def debugtemplate(ui, repo, tmpl, **opts' | |||||
3418 | ui.note(templater.prettyformat(tree), b'\n') |
|
3442 | ui.note(templater.prettyformat(tree), b'\n') | |
3419 | newtree = templater.expandaliases(tree, aliases) |
|
3443 | newtree = templater.expandaliases(tree, aliases) | |
3420 | if newtree != tree: |
|
3444 | if newtree != tree: | |
3421 | ui.notenoi18n(b"* expanded:\n", templater.prettyformat(newtree), b'\n') |
|
3445 | ui.notenoi18n( | |
|
3446 | b"* expanded:\n", templater.prettyformat(newtree), b'\n' | |||
|
3447 | ) | |||
3422 |
|
3448 | |||
3423 | if revs is None: |
|
3449 | if revs is None: | |
3424 | tres = formatter.templateresources(ui, repo) |
|
3450 | tres = formatter.templateresources(ui, repo) |
@@ -367,7 +367,9 b' def obfuscate(text):' | |||||
367 | """Any text. Returns the input text rendered as a sequence of |
|
367 | """Any text. Returns the input text rendered as a sequence of | |
368 | XML entities. |
|
368 | XML entities. | |
369 | """ |
|
369 | """ | |
370 | text = pycompat.unicode(text, pycompat.sysstr(encoding.encoding), r'replace') |
|
370 | text = pycompat.unicode( | |
|
371 | text, pycompat.sysstr(encoding.encoding), r'replace' | |||
|
372 | ) | |||
371 | return b''.join([b'&#%d;' % ord(c) for c in text]) |
|
373 | return b''.join([b'&#%d;' % ord(c) for c in text]) | |
372 |
|
374 | |||
373 |
|
375 |
General Comments 0
You need to be logged in to leave comments.
Login now