largefiles: remove a mutable default argument
authorPierre-Yves David <pierre-yves.david@fb.com>
Thu, 24 Sep 2015 00:40:53 -0700
changeset 26336 ec2662b9629d
parent 26335 6c93834d7d66
child 26337 932330c3f469
largefiles: remove a mutable default argument Mutable default arguments are know to the state of California to cause bugs.
hgext/largefiles/overrides.py
--- a/hgext/largefiles/overrides.py	Thu Sep 24 00:38:34 2015 -0700
+++ b/hgext/largefiles/overrides.py	Thu Sep 24 00:40:53 2015 -0700
@@ -50,7 +50,7 @@
 
 def installnormalfilesmatchfn(manifest):
     '''installmatchfn with a matchfn that ignores all largefiles'''
-    def overridematch(ctx, pats=[], opts={}, globbed=False,
+    def overridematch(ctx, pats=(), opts={}, globbed=False,
             default='relpath', badfn=None):
         match = oldmatch(ctx, pats, opts, globbed, default, badfn=badfn)
         return composenormalfilematcher(match, manifest)