##// END OF EJS Templates
match: remove a mutable default argument...
Pierre-Yves David -
r26326:58218b0e default
parent child Browse files
Show More
@@ -753,13 +753,15 b' def expandpats(pats):'
753 ret.append(kindpat)
753 ret.append(kindpat)
754 return ret
754 return ret
755
755
756 def matchandpats(ctx, pats=(), opts={}, globbed=False, default='relpath',
756 def matchandpats(ctx, pats=(), opts=None, globbed=False, default='relpath',
757 badfn=None):
757 badfn=None):
758 '''Return a matcher and the patterns that were used.
758 '''Return a matcher and the patterns that were used.
759 The matcher will warn about bad matches, unless an alternate badfn callback
759 The matcher will warn about bad matches, unless an alternate badfn callback
760 is provided.'''
760 is provided.'''
761 if pats == ("",):
761 if pats == ("",):
762 pats = []
762 pats = []
763 if opts is None:
764 opts = {}
763 if not globbed and default == 'relpath':
765 if not globbed and default == 'relpath':
764 pats = expandpats(pats or [])
766 pats = expandpats(pats or [])
765
767
General Comments 0
You need to be logged in to leave comments. Login now