tag: remove a mutable default argument
authorPierre-Yves David <pierre-yves.david@fb.com>
Thu, 24 Sep 2015 00:56:30 -0700
changeset 26323 ed884807dc48
parent 26322 2cd19782d2d4
child 26324 4a8e21578e14
tag: remove a mutable default argument Mutable default arguments are know to the state of California to cause bugs. We just added support of None for the underlying function, so nothing else the required.
mercurial/localrepo.py
--- a/mercurial/localrepo.py	Thu Sep 24 00:56:18 2015 -0700
+++ b/mercurial/localrepo.py	Thu Sep 24 00:56:30 2015 -0700
@@ -540,7 +540,7 @@
         return hook.hook(self.ui, self, name, throw, **args)
 
     @unfilteredmethod
-    def _tag(self, names, node, message, local, user, date, extra={},
+    def _tag(self, names, node, message, local, user, date, extra=None,
              editor=False):
         if isinstance(names, str):
             names = (names,)