# HG changeset patch # User Pierre-Yves David # Date 1443080699 25200 # Node ID 4afdd4283d3e0f62c43614890ccdafabd6497e7e # Parent 52c68fb827aeafc8bb45fc58f343bf95f4e1537c largefiles: remove a mutable default argument Mutable default arguments are know to the state of California to cause bugs. diff -r 52c68fb827ae -r 4afdd4283d3e hgext/largefiles/overrides.py --- a/hgext/largefiles/overrides.py Thu Sep 24 00:44:32 2015 -0700 +++ b/hgext/largefiles/overrides.py Thu Sep 24 00:44:59 2015 -0700 @@ -289,13 +289,15 @@ repo._repo.lfstatus = False def overridelog(orig, ui, repo, *pats, **opts): - def overridematchandpats(ctx, pats=(), opts={}, globbed=False, + def overridematchandpats(ctx, pats=(), opts=None, globbed=False, default='relpath', badfn=None): """Matcher that merges root directory with .hglf, suitable for log. It is still possible to match .hglf directly. For any listed files run log on the standin too. matchfn tries both the given filename and with .hglf stripped. """ + if opts is None: + opts = {} matchandpats = oldmatchandpats(ctx, pats, opts, globbed, default, badfn=badfn) m, p = copy.copy(matchandpats)