# HG changeset patch # User Matt Mackall # Date 1256854074 18000 # Node ID 4164a17e712658495d0db4af24e1679b13298237 # Parent f3d60543924f67829ac142452c01d20b161d907a log: tidy up some filter tests diff -r f3d60543924f -r 4164a17e7126 mercurial/commands.py --- a/mercurial/commands.py Thu Oct 29 17:07:51 2009 -0500 +++ b/mercurial/commands.py Thu Oct 29 17:07:54 2009 -0500 @@ -2035,8 +2035,6 @@ if opts["date"]: df = util.matchdate(opts["date"]) - only_branches = opts.get('only_branch') - displayer = cmdutil.show_changeset(ui, repo, opts, True, matchfn) def prep(ctx, fns): rev = ctx.rev() @@ -2046,24 +2044,19 @@ return if opts.get('only_merges') and len(parents) != 2: return - if only_branches and ctx.branch() not in only_branches: + if opts.get('only_branch') and ctx.branch() not in opts['only_branch']: return if df and not df(ctx.date()[0]): return - + if opts['user'] and not [k for k in opts['user'] if k in ctx.user()]: + return if opts.get('keyword'): - miss = 0 for k in [kw.lower() for kw in opts['keyword']]: - if not (k in ctx.user().lower() or - k in ctx.description().lower() or - k in " ".join(ctx.files()).lower()): - miss = 1 + if (k in ctx.user().lower() or + k in ctx.description().lower() or + k in " ".join(ctx.files()).lower()): break - if miss: - return - - if opts['user']: - if not [k for k in opts['user'] if k in ctx.user()]: + else: return copies = []