Skip to content
  • Pulkit Goyal's avatar
    py3: handle opts uniformly in commands.py · d90ffee93df6
    Pulkit Goyal authored
    Since keyword arguments can't be bytes on Python 3, we converted then to
    unicodes before passing into different command functions. We need to adopt a
    certain pattern to convert opts back to bytes. Following are some of the
    functions which are called from inside these command functions and should
    always be feeded bytes to follow the right behaviour.
    
    ui.fomattter()
    scmutil.match()
    patch.diffallopts()
    hg.peer()
    cmdutil.{show_changeset|copy|graphrevs|checkunsupportedflag}
    server.{createservice|runservice}
    
    There are few commands which are left out where opts is again passed to a
    function as keyword arguments or converting opts back to bytes is kind of
    not necessary. Those are cat, revert, help, unbundle and rollback. Following
    patches will deal with them. This patch apart from these five commands,
    convert opts back to bytes for rest of the commands.
    
    This fixes a lot of things which are hidden like --git works now. Similarly
    more flags of commands which run on Python 3 currently get fixed.
    d90ffee93df6