# HG changeset patch # User Pierre-Yves David # Date 2015-09-24 08:00:25 # Node ID c786dd6cae572829aa552252cb6562bff18f0ef7 # Parent 58218b0e6005c8169350b88ce9cff648fe3eeadc match: remove a mutable default argument Mutable default arguments are know to the state of California to cause bugs. diff --git a/mercurial/scmutil.py b/mercurial/scmutil.py --- a/mercurial/scmutil.py +++ b/mercurial/scmutil.py @@ -778,7 +778,7 @@ def matchandpats(ctx, pats=(), opts=None 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]