changeset 26335:6c93834d7d66

histedit: 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:38:34 -0700
parents 0a5a774f5956
children ec2662b9629d
files hgext/histedit.py
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/histedit.py	Thu Sep 24 01:07:09 2015 -0700
+++ b/hgext/histedit.py	Thu Sep 24 00:38:34 2015 -0700
@@ -642,10 +642,12 @@
     def commiteditor(self):
         return cmdutil.getcommiteditor(edit=True, editform='histedit.mess')
 
-def findoutgoing(ui, repo, remote=None, force=False, opts={}):
+def findoutgoing(ui, repo, remote=None, force=False, opts=None):
     """utility function to find the first outgoing changeset
 
     Used by initialization code"""
+    if opts is None:
+        opts = {}
     dest = ui.expandpath(remote or 'default-push', remote or 'default')
     dest, revs = hg.parseurl(dest, None)[:2]
     ui.status(_('comparing with %s\n') % util.hidepassword(dest))