Show More
@@ -1332,6 +1332,7 b' class changeset_printer(object):' | |||
|
1332 | 1332 | self.ui.write(self.footer) |
|
1333 | 1333 | |
|
1334 | 1334 | def show(self, ctx, copies=None, matchfn=None, **props): |
|
1335 | props = pycompat.byteskwargs(props) | |
|
1335 | 1336 | if self.buffered: |
|
1336 | 1337 | self.ui.pushbuffer(labeled=True) |
|
1337 | 1338 | self._show(ctx, copies, matchfn, props) |
@@ -291,6 +291,7 b' def _debugchangegroup(ui, gen, all=None,' | |||
|
291 | 291 | |
|
292 | 292 | def _debugobsmarkers(ui, part, indent=0, **opts): |
|
293 | 293 | """display version and markers contained in 'data'""" |
|
294 | opts = pycompat.byteskwargs(opts) | |
|
294 | 295 | data = part.read() |
|
295 | 296 | indent_string = ' ' * indent |
|
296 | 297 | try: |
@@ -511,6 +512,7 b' def debugdag(ui, repo, file_=None, *revs' | |||
|
511 | 512 | @command('debugdata', cmdutil.debugrevlogopts, _('-c|-m|FILE REV')) |
|
512 | 513 | def debugdata(ui, repo, file_, rev=None, **opts): |
|
513 | 514 | """dump the contents of a data file revision""" |
|
515 | opts = pycompat.byteskwargs(opts) | |
|
514 | 516 | if opts.get('changelog') or opts.get('manifest') or opts.get('dir'): |
|
515 | 517 | if rev is not None: |
|
516 | 518 | raise error.CommandError('debugdata', _('invalid arguments')) |
@@ -567,6 +569,7 b' def debugdeltachain(ui, repo, file_=None' | |||
|
567 | 569 | :``extraratio``: extradist divided by chainsize; another representation of |
|
568 | 570 | how much unrelated data is needed to load this delta chain |
|
569 | 571 | """ |
|
572 | opts = pycompat.byteskwargs(opts) | |
|
570 | 573 | r = cmdutil.openrevlog(repo, 'debugdeltachain', file_, opts) |
|
571 | 574 | index = r.index |
|
572 | 575 | generaldelta = r.version & revlog.FLAG_GENERALDELTA |
@@ -679,6 +682,7 b' def debugstate(ui, repo, **opts):' | |||
|
679 | 682 | _('[-l REV] [-r REV] [-b BRANCH]... [OTHER]')) |
|
680 | 683 | def debugdiscovery(ui, repo, remoteurl="default", **opts): |
|
681 | 684 | """runs the changeset discovery protocol in isolation""" |
|
685 | opts = pycompat.byteskwargs(opts) | |
|
682 | 686 | remoteurl, branches = hg.parseurl(ui.expandpath(remoteurl), |
|
683 | 687 | opts.get('branch')) |
|
684 | 688 | remote = hg.peer(repo, opts, remoteurl) |
@@ -740,6 +744,7 b' def debugdiscovery(ui, repo, remoteurl="' | |||
|
740 | 744 | @command('debugextensions', cmdutil.formatteropts, [], norepo=True) |
|
741 | 745 | def debugextensions(ui, **opts): |
|
742 | 746 | '''show information about active extensions''' |
|
747 | opts = pycompat.byteskwargs(opts) | |
|
743 | 748 | exts = extensions.extensions(ui) |
|
744 | 749 | hgver = util.version() |
|
745 | 750 | fm = ui.formatter('debugextensions', opts) |
@@ -822,6 +827,7 b' def debuggetbundle(ui, repopath, bundlep' | |||
|
822 | 827 | Every ID must be a full-length hex node id string. Saves the bundle to the |
|
823 | 828 | given file. |
|
824 | 829 | """ |
|
830 | opts = pycompat.byteskwargs(opts) | |
|
825 | 831 | repo = hg.peer(ui, opts, repopath) |
|
826 | 832 | if not repo.capable('getbundle'): |
|
827 | 833 | raise error.Abort("getbundle() not supported by target repository") |
@@ -891,6 +897,7 b' def debugignore(ui, repo, *files, **opts' | |||
|
891 | 897 | optionalrepo=True) |
|
892 | 898 | def debugindex(ui, repo, file_=None, **opts): |
|
893 | 899 | """dump the contents of an index file""" |
|
900 | opts = pycompat.byteskwargs(opts) | |
|
894 | 901 | r = cmdutil.openrevlog(repo, 'debugindex', file_, opts) |
|
895 | 902 | format = opts.get('format', 0) |
|
896 | 903 | if format not in (0, 1): |
@@ -945,6 +952,7 b' def debugindex(ui, repo, file_=None, **o' | |||
|
945 | 952 | _('-c|-m|FILE'), optionalrepo=True) |
|
946 | 953 | def debugindexdot(ui, repo, file_=None, **opts): |
|
947 | 954 | """dump an index DAG as a graphviz dot file""" |
|
955 | opts = pycompat.byteskwargs(opts) | |
|
948 | 956 | r = cmdutil.openrevlog(repo, 'debugindexdot', file_, opts) |
|
949 | 957 | ui.write(("digraph G {\n")) |
|
950 | 958 | for i in r: |
@@ -961,6 +969,7 b' def debuginstall(ui, **opts):' | |||
|
961 | 969 | |
|
962 | 970 | Returns 0 on success. |
|
963 | 971 | ''' |
|
972 | opts = pycompat.byteskwargs(opts) | |
|
964 | 973 | |
|
965 | 974 | def writetemp(contents): |
|
966 | 975 | (fd, name) = tempfile.mkstemp(prefix="hg-debuginstall-") |
@@ -1129,6 +1138,7 b' def debugknown(ui, repopath, *ids, **opt' | |||
|
1129 | 1138 | Every ID must be a full-length hex node id string. Returns a list of 0s |
|
1130 | 1139 | and 1s indicating unknown/known. |
|
1131 | 1140 | """ |
|
1141 | opts = pycompat.byteskwargs(opts) | |
|
1132 | 1142 | repo = hg.peer(ui, opts, repopath) |
|
1133 | 1143 | if not repo.capable('known'): |
|
1134 | 1144 | raise error.Abort("known() not supported by target repository") |
@@ -1347,6 +1357,8 b' def debugobsolete(ui, repo, precursor=No' | |||
|
1347 | 1357 | |
|
1348 | 1358 | With no arguments, displays the list of obsolescence markers.""" |
|
1349 | 1359 | |
|
1360 | opts = pycompat.byteskwargs(opts) | |
|
1361 | ||
|
1350 | 1362 | def parsenodeid(s): |
|
1351 | 1363 | try: |
|
1352 | 1364 | # We do not use revsingle/revrange functions here to accept |
@@ -1558,6 +1570,7 b' def debugpickmergetool(ui, repo, *pats, ' | |||
|
1558 | 1570 | information, even with --debug. In such case, information above is |
|
1559 | 1571 | useful to know why a merge tool is chosen. |
|
1560 | 1572 | """ |
|
1573 | opts = pycompat.byteskwargs(opts) | |
|
1561 | 1574 | overrides = {} |
|
1562 | 1575 | if opts['tool']: |
|
1563 | 1576 | overrides[('ui', 'forcemerge')] = opts['tool'] |
@@ -1679,6 +1692,7 b' def debugrebuildfncache(ui, repo):' | |||
|
1679 | 1692 | def debugrename(ui, repo, file1, *pats, **opts): |
|
1680 | 1693 | """dump rename information""" |
|
1681 | 1694 | |
|
1695 | opts = pycompat.byteskwargs(opts) | |
|
1682 | 1696 | ctx = scmutil.revsingle(repo, opts.get('rev')) |
|
1683 | 1697 | m = scmutil.match(ctx, (file1,) + pats, opts) |
|
1684 | 1698 | for abs in ctx.walk(m): |
@@ -1696,6 +1710,7 b' def debugrename(ui, repo, file1, *pats, ' | |||
|
1696 | 1710 | optionalrepo=True) |
|
1697 | 1711 | def debugrevlog(ui, repo, file_=None, **opts): |
|
1698 | 1712 | """show data and statistics about a revlog""" |
|
1713 | opts = pycompat.byteskwargs(opts) | |
|
1699 | 1714 | r = cmdutil.openrevlog(repo, 'debugrevlog', file_, opts) |
|
1700 | 1715 | |
|
1701 | 1716 | if opts.get("dump"): |
@@ -1943,6 +1958,7 b' def debugrevspec(ui, repo, expr, **opts)' | |||
|
1943 | 1958 | Use --verify-optimized to compare the optimized result with the unoptimized |
|
1944 | 1959 | one. Returns 1 if the optimized result differs. |
|
1945 | 1960 | """ |
|
1961 | opts = pycompat.byteskwargs(opts) | |
|
1946 | 1962 | stages = [ |
|
1947 | 1963 | ('parsed', lambda tree: tree), |
|
1948 | 1964 | ('expanded', lambda tree: revsetlang.expandaliases(ui, tree)), |
@@ -2188,6 +2204,7 b' def debugupgraderepo(ui, repo, run=False' | |||
|
2188 | 2204 | inferrepo=True) |
|
2189 | 2205 | def debugwalk(ui, repo, *pats, **opts): |
|
2190 | 2206 | """show how files match on given patterns""" |
|
2207 | opts = pycompat.byteskwargs(opts) | |
|
2191 | 2208 | m = scmutil.match(repo[None], pats, opts) |
|
2192 | 2209 | ui.write(('matcher: %r\n' % m)) |
|
2193 | 2210 | items = list(repo[None].walk(m)) |
@@ -2211,6 +2228,7 b' def debugwalk(ui, repo, *pats, **opts):' | |||
|
2211 | 2228 | _('REPO [OPTIONS]... [ONE [TWO]]'), |
|
2212 | 2229 | norepo=True) |
|
2213 | 2230 | def debugwireargs(ui, repopath, *vals, **opts): |
|
2231 | opts = pycompat.byteskwargs(opts) | |
|
2214 | 2232 | repo = hg.peer(ui, opts, repopath) |
|
2215 | 2233 | for opt in cmdutil.remoteopts: |
|
2216 | 2234 | del opts[opt[1]] |
@@ -12,6 +12,7 b' import re' | |||
|
12 | 12 | from .i18n import _ |
|
13 | 13 | from . import ( |
|
14 | 14 | error, |
|
15 | pycompat, | |
|
15 | 16 | util, |
|
16 | 17 | wireproto, |
|
17 | 18 | ) |
@@ -259,6 +260,7 b' class sshpeer(wireproto.wirepeer):' | |||
|
259 | 260 | yield wireproto.unescapearg(work) |
|
260 | 261 | |
|
261 | 262 | def _callstream(self, cmd, **args): |
|
263 | args = pycompat.byteskwargs(args) | |
|
262 | 264 | self.ui.debug("sending %s command\n" % cmd) |
|
263 | 265 | self.pipeo.write("%s\n" % cmd) |
|
264 | 266 | _func, names = wireproto.commands[cmd] |
General Comments 0
You need to be logged in to leave comments.
Login now