largefiles: remove a mutable default argument
authorPierre-Yves David <pierre-yves.david@fb.com>
Thu, 24 Sep 2015 00:46:12 -0700
changeset 26340 0ddaa2cab926
parent 26339 4afdd4283d3e
child 26341 f46e7f3b70af
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:44:59 2015 -0700
+++ b/hgext/largefiles/overrides.py	Thu Sep 24 00:46:12 2015 -0700
@@ -617,7 +617,7 @@
         wlock = repo.wlock()
 
         manifest = repo[None].manifest()
-        def overridematch(ctx, pats=[], opts={}, globbed=False,
+        def overridematch(ctx, pats=(), opts={}, globbed=False,
                 default='relpath', badfn=None):
             newpats = []
             # The patterns were previously mangled to add the standin