diff -r 6ee107782018 -r 52762189c382 mercurial/commands.py --- a/mercurial/commands.py Wed Jun 30 17:23:16 2010 +0200 +++ b/mercurial/commands.py Fri Jul 02 11:41:43 2010 +0200 @@ -2484,7 +2484,7 @@ branches = opts.get('branch', []) + opts.get('only_branch', []) opts['branch'] = [repo.lookupbranch(b) for b in branches] - displayer = cmdutil.show_changeset(ui, repo, opts, True, matchfn) + displayer = cmdutil.show_changeset(ui, repo, opts, True) def prep(ctx, fns): rev = ctx.rev() parents = [p for p in repo.changelog.parentrevs(rev) @@ -2517,7 +2517,11 @@ if rename: copies.append((fn, rename[0])) - displayer.show(ctx, copies=copies) + revmatchfn = None + if opts.get('patch') or opts.get('stat'): + revmatchfn = cmdutil.match(repo, fns) + + displayer.show(ctx, copies=copies, matchfn=revmatchfn) for ctx in cmdutil.walkchangerevs(repo, matchfn, opts, prep): if count == limit: