[PATCH 7 of 8] match: make arguments of _expandsets() optional

Denis Laxalde denis at laxalde.org
Mon Apr 8 04:23:51 EDT 2019


# HG changeset patch
# User Denis Laxalde <denis at laxalde.org>
# Date 1554650218 -7200
#      Sun Apr 07 17:16:58 2019 +0200
# Node ID 5adda8921403ce9aa216a823e69ab668ac674d8f
# Parent  a544e90f7c163576fe84234b024bf0c0052d995e
match: make arguments of _expandsets() optional

Arguments 'ctx', 'listsubrepos' and 'badfn' are optional in function
body.

diff --git a/mercurial/match.py b/mercurial/match.py
--- a/mercurial/match.py
+++ b/mercurial/match.py
@@ -42,7 +42,7 @@ def _rematcher(regex):
     except AttributeError:
         return m.match
 
-def _expandsets(kindpats, ctx, listsubrepos, badfn):
+def _expandsets(kindpats, ctx=None, listsubrepos=False, badfn=None):
     '''Returns the kindpats list with the 'set' patterns expanded to matchers'''
     matchers = []
     other = []


More information about the Mercurial-devel mailing list