Patchwork [2,of,3] tests: use "hg help revisions.<predicate>" instead of grepping

login
register
mail settings
Submitter via Mercurial-devel
Date Jan. 12, 2017, 8:59 p.m.
Message ID <793f4271b8c4a6ce56f5.1484254767@martinvonz.mtv.corp.google.com>
Download mbox | patch
Permalink /patch/18196/
State Accepted
Headers show

Comments

via Mercurial-devel - Jan. 12, 2017, 8:59 p.m.
# HG changeset patch
# User Martin von Zweigbergk <martinvonz@google.com>
# Date 1484250206 28800
#      Thu Jan 12 11:43:26 2017 -0800
# Node ID 793f4271b8c4a6ce56f5ae6e645a2b5daedc0eba
# Parent  265e05f9e0ccd2b18ec5d4f59404c50fb393a998
tests: use "hg help revisions.<predicate>" instead of grepping

We have specific syntax for displaying the help text for a particular
revset predicate, so use that instead of grepping through the full
output.

Patch

diff -r 265e05f9e0cc -r 793f4271b8c4 tests/test-mq.t
--- a/tests/test-mq.t	Thu Jan 12 11:52:05 2017 -0800
+++ b/tests/test-mq.t	Thu Jan 12 11:43:26 2017 -0800
@@ -888,9 +888,10 @@ 
   $ hg log -r 'mq()' --template '{rev}\n'
   1
   2
-  $ hg help revsets | grep -i mq
+  $ hg help revisions.mq
       "mq()"
         Changesets managed by MQ.
+  
 
 bad node in status
 
diff -r 265e05f9e0cc -r 793f4271b8c4 tests/test-transplant.t
--- a/tests/test-transplant.t	Thu Jan 12 11:52:05 2017 -0800
+++ b/tests/test-transplant.t	Thu Jan 12 11:43:26 2017 -0800
@@ -102,9 +102,10 @@ 
   7  b3
   $ hg log -r 'transplanted(head())' --template '{rev} {parents} {desc}\n'
   7  b3
-  $ hg help revsets | grep transplanted
+  $ hg help revisions.transplanted
       "transplanted([set])"
         Transplanted changesets in set, or all transplanted changesets.
+  
 
 test transplanted keyword