Mercurial > hg
comparison hgext/largefiles/overrides.py @ 26340:0ddaa2cab926
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:12 -0700 |
parents | 4afdd4283d3e |
children | f46e7f3b70af |
comparison
equal
deleted
inserted
replaced
26339:4afdd4283d3e | 26340:0ddaa2cab926 |
---|---|
615 # When we call orig below it creates the standins but we don't add | 615 # When we call orig below it creates the standins but we don't add |
616 # them to the dir state until later so lock during that time. | 616 # them to the dir state until later so lock during that time. |
617 wlock = repo.wlock() | 617 wlock = repo.wlock() |
618 | 618 |
619 manifest = repo[None].manifest() | 619 manifest = repo[None].manifest() |
620 def overridematch(ctx, pats=[], opts={}, globbed=False, | 620 def overridematch(ctx, pats=(), opts={}, globbed=False, |
621 default='relpath', badfn=None): | 621 default='relpath', badfn=None): |
622 newpats = [] | 622 newpats = [] |
623 # The patterns were previously mangled to add the standin | 623 # The patterns were previously mangled to add the standin |
624 # directory; we need to remove that now | 624 # directory; we need to remove that now |
625 for pat in pats: | 625 for pat in pats: |