113 hgweb Configuring hgweb |
113 hgweb Configuring hgweb |
114 internals Technical implementation topics |
114 internals Technical implementation topics |
115 merge-tools Merge Tools |
115 merge-tools Merge Tools |
116 patterns File Name Patterns |
116 patterns File Name Patterns |
117 phases Working with Phases |
117 phases Working with Phases |
118 revisions Specifying Single Revisions |
118 revisions Specifying Revisions |
119 revsets Specifying Revision Sets |
|
120 scripting Using Mercurial from scripts and automation |
119 scripting Using Mercurial from scripts and automation |
121 subrepos Subrepositories |
120 subrepos Subrepositories |
122 templating Template Usage |
121 templating Template Usage |
123 urls URL Paths |
122 urls URL Paths |
124 |
123 |
189 hgweb Configuring hgweb |
188 hgweb Configuring hgweb |
190 internals Technical implementation topics |
189 internals Technical implementation topics |
191 merge-tools Merge Tools |
190 merge-tools Merge Tools |
192 patterns File Name Patterns |
191 patterns File Name Patterns |
193 phases Working with Phases |
192 phases Working with Phases |
194 revisions Specifying Single Revisions |
193 revisions Specifying Revisions |
195 revsets Specifying Revision Sets |
|
196 scripting Using Mercurial from scripts and automation |
194 scripting Using Mercurial from scripts and automation |
197 subrepos Subrepositories |
195 subrepos Subrepositories |
198 templating Template Usage |
196 templating Template Usage |
199 urls URL Paths |
197 urls URL Paths |
200 |
198 |
829 hgweb Configuring hgweb |
827 hgweb Configuring hgweb |
830 internals Technical implementation topics |
828 internals Technical implementation topics |
831 merge-tools Merge Tools |
829 merge-tools Merge Tools |
832 patterns File Name Patterns |
830 patterns File Name Patterns |
833 phases Working with Phases |
831 phases Working with Phases |
834 revisions Specifying Single Revisions |
832 revisions Specifying Revisions |
835 revsets Specifying Revision Sets |
|
836 scripting Using Mercurial from scripts and automation |
833 scripting Using Mercurial from scripts and automation |
837 subrepos Subrepositories |
834 subrepos Subrepositories |
838 templating Template Usage |
835 templating Template Usage |
839 urls URL Paths |
836 urls URL Paths |
840 |
837 |
1285 > |
1282 > |
1286 > def rewrite(ui, topic, doc): |
1283 > def rewrite(ui, topic, doc): |
1287 > return doc + '\nhelphook1\n' |
1284 > return doc + '\nhelphook1\n' |
1288 > |
1285 > |
1289 > def extsetup(ui): |
1286 > def extsetup(ui): |
1290 > help.addtopichook('revsets', rewrite) |
1287 > help.addtopichook('revisions', rewrite) |
1291 > EOF |
1288 > EOF |
1292 $ cat > helphook2.py <<EOF |
1289 $ cat > helphook2.py <<EOF |
1293 > from mercurial import help |
1290 > from mercurial import help |
1294 > |
1291 > |
1295 > def rewrite(ui, topic, doc): |
1292 > def rewrite(ui, topic, doc): |
1296 > return doc + '\nhelphook2\n' |
1293 > return doc + '\nhelphook2\n' |
1297 > |
1294 > |
1298 > def extsetup(ui): |
1295 > def extsetup(ui): |
1299 > help.addtopichook('revsets', rewrite) |
1296 > help.addtopichook('revisions', rewrite) |
1300 > EOF |
1297 > EOF |
1301 $ echo '[extensions]' >> $HGRCPATH |
1298 $ echo '[extensions]' >> $HGRCPATH |
1302 $ echo "helphook1 = `pwd`/helphook1.py" >> $HGRCPATH |
1299 $ echo "helphook1 = `pwd`/helphook1.py" >> $HGRCPATH |
1303 $ echo "helphook2 = `pwd`/helphook2.py" >> $HGRCPATH |
1300 $ echo "helphook2 = `pwd`/helphook2.py" >> $HGRCPATH |
1304 $ hg help revsets | grep helphook |
1301 $ hg help revsets | grep helphook |