mq: don't use mutable default argument value
authorGregory Szorc <gregory.szorc@gmail.com>
Sun, 12 Mar 2017 21:55:46 -0700
changeset 31394 fd3d8eb7f545
parent 31393 8b6927eb7efd
child 31395 361bccce566a
mq: don't use mutable default argument value
hgext/mq.py
--- a/hgext/mq.py	Sun Mar 12 21:54:32 2017 -0700
+++ b/hgext/mq.py	Sun Mar 12 21:55:46 2017 -0700
@@ -721,7 +721,8 @@
                     util.rename(absf, absorig)
 
     def printdiff(self, repo, diffopts, node1, node2=None, files=None,
-                  fp=None, changes=None, opts={}):
+                  fp=None, changes=None, opts=None):
+        opts = opts or {}
         stat = opts.get('stat')
         m = scmutil.match(repo[node1], files, opts)
         cmdutil.diffordiffstat(self.ui, repo, diffopts, node1, node2,  m,