Patchwork D1482: py3: use byteskwargs in sparse.py

login
register
mail settings
Submitter phabricator
Date Nov. 21, 2017, 7:53 a.m.
Message ID <differential-rev-PHID-DREV-stulmqldbm4wccxhv42l-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/25708/
State Superseded
Headers show

Comments

phabricator - Nov. 21, 2017, 7:53 a.m.
indygreg created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  This removes several dozen failures in Python 3.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  hgext/sparse.py

CHANGE DETAILS




To: indygreg, #hg-reviewers
Cc: mercurial-devel
phabricator - Nov. 21, 2017, 2:19 p.m.
pulkit accepted this revision.
pulkit added inline comments.

INLINE COMMENTS

> sparse.py:140
>  
>  def _clonesparsecmd(orig, ui, repo, *args, **opts):
>      include_pat = opts.get('include')

This opts also needs similar handling but can be done in a separate patch maybe.

REPOSITORY
  rHG Mercurial

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

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

Patch

diff --git a/hgext/sparse.py b/hgext/sparse.py
--- a/hgext/sparse.py
+++ b/hgext/sparse.py
@@ -82,6 +82,7 @@ 
     extensions,
     hg,
     match as matchmod,
+    pycompat,
     registrar,
     sparse,
     util,
@@ -286,6 +287,7 @@ 
 
     Returns 0 if editing the sparse checkout succeeds.
     """
+    opts = pycompat.byteskwargs(opts)
     include = opts.get('include')
     exclude = opts.get('exclude')
     force = opts.get('force')