##// END OF EJS Templates
add default values to arguments of walk etc.
Vadim Gelfer -
r2884:fcdcf0c1 default
parent child Browse files
Show More
@@ -77,7 +77,7 b' def matchpats(repo, pats=[], opts={}, he'
77 77 return util.cmdmatcher(repo.root, cwd, pats or ['.'], opts.get('include'),
78 78 opts.get('exclude'), head)
79 79
80 def makewalk(repo, pats, opts, node=None, head='', badmatch=None):
80 def makewalk(repo, pats=[], opts={}, node=None, head='', badmatch=None):
81 81 files, matchfn, anypats = matchpats(repo, pats, opts, head)
82 82 exact = dict(zip(files, files))
83 83 def walk():
@@ -86,12 +86,12 b' def makewalk(repo, pats, opts, node=None'
86 86 yield src, fn, util.pathto(repo.getcwd(), fn), fn in exact
87 87 return files, matchfn, walk()
88 88
89 def walk(repo, pats, opts, node=None, head='', badmatch=None):
89 def walk(repo, pats=[], opts={}, node=None, head='', badmatch=None):
90 90 files, matchfn, results = makewalk(repo, pats, opts, node, head, badmatch)
91 91 for r in results:
92 92 yield r
93 93
94 def addremove(repo, pats, opts={}, wlock=None, dry_run=None):
94 def addremove(repo, pats=[], opts={}, wlock=None, dry_run=None):
95 95 if dry_run is None:
96 96 dry_run = opts.get('dry_run')
97 97 add, remove = [], []
General Comments 0
You need to be logged in to leave comments. Login now