changeset 31394:fd3d8eb7f545

mq: don't use mutable default argument value
author Gregory Szorc <gregory.szorc@gmail.com>
date Sun, 12 Mar 2017 21:55:46 -0700
parents 8b6927eb7efd
children 361bccce566a
files hgext/mq.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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,