##// END OF EJS Templates
log: tidy up some filter tests
Matt Mackall -
r9663:4164a17e default
parent child Browse files
Show More
@@ -2035,8 +2035,6 b' def log(ui, repo, *pats, **opts):'
2035 if opts["date"]:
2035 if opts["date"]:
2036 df = util.matchdate(opts["date"])
2036 df = util.matchdate(opts["date"])
2037
2037
2038 only_branches = opts.get('only_branch')
2039
2040 displayer = cmdutil.show_changeset(ui, repo, opts, True, matchfn)
2038 displayer = cmdutil.show_changeset(ui, repo, opts, True, matchfn)
2041 def prep(ctx, fns):
2039 def prep(ctx, fns):
2042 rev = ctx.rev()
2040 rev = ctx.rev()
@@ -2046,24 +2044,19 b' def log(ui, repo, *pats, **opts):'
2046 return
2044 return
2047 if opts.get('only_merges') and len(parents) != 2:
2045 if opts.get('only_merges') and len(parents) != 2:
2048 return
2046 return
2049 if only_branches and ctx.branch() not in only_branches:
2047 if opts.get('only_branch') and ctx.branch() not in opts['only_branch']:
2050 return
2048 return
2051 if df and not df(ctx.date()[0]):
2049 if df and not df(ctx.date()[0]):
2052 return
2050 return
2053
2051 if opts['user'] and not [k for k in opts['user'] if k in ctx.user()]:
2052 return
2054 if opts.get('keyword'):
2053 if opts.get('keyword'):
2055 miss = 0
2056 for k in [kw.lower() for kw in opts['keyword']]:
2054 for k in [kw.lower() for kw in opts['keyword']]:
2057 if not (k in ctx.user().lower() or
2055 if (k in ctx.user().lower() or
2058 k in ctx.description().lower() or
2056 k in ctx.description().lower() or
2059 k in " ".join(ctx.files()).lower()):
2057 k in " ".join(ctx.files()).lower()):
2060 miss = 1
2061 break
2058 break
2062 if miss:
2059 else:
2063 return
2064
2065 if opts['user']:
2066 if not [k for k in opts['user'] if k in ctx.user()]:
2067 return
2060 return
2068
2061
2069 copies = []
2062 copies = []
General Comments 0
You need to be logged in to leave comments. Login now