Mercurial > public > mercurial-scm > hg-stable
diff hgext/githelp.py @ 44942:94f227baa76f
githelp: add some minimal help for pickaxe functionality
Due to a conversation in work chat, I realized this is actually pretty
well-hidden in Mercurial.
Differential Revision: https://phab.mercurial-scm.org/D8590
author | Augie Fackler <augie@google.com> |
---|---|
date | Thu, 28 May 2020 09:51:13 -0400 |
parents | ca5bd34c597b |
children | 89a2afe31e82 |
line wrap: on
line diff
--- a/hgext/githelp.py Fri Apr 17 10:41:05 2020 +0200 +++ b/hgext/githelp.py Thu May 28 09:51:13 2020 -0400 @@ -628,8 +628,17 @@ (b'', b'stat', None, b''), (b'', b'graph', None, b''), (b'p', b'patch', None, b''), + (b'G', b'grep-diff', b'', b''), + (b'S', b'pickaxe-regex', b'', b''), ] args, opts = parseoptions(ui, cmdoptions, args) + grep_pat = opts.get(b'grep_diff') or opts.get(b'pickaxe_regex') + if grep_pat: + cmd = Command(b'grep') + cmd[b'--diff'] = grep_pat + ui.status(b'%s\n' % bytes(cmd)) + return + ui.status( _( b'note: -v prints the entire commit message like Git does. To '