comparison hgext/transplant.py @ 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 99e88320d665
children 8bd2759f1fa7
comparison
equal deleted inserted replaced
26345:2aa0dde846b4 26346:2449a0a6ebda
115 if lnoderev in repo.changelog.ancestors([parentrev], lnoderev, 115 if lnoderev in repo.changelog.ancestors([parentrev], lnoderev,
116 inclusive=True): 116 inclusive=True):
117 return True 117 return True
118 return False 118 return False
119 119
120 def apply(self, repo, source, revmap, merges, opts={}): 120 def apply(self, repo, source, revmap, merges, opts=None):
121 '''apply the revisions in revmap one by one in revision order''' 121 '''apply the revisions in revmap one by one in revision order'''
122 if opts is None:
123 opts = {}
122 revs = sorted(revmap) 124 revs = sorted(revmap)
123 p1, p2 = repo.dirstate.parents() 125 p1, p2 = repo.dirstate.parents()
124 pulls = [] 126 pulls = []
125 diffopts = patch.difffeatureopts(self.ui, opts) 127 diffopts = patch.difffeatureopts(self.ui, opts)
126 diffopts.git = True 128 diffopts.git = True