Patchwork [8,of,8,V2] rebase: don't use mutable default argument value

login
register
mail settings
Submitter Gregory Szorc
Date March 13, 2017, 4:57 a.m.
Message ID <080024492aa477ad75df.1489381060@ubuntu-vm-main>
Download mbox | patch
Permalink /patch/19275/
State Accepted
Headers show

Comments

Gregory Szorc - March 13, 2017, 4:57 a.m.
# HG changeset patch
# User Gregory Szorc <gregory.szorc@gmail.com>
# Date 1489380999 25200
#      Sun Mar 12 21:56:39 2017 -0700
# Node ID 080024492aa477ad75df0cb585d8040e7ab81aa6
# Parent  c9cfed31ea6d38b60f50c4af5efe850e3d7f4be7
rebase: don't use mutable default argument value

Patch

diff --git a/hgext/rebase.py b/hgext/rebase.py
--- a/hgext/rebase.py
+++ b/hgext/rebase.py
@@ -721,10 +721,12 @@  def rebase(ui, repo, **opts):
     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: