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