changeset 38112:d7cecea0b254

py3: add r'' prefixes to fix kwargs handling in hgext/sparse.py This fixes two of sparse tests which were failing on Python 3. # skip-blame because just r'' prefixes Differential Revision: https://phab.mercurial-scm.org/D3634
author Pulkit Goyal <7895pulkit@gmail.com>
date Sun, 20 May 2018 18:41:24 +0530
parents bacbe829c2bf
children f7a0398996ad
files hgext/sparse.py
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/sparse.py	Sun May 20 17:39:09 2018 +0530
+++ b/hgext/sparse.py	Sun May 20 18:41:24 2018 +0530
@@ -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)