diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -42,6 +42,7 @@ help, hg, logcmdutil, + match as matchmod, merge as mergemod, narrowspec, obsolete, @@ -1909,6 +1910,7 @@ diffopts = patch.diffallopts(ui, opts) m = scmutil.match(ctx2, pats, opts) + m = matchmod.intersectmatchers(m, repo.narrowmatch()) ui.pager('diff') logcmdutil.diffordiffstat(ui, repo, diffopts, node1, node2, m, stat=stat, listsubrepos=opts.get('subrepos'),