D2392: debugcommands: add debugwireproto command

yuja (Yuya Nishihara) phabricator at mercurial-scm.org
Thu Mar 1 11:04:47 UTC 2018


yuja requested changes to this revision.
yuja added a comment.
This revision now requires changes to proceed.


  This is OT, but I couldn't find a way to phabread this long series. `:D2462` (the topmost patch
  in yadda) appeared to lack many changes, and `:D2392` missed some dependency patches.
  And I gave up.

INLINE COMMENTS

> debugcommands.py:2661
> +        # shared state from interfering with server operation.
> +        args = [util.hgexecutable(), '-R', repo.root, 'debugserve',
> +                '--sshstdio']

Perhaps `util.hgcmd()` is more appropriate because we don't run the command
by the system shell.

> debugcommands.py:2707
> +            data = ''.join(l.lstrip() for l in lines)
> +            data = ast.literal_eval(b'''b"%s"''' % data)
> +            stdin.write(data)

util.unescapestr() can be used if we want to allow only string literals.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D2392

To: indygreg, #hg-reviewers, yuja
Cc: yuja, sid0, mercurial-devel


More information about the Mercurial-devel mailing list