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

Martin von Zweigbergk martinvonz at google.com
Thu Jan 12 15:59:27 EST 2017


# HG changeset patch
# User Martin von Zweigbergk <martinvonz at 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.

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
 


More information about the Mercurial-devel mailing list