# HG changeset patch # User Vadim Gelfer # Date 1155513783 25200 # Node ID fcdcf0c19998d5f88b231b1216890f14d339cbc0 # Parent c2932ad5476a92ece6a11e52fb9808b2432730be add default values to arguments of walk etc. diff -r c2932ad5476a -r fcdcf0c19998 mercurial/cmdutil.py --- a/mercurial/cmdutil.py Sun Aug 13 16:57:45 2006 -0700 +++ b/mercurial/cmdutil.py Sun Aug 13 17:03:03 2006 -0700 @@ -77,7 +77,7 @@ return util.cmdmatcher(repo.root, cwd, pats or ['.'], opts.get('include'), opts.get('exclude'), head) -def makewalk(repo, pats, opts, node=None, head='', badmatch=None): +def makewalk(repo, pats=[], opts={}, node=None, head='', badmatch=None): files, matchfn, anypats = matchpats(repo, pats, opts, head) exact = dict(zip(files, files)) def walk(): @@ -86,12 +86,12 @@ yield src, fn, util.pathto(repo.getcwd(), fn), fn in exact return files, matchfn, walk() -def walk(repo, pats, opts, node=None, head='', badmatch=None): +def walk(repo, pats=[], opts={}, node=None, head='', badmatch=None): files, matchfn, results = makewalk(repo, pats, opts, node, head, badmatch) for r in results: yield r -def addremove(repo, pats, opts={}, wlock=None, dry_run=None): +def addremove(repo, pats=[], opts={}, wlock=None, dry_run=None): if dry_run is None: dry_run = opts.get('dry_run') add, remove = [], []