changeset 26341:f46e7f3b70af

largefiles: 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 00:46:37 -0700
parents 0ddaa2cab926
children 46bd31fffccb
files hgext/largefiles/overrides.py
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/largefiles/overrides.py	Thu Sep 24 00:46:12 2015 -0700
+++ b/hgext/largefiles/overrides.py	Thu Sep 24 00:46:37 2015 -0700
@@ -617,8 +617,10 @@
         wlock = repo.wlock()
 
         manifest = repo[None].manifest()
-        def overridematch(ctx, pats=(), opts={}, globbed=False,
+        def overridematch(ctx, pats=(), opts=None, globbed=False,
                 default='relpath', badfn=None):
+            if opts is None:
+                opts = {}
             newpats = []
             # The patterns were previously mangled to add the standin
             # directory; we need to remove that now