Patchwork D3634: py3: add r'' prefixes to fix kwargs handling in hgext/sparse.py

login
register
mail settings
Submitter phabricator
Date May 21, 2018, 6:36 p.m.
Message ID <bafc82dfcb6acbd86142a18038e3afa5@localhost.localdomain>
Download mbox | patch
Permalink /patch/31786/
State Not Applicable
Headers show

Comments

phabricator - May 21, 2018, 6:36 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGd7cecea0b254: py3: add r&#039;&#039; prefixes to fix kwargs handling in hgext/sparse.py (authored by pulkit, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D3634?vs=8842&id=8859

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

AFFECTED FILES
  hgext/sparse.py

CHANGE DETAILS




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

Patch

diff --git a/hgext/sparse.py b/hgext/sparse.py
--- a/hgext/sparse.py
+++ b/hgext/sparse.py
@@ -138,9 +138,9 @@ 
     extensions.wrapfunction(logcmdutil, '_initialrevs', _initialrevs)
 
 def _clonesparsecmd(orig, ui, repo, *args, **opts):
-    include_pat = opts.get('include')
-    exclude_pat = opts.get('exclude')
-    enableprofile_pat = opts.get('enable_profile')
+    include_pat = opts.get(r'include')
+    exclude_pat = opts.get(r'exclude')
+    enableprofile_pat = opts.get(r'enable_profile')
     include = exclude = enableprofile = False
     if include_pat:
         pat = include_pat
@@ -178,7 +178,7 @@ 
                     'also include directories of added files in sparse config'))
 
     def _add(orig, ui, repo, *pats, **opts):
-        if opts.get('sparse'):
+        if opts.get(r'sparse'):
             dirs = set()
             for pat in pats:
                 dirname, basename = util.split(pat)