##// END OF EJS Templates
context: don't use mutable default argument value...
Gregory Szorc -
r31388:9e57033f default
parent child Browse files
Show More
@@ -298,10 +298,10 b' class basectx(object):'
298 '''
298 '''
299 return subrepo.subrepo(self, path, allowwdir=True)
299 return subrepo.subrepo(self, path, allowwdir=True)
300
300
301 def match(self, pats=[], include=None, exclude=None, default='glob',
301 def match(self, pats=None, include=None, exclude=None, default='glob',
302 listsubrepos=False, badfn=None):
302 listsubrepos=False, badfn=None):
303 r = self._repo
303 r = self._repo
304 return matchmod.match(r.root, r.getcwd(), pats,
304 return matchmod.match(r.root, r.getcwd(), pats or [],
305 include, exclude, default,
305 include, exclude, default,
306 auditor=r.nofsauditor, ctx=self,
306 auditor=r.nofsauditor, ctx=self,
307 listsubrepos=listsubrepos, badfn=badfn)
307 listsubrepos=listsubrepos, badfn=badfn)
@@ -1515,18 +1515,18 b' class workingctx(committablectx):'
1515 self._repo.dirstate.normallookup(dest)
1515 self._repo.dirstate.normallookup(dest)
1516 self._repo.dirstate.copy(source, dest)
1516 self._repo.dirstate.copy(source, dest)
1517
1517
1518 def match(self, pats=[], include=None, exclude=None, default='glob',
1518 def match(self, pats=None, include=None, exclude=None, default='glob',
1519 listsubrepos=False, badfn=None):
1519 listsubrepos=False, badfn=None):
1520 r = self._repo
1520 r = self._repo
1521
1521
1522 # Only a case insensitive filesystem needs magic to translate user input
1522 # Only a case insensitive filesystem needs magic to translate user input
1523 # to actual case in the filesystem.
1523 # to actual case in the filesystem.
1524 if not util.fscasesensitive(r.root):
1524 if not util.fscasesensitive(r.root):
1525 return matchmod.icasefsmatcher(r.root, r.getcwd(), pats, include,
1525 return matchmod.icasefsmatcher(r.root, r.getcwd(), pats or [],
1526 exclude, default, r.auditor, self,
1526 include, exclude, default, r.auditor,
1527 listsubrepos=listsubrepos,
1527 self, listsubrepos=listsubrepos,
1528 badfn=badfn)
1528 badfn=badfn)
1529 return matchmod.match(r.root, r.getcwd(), pats,
1529 return matchmod.match(r.root, r.getcwd(), pats or [],
1530 include, exclude, default,
1530 include, exclude, default,
1531 auditor=r.auditor, ctx=self,
1531 auditor=r.auditor, ctx=self,
1532 listsubrepos=listsubrepos, badfn=badfn)
1532 listsubrepos=listsubrepos, badfn=badfn)
General Comments 0
You need to be logged in to leave comments. Login now