rebase: don't use mutable default argument value
authorGregory Szorc <gregory.szorc@gmail.com>
Sun, 12 Mar 2017 21:56:39 -0700
changeset 31395 361bccce566a
parent 31394 fd3d8eb7f545
child 31396 ab3e9eab754f
rebase: don't use mutable default argument value
hgext/rebase.py
--- a/hgext/rebase.py	Sun Mar 12 21:55:46 2017 -0700
+++ b/hgext/rebase.py	Sun Mar 12 21:56:39 2017 -0700
@@ -721,10 +721,12 @@
     finally:
         release(lock, wlock)
 
-def _definesets(ui, repo, destf=None, srcf=None, basef=None, revf=[],
+def _definesets(ui, repo, destf=None, srcf=None, basef=None, revf=None,
                 destspace=None):
     """use revisions argument to define destination and rebase set
     """
+    revf = revf or []
+
     # destspace is here to work around issues with `hg pull --rebase` see
     # issue5214 for details
     if srcf and basef: