Patchwork D6107: py3: use pycompat.byteskwargs on opts in phabricator.py

login
register
mail settings
Submitter phabricator
Date March 16, 2019, 11:52 a.m.
Message ID <61bb99c4f5435df6287d5b14bcb1c1e5@localhost.localdomain>
Download mbox | patch
Permalink /patch/39292/
State Not Applicable
Headers show

Comments

phabricator - March 16, 2019, 11:52 a.m.
Kwan updated this revision to Diff 14522.
Kwan retitled this revision from "py3: use r'' instead of b'' in opts.get() in phabricator.py" to "py3: use pycompat.byteskwargs on opts in phabricator.py".
Kwan added a comment.


  Switch to using pycompat.byteskwargs.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6107?vs=14420&id=14522

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

AFFECTED FILES
  hgext/phabricator.py

CHANGE DETAILS




To: Kwan, #hg-reviewers
Cc: yuja, mercurial-devel

Patch

diff --git a/hgext/phabricator.py b/hgext/phabricator.py
--- a/hgext/phabricator.py
+++ b/hgext/phabricator.py
@@ -503,6 +503,7 @@ 
     phabsend will check obsstore and the above association to decide whether to
     update an existing Differential Revision, or create a new one.
     """
+    opts = pycompat.byteskwargs(opts)
     revs = list(revs) + opts.get(b'rev', [])
     revs = scmutil.revrange(repo, revs)
 
@@ -955,6 +956,7 @@ 
     If --stack is given, follow dependencies information and read all patches.
     It is equivalent to the ``:`` operator.
     """
+    opts = pycompat.byteskwargs(opts)
     if opts.get(b'stack'):
         spec = b':(%s)' % spec
     drevs = querydrev(repo, spec)
@@ -973,6 +975,7 @@ 
 
     DREVSPEC selects revisions. See :hg:`help phabread` for its usage.
     """
+    opts = pycompat.byteskwargs(opts)
     flags = [n for n in b'accept reject abandon reclaim'.split() if opts.get(n)]
     if len(flags) > 1:
         raise error.Abort(_(b'%s cannot be used together') % b', '.join(flags))