[Updated] D8590: githelp: add some minimal help for pickaxe functionality
durin42 (Augie Fackler)
phabricator at mercurial-scm.org
Sat May 30 16:24:26 UTC 2020
Closed by commit rHG94f227baa76f: githelp: add some minimal help for pickaxe functionality (authored by durin42).
This revision was automatically updated to reflect the committed changes.
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D8590?vs=21490&id=21534
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D8590/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D8590
AFFECTED FILES
hgext/githelp.py
tests/test-githelp.t
CHANGE DETAILS
diff --git a/tests/test-githelp.t b/tests/test-githelp.t
--- a/tests/test-githelp.t
+++ b/tests/test-githelp.t
@@ -318,3 +318,10 @@
hg journal --all
note: in hg commits can be deleted from repo but we always have backups
+
+ $ hg githelp -- git log -Gnarf
+ hg grep --diff narf
+ $ hg githelp -- git log -S narf
+ hg grep --diff narf
+ $ hg githelp -- git log --pickaxe-regex narf
+ hg grep --diff narf
diff --git a/hgext/githelp.py b/hgext/githelp.py
--- a/hgext/githelp.py
+++ b/hgext/githelp.py
@@ -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 '
To: durin42, #hg-reviewers, indygreg
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20200530/2394085e/attachment-0002.html>
More information about the Mercurial-patches
mailing list