changeset 26327:c786dd6cae57

match: remove a mutable default argument Mutable default arguments are know to the state of California to cause bugs.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Thu, 24 Sep 2015 01:00:25 -0700
parents 58218b0e6005
children 188c1e9506f5
files mercurial/scmutil.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/scmutil.py	Thu Sep 24 01:00:05 2015 -0700
+++ b/mercurial/scmutil.py	Thu Sep 24 01:00:25 2015 -0700
@@ -778,7 +778,7 @@
         pats = []
     return m, pats
 
-def match(ctx, pats=[], opts={}, globbed=False, default='relpath', badfn=None):
+def match(ctx, pats=(), opts={}, globbed=False, default='relpath', badfn=None):
     '''Return a matcher that will warn about bad matches.'''
     return matchandpats(ctx, pats, opts, globbed, default, badfn=badfn)[0]