changeset 26346:2449a0a6ebda

transplant: 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:52:21 -0700
parents 2aa0dde846b4
children e9a35411bbbc
files hgext/transplant.py
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/transplant.py	Thu Sep 24 00:50:06 2015 -0700
+++ b/hgext/transplant.py	Thu Sep 24 00:52:21 2015 -0700
@@ -117,8 +117,10 @@
                 return True
         return False
 
-    def apply(self, repo, source, revmap, merges, opts={}):
+    def apply(self, repo, source, revmap, merges, opts=None):
         '''apply the revisions in revmap one by one in revision order'''
+        if opts is None:
+            opts = {}
         revs = sorted(revmap)
         p1, p2 = repo.dirstate.parents()
         pulls = []