This takes us close to make the test passing.
- skip-blame because just b'' prefixes
( )
hg-reviewers |
This takes us close to make the test passing.
Lint Skipped |
Unit Tests Skipped |
Path | Packages | |||
---|---|---|---|---|
M | tests/test-help.t (14 lines) |
Commit | Parents | Author | Summary | Date |
---|---|---|---|---|
Pulkit Goyal | Oct 12 2018, 9:08 PM |
$ hg help templating | (grep currentbookmark || true) | $ hg help templating | (grep currentbookmark || true) | ||||
Test help hooks | Test help hooks | ||||
$ cat > helphook1.py <<EOF | $ cat > helphook1.py <<EOF | ||||
> from mercurial import help | > from mercurial import help | ||||
> | > | ||||
> def rewrite(ui, topic, doc): | > def rewrite(ui, topic, doc): | ||||
> return doc + '\nhelphook1\n' | > return doc + b'\nhelphook1\n' | ||||
> | > | ||||
> def extsetup(ui): | > def extsetup(ui): | ||||
> help.addtopichook('revisions', rewrite) | > help.addtopichook(b'revisions', rewrite) | ||||
> EOF | > EOF | ||||
$ cat > helphook2.py <<EOF | $ cat > helphook2.py <<EOF | ||||
> from mercurial import help | > from mercurial import help | ||||
> | > | ||||
> def rewrite(ui, topic, doc): | > def rewrite(ui, topic, doc): | ||||
> return doc + '\nhelphook2\n' | > return doc + b'\nhelphook2\n' | ||||
> | > | ||||
> def extsetup(ui): | > def extsetup(ui): | ||||
> help.addtopichook('revisions', rewrite) | > help.addtopichook(b'revisions', rewrite) | ||||
> EOF | > EOF | ||||
$ echo '[extensions]' >> $HGRCPATH | $ echo '[extensions]' >> $HGRCPATH | ||||
$ echo "helphook1 = `pwd`/helphook1.py" >> $HGRCPATH | $ echo "helphook1 = `pwd`/helphook1.py" >> $HGRCPATH | ||||
$ echo "helphook2 = `pwd`/helphook2.py" >> $HGRCPATH | $ echo "helphook2 = `pwd`/helphook2.py" >> $HGRCPATH | ||||
$ hg help revsets | grep helphook | $ hg help revsets | grep helphook | ||||
helphook1 | helphook1 | ||||
helphook2 | helphook2 | ||||
> | > | ||||
> This paragraph is omitted, | > This paragraph is omitted, | ||||
> if :hg:\`help\` is invoked without \`\`-v\`\` (for extension) | > if :hg:\`help\` is invoked without \`\`-v\`\` (for extension) | ||||
> | > | ||||
> This paragraph is never omitted, too (for extension) | > This paragraph is never omitted, too (for extension) | ||||
> ''' | > ''' | ||||
> from __future__ import absolute_import | > from __future__ import absolute_import | ||||
> from mercurial import commands, help | > from mercurial import commands, help | ||||
> testtopic = """This paragraph is never omitted (for topic). | > testtopic = b"""This paragraph is never omitted (for topic). | ||||
> | > | ||||
> .. container:: verbose | > .. container:: verbose | ||||
> | > | ||||
> This paragraph is omitted, | > This paragraph is omitted, | ||||
> if :hg:\`help\` is invoked without \`\`-v\`\` (for topic) | > if :hg:\`help\` is invoked without \`\`-v\`\` (for topic) | ||||
> | > | ||||
> This paragraph is never omitted, too (for topic) | > This paragraph is never omitted, too (for topic) | ||||
> """ | > """ | ||||
> def extsetup(ui): | > def extsetup(ui): | ||||
> help.helptable.append((["topic-containing-verbose"], | > help.helptable.append(([b"topic-containing-verbose"], | ||||
> "This is the topic to test omit indicating.", | > b"This is the topic to test omit indicating.", | ||||
> lambda ui: testtopic)) | > lambda ui: testtopic)) | ||||
> EOF | > EOF | ||||
$ echo '[extensions]' >> $HGRCPATH | $ echo '[extensions]' >> $HGRCPATH | ||||
$ echo "addverboseitems = `pwd`/addverboseitems.py" >> $HGRCPATH | $ echo "addverboseitems = `pwd`/addverboseitems.py" >> $HGRCPATH | ||||
$ hg help addverboseitems | $ hg help addverboseitems | ||||
addverboseitems extension - extension to test omit indicating. | addverboseitems extension - extension to test omit indicating. | ||||
This paragraph is never omitted (for extension) | This paragraph is never omitted (for extension) |