narrowbundle2: more kwargs native string fixes
authorAugie Fackler <augie@google.com>
Thu, 22 Feb 2018 00:51:32 -0500
changeset 36390 adce75cdf8f8
parent 36389 7e97174a1835
child 36391 075ef2d2e38d
narrowbundle2: more kwargs native string fixes This gets test-narrow.t to *almost* pass. Something appears to be borked in producing bundles, but only some of the time? I'm lost, but this change is at least a clear improvement. # skip-blame just more r prefixes on strings Differential Revision: https://phab.mercurial-scm.org/D2389
hgext/narrow/narrowbundle2.py
--- a/hgext/narrow/narrowbundle2.py	Wed Feb 21 23:24:51 2018 -0500
+++ b/hgext/narrow/narrowbundle2.py	Thu Feb 22 00:51:32 2018 -0500
@@ -259,7 +259,7 @@
 
         return
 
-    depth = kwargs.get('depth', None)
+    depth = kwargs.get(r'depth', None)
     if depth is not None:
         depth = int(depth)
         if depth < 1:
@@ -267,9 +267,9 @@
 
     heads = set(heads or repo.heads())
     common = set(common or [nullid])
-    oldinclude = sorted(filter(bool, kwargs.get('oldincludepats', [])))
-    oldexclude = sorted(filter(bool, kwargs.get('oldexcludepats', [])))
-    known = {bin(n) for n in kwargs.get('known', [])}
+    oldinclude = sorted(filter(bool, kwargs.get(r'oldincludepats', [])))
+    oldexclude = sorted(filter(bool, kwargs.get(r'oldexcludepats', [])))
+    known = {bin(n) for n in kwargs.get(r'known', [])}
     if known and (oldinclude != include or oldexclude != exclude):
         # Steps:
         # 1. Send kill for "$known & ::common"
@@ -343,8 +343,8 @@
     user_excludes = [
         'path:.' if p == '*' else 'path:' + p for p in user_excludes]
 
-    req_includes = set(kwargs.get('includepats', []))
-    req_excludes = set(kwargs.get('excludepats', []))
+    req_includes = set(kwargs.get(r'includepats', []))
+    req_excludes = set(kwargs.get(r'excludepats', []))
 
     req_includes, req_excludes, invalid_includes = narrowspec.restrictpatterns(
         req_includes, req_excludes, user_includes, user_excludes)