Patchwork [1,of,3,py3] exchange: hit opargs with pycompat.strkwargs before **-ing it

login
register
mail settings
Submitter Augie Fackler
Date Sept. 16, 2017, 3:09 p.m.
Message ID <dc9245ad5a97f9093036.1505574586@imladris.local>
Download mbox | patch
Permalink /patch/23949/
State Accepted
Headers show

Comments

Augie Fackler - Sept. 16, 2017, 3:09 p.m.
# HG changeset patch
# User Augie Fackler <raf@durin42.com>
# Date 1505574548 14400
#      Sat Sep 16 11:09:08 2017 -0400
# Node ID dc9245ad5a97f90930367bbfc56ed8fc76f41e7c
# Parent  21fc747e1bc55489fea3858e97561b6553c17f94
exchange: hit opargs with pycompat.strkwargs before **-ing it

Fixes Python 3 problems.
Gregory Szorc - Sept. 16, 2017, 5:28 p.m.
On Sat, Sep 16, 2017 at 8:09 AM, Augie Fackler <raf@durin42.com> wrote:

> # HG changeset patch
> # User Augie Fackler <raf@durin42.com>
> # Date 1505574548 14400
> #      Sat Sep 16 11:09:08 2017 -0400
> # Node ID dc9245ad5a97f90930367bbfc56ed8fc76f41e7c
> # Parent  21fc747e1bc55489fea3858e97561b6553c17f94
> exchange: hit opargs with pycompat.strkwargs before **-ing it
>

Queued this series, thanks.


>
> Fixes Python 3 problems.
>
> diff --git a/mercurial/exchange.py b/mercurial/exchange.py
> --- a/mercurial/exchange.py
> +++ b/mercurial/exchange.py
> @@ -423,7 +423,7 @@ def push(repo, remote, force=False, revs
>      if opargs is None:
>          opargs = {}
>      pushop = pushoperation(repo, remote, force, revs, newbranch,
> bookmarks,
> -                           **opargs)
> +                           **pycompat.strkwargs(opargs))
>      if pushop.remote.local():
>          missing = (set(pushop.repo.requirements)
>                     - pushop.remote.local().supported)
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
>

Patch

diff --git a/mercurial/exchange.py b/mercurial/exchange.py
--- a/mercurial/exchange.py
+++ b/mercurial/exchange.py
@@ -423,7 +423,7 @@  def push(repo, remote, force=False, revs
     if opargs is None:
         opargs = {}
     pushop = pushoperation(repo, remote, force, revs, newbranch, bookmarks,
-                           **opargs)
+                           **pycompat.strkwargs(opargs))
     if pushop.remote.local():
         missing = (set(pushop.repo.requirements)
                    - pushop.remote.local().supported)