Patchwork D2476: py3: fix more keyword arguments handling

login
register
mail settings
Submitter phabricator
Date Feb. 27, 2018, 12:57 p.m.
Message ID <a29d04c7aaec5ac2cb466bb3f4eb2f59@localhost.localdomain>
Download mbox | patch
Permalink /patch/28455/
State Not Applicable
Headers show

Comments

phabricator - Feb. 27, 2018, 12:57 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG9ff5cbfbc26a: py3: fix more keyword arguments handling (authored by pulkit, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2476?vs=6156&id=6170

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

AFFECTED FILES
  hgext/lfs/__init__.py
  hgext/narrow/narrowcommands.py
  mercurial/templatekw.py

CHANGE DETAILS




To: pulkit, durin42, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/mercurial/templatekw.py b/mercurial/templatekw.py
--- a/mercurial/templatekw.py
+++ b/mercurial/templatekw.py
@@ -791,7 +791,7 @@ 
 
         data.append({'successors': successors, 'markers': finalmarkers})
 
-    f = _showlist('succsandmarkers', data, args)
+    f = _showlist('succsandmarkers', data, pycompat.byteskwargs(args))
     return _hybrid(f, data, lambda x: x, pycompat.identity)
 
 @templatekeyword('p1rev')
diff --git a/hgext/narrow/narrowcommands.py b/hgext/narrow/narrowcommands.py
--- a/hgext/narrow/narrowcommands.py
+++ b/hgext/narrow/narrowcommands.py
@@ -122,8 +122,8 @@ 
 
         def pullbundle2extraprepare_widen(orig, pullop, kwargs):
             orig(pullop, kwargs)
-            if opts.get('depth'):
-                kwargs['depth'] = opts['depth']
+            if opts.get(r'depth'):
+                kwargs['depth'] = opts[r'depth']
         wrappedextraprepare = extensions.wrappedfunction(exchange,
             '_pullbundle2extraprepare', pullbundle2extraprepare_widen)
 
diff --git a/hgext/lfs/__init__.py b/hgext/lfs/__init__.py
--- a/hgext/lfs/__init__.py
+++ b/hgext/lfs/__init__.py
@@ -385,6 +385,6 @@ 
          [('r', 'rev', [], _('upload large files introduced by REV'))])
 def debuglfsupload(ui, repo, **opts):
     """upload lfs blobs added by the working copy parent or given revisions"""
-    revs = opts.get('rev', [])
+    revs = opts.get(r'rev', [])
     pointers = wrapper.extractpointers(repo, scmutil.revrange(repo, revs))
     wrapper.uploadblobs(repo, pointers)