Fossil SCM
Added test commands. Do not rely on these commands.
Commit
eb116bc35389b45e228b2711dbfc7515c2841ef983da30bf03fa8c14913075f7
Parent
91639f39e23e8ba…
1 file changed
+57
-2
+57
-2
| --- tools/fossil-makeinfo | ||
| +++ tools/fossil-makeinfo | ||
| @@ -81,10 +81,11 @@ | ||
| 81 | 81 | @c @node menu |
| 82 | 82 | @menu |
| 83 | 83 | * Fossil:: Introduction and features listed from the website front page. |
| 84 | 84 | * Common commands:: These are the commands that are most likely to be used. |
| 85 | 85 | * Uncommon commands:: These aren't used as often, but they're still there when needed. |
| 86 | +* Test commands:: These are definitely not recommended for production use. | |
| 86 | 87 | * Common arguments:: -o arguments common to all commands |
| 87 | 88 | * License:: The license agreement of the fossil project |
| 88 | 89 | @end menu |
| 89 | 90 | |
| 90 | 91 | Help is available for any of the available fossil commands by using: |
| @@ -201,11 +202,11 @@ | ||
| 201 | 202 | # ... and adds it to the output file with some space |
| 202 | 203 | cat workfile >> fossil.texi |
| 203 | 204 | echo "" >> fossil.texi |
| 204 | 205 | |
| 205 | 206 | ##### Uncommon commands #### |
| 206 | -echo "@node Uncommon commands,Common arguments,Common commands,Top | |
| 207 | +echo "@node Uncommon commands,Test commands,Common commands,Top | |
| 207 | 208 | @chapter Uncommon commands |
| 208 | 209 | |
| 209 | 210 | These are commands that aren't used quite as often, and are normally |
| 210 | 211 | used in specific circumstances, such as creating fossils suitable for hosting. |
| 211 | 212 | |
| @@ -247,13 +248,67 @@ | ||
| 247 | 248 | |
| 248 | 249 | # ... and adds it to the output file with a spacer line |
| 249 | 250 | cat workfile >> fossil.texi |
| 250 | 251 | echo "" >> fossil.texi |
| 251 | 252 | |
| 253 | +# Now the test commands. Here be dragons. | |
| 254 | +echo "Grab test commands" | |
| 255 | +echo "@node Test commands,Common arguments,Uncommon commands,Top | |
| 256 | +@chapter Testing commands | |
| 257 | + | |
| 258 | +These are testing commands. They're often used to solve specific little | |
| 259 | +problems that didn't warrant a full tool, but are useful enough to be kept | |
| 260 | +around. They are most definitely not supported, and the developers | |
| 261 | +will expect to change these far more often. They are not stable, so do not | |
| 262 | +depend upon their behavior, or even their existence. | |
| 263 | + | |
| 264 | +@menu | |
| 265 | +" >> fossil.texi | |
| 266 | + | |
| 267 | +# Insert test commands in here | |
| 268 | +echo "Grab test keywords" | |
| 269 | +for u in $(for t in $(fossil help -t); do echo "$t"; done | sort); do echo "* ${u}::"; done >> fossil.texi | |
| 270 | + | |
| 271 | + | |
| 272 | +# Now end that menu (Test commands) | |
| 273 | +echo "@end menu | |
| 274 | + | |
| 275 | +" >> fossil.texi | |
| 276 | + | |
| 277 | +# Now add all the help from "fossil help -t -v" | |
| 278 | +# WARNING: tail count is brittle | |
| 279 | +# sed comands remove the last two lines. | |
| 280 | +echo "Fossil output test help to workfile" | |
| 281 | +fossil help -t -v | tail -n +4 | sed '$d' | sed '$d' >workfile | |
| 282 | + | |
| 283 | +# swap out @ with @@ so texinfo doesn't barf | |
| 284 | +echo "Doubling up the @'s" | |
| 285 | +sed -i -e 's/@/@@/g' workfile | |
| 286 | + | |
| 287 | +# This swaps out "# keyword" with | |
| 288 | +# @node keyword | |
| 289 | +# @unnumbered keyword | |
| 290 | +# breaks on *BSD's seds, needs gsed there | |
| 291 | +echo "Swapping out # for @node ... \n@unnumbered ..." | |
| 292 | + | |
| 293 | +if [[ ${MYOS} == "Linux" ]]; then | |
| 294 | + sed -i -e 's/^##* \([a-z0-9-]\{1,\}\)/@node \1\n@section \1\n/' workfile | |
| 295 | +else | |
| 296 | + # We'll assume we're on a BSD here, even though this won't always be true | |
| 297 | + gsed -i -e 's/^##* \([a-z0-9-]\{1,\}\)/@node \1\n@section \1\n/' workfile | |
| 298 | +fi | |
| 299 | + | |
| 300 | +# turns --switches into @option{--switches} | |
| 301 | +sed -i -e 's/--\([[:alnum:]-]\{1,\}\)/@option\{--\1\}/g' workfile | |
| 302 | + | |
| 303 | +# ... and adds it to the output file with a spacer line | |
| 304 | +cat workfile >> fossil.texi | |
| 305 | +echo "" >> fossil.texi | |
| 306 | + | |
| 252 | 307 | # Add in common args |
| 253 | 308 | echo "Grab common args" |
| 254 | -echo "@node Common arguments,License,Uncommon commands,Top | |
| 309 | +echo "@node Common arguments,License,Test commands,Top | |
| 255 | 310 | @chapter Common arguments |
| 256 | 311 | |
| 257 | 312 | These are commandline arguments that are common to all fossil commands. |
| 258 | 313 | |
| 259 | 314 | " >> fossil.texi |
| 260 | 315 |
| --- tools/fossil-makeinfo | |
| +++ tools/fossil-makeinfo | |
| @@ -81,10 +81,11 @@ | |
| 81 | @c @node menu |
| 82 | @menu |
| 83 | * Fossil:: Introduction and features listed from the website front page. |
| 84 | * Common commands:: These are the commands that are most likely to be used. |
| 85 | * Uncommon commands:: These aren't used as often, but they're still there when needed. |
| 86 | * Common arguments:: -o arguments common to all commands |
| 87 | * License:: The license agreement of the fossil project |
| 88 | @end menu |
| 89 | |
| 90 | Help is available for any of the available fossil commands by using: |
| @@ -201,11 +202,11 @@ | |
| 201 | # ... and adds it to the output file with some space |
| 202 | cat workfile >> fossil.texi |
| 203 | echo "" >> fossil.texi |
| 204 | |
| 205 | ##### Uncommon commands #### |
| 206 | echo "@node Uncommon commands,Common arguments,Common commands,Top |
| 207 | @chapter Uncommon commands |
| 208 | |
| 209 | These are commands that aren't used quite as often, and are normally |
| 210 | used in specific circumstances, such as creating fossils suitable for hosting. |
| 211 | |
| @@ -247,13 +248,67 @@ | |
| 247 | |
| 248 | # ... and adds it to the output file with a spacer line |
| 249 | cat workfile >> fossil.texi |
| 250 | echo "" >> fossil.texi |
| 251 | |
| 252 | # Add in common args |
| 253 | echo "Grab common args" |
| 254 | echo "@node Common arguments,License,Uncommon commands,Top |
| 255 | @chapter Common arguments |
| 256 | |
| 257 | These are commandline arguments that are common to all fossil commands. |
| 258 | |
| 259 | " >> fossil.texi |
| 260 |
| --- tools/fossil-makeinfo | |
| +++ tools/fossil-makeinfo | |
| @@ -81,10 +81,11 @@ | |
| 81 | @c @node menu |
| 82 | @menu |
| 83 | * Fossil:: Introduction and features listed from the website front page. |
| 84 | * Common commands:: These are the commands that are most likely to be used. |
| 85 | * Uncommon commands:: These aren't used as often, but they're still there when needed. |
| 86 | * Test commands:: These are definitely not recommended for production use. |
| 87 | * Common arguments:: -o arguments common to all commands |
| 88 | * License:: The license agreement of the fossil project |
| 89 | @end menu |
| 90 | |
| 91 | Help is available for any of the available fossil commands by using: |
| @@ -201,11 +202,11 @@ | |
| 202 | # ... and adds it to the output file with some space |
| 203 | cat workfile >> fossil.texi |
| 204 | echo "" >> fossil.texi |
| 205 | |
| 206 | ##### Uncommon commands #### |
| 207 | echo "@node Uncommon commands,Test commands,Common commands,Top |
| 208 | @chapter Uncommon commands |
| 209 | |
| 210 | These are commands that aren't used quite as often, and are normally |
| 211 | used in specific circumstances, such as creating fossils suitable for hosting. |
| 212 | |
| @@ -247,13 +248,67 @@ | |
| 248 | |
| 249 | # ... and adds it to the output file with a spacer line |
| 250 | cat workfile >> fossil.texi |
| 251 | echo "" >> fossil.texi |
| 252 | |
| 253 | # Now the test commands. Here be dragons. |
| 254 | echo "Grab test commands" |
| 255 | echo "@node Test commands,Common arguments,Uncommon commands,Top |
| 256 | @chapter Testing commands |
| 257 | |
| 258 | These are testing commands. They're often used to solve specific little |
| 259 | problems that didn't warrant a full tool, but are useful enough to be kept |
| 260 | around. They are most definitely not supported, and the developers |
| 261 | will expect to change these far more often. They are not stable, so do not |
| 262 | depend upon their behavior, or even their existence. |
| 263 | |
| 264 | @menu |
| 265 | " >> fossil.texi |
| 266 | |
| 267 | # Insert test commands in here |
| 268 | echo "Grab test keywords" |
| 269 | for u in $(for t in $(fossil help -t); do echo "$t"; done | sort); do echo "* ${u}::"; done >> fossil.texi |
| 270 | |
| 271 | |
| 272 | # Now end that menu (Test commands) |
| 273 | echo "@end menu |
| 274 | |
| 275 | " >> fossil.texi |
| 276 | |
| 277 | # Now add all the help from "fossil help -t -v" |
| 278 | # WARNING: tail count is brittle |
| 279 | # sed comands remove the last two lines. |
| 280 | echo "Fossil output test help to workfile" |
| 281 | fossil help -t -v | tail -n +4 | sed '$d' | sed '$d' >workfile |
| 282 | |
| 283 | # swap out @ with @@ so texinfo doesn't barf |
| 284 | echo "Doubling up the @'s" |
| 285 | sed -i -e 's/@/@@/g' workfile |
| 286 | |
| 287 | # This swaps out "# keyword" with |
| 288 | # @node keyword |
| 289 | # @unnumbered keyword |
| 290 | # breaks on *BSD's seds, needs gsed there |
| 291 | echo "Swapping out # for @node ... \n@unnumbered ..." |
| 292 | |
| 293 | if [[ ${MYOS} == "Linux" ]]; then |
| 294 | sed -i -e 's/^##* \([a-z0-9-]\{1,\}\)/@node \1\n@section \1\n/' workfile |
| 295 | else |
| 296 | # We'll assume we're on a BSD here, even though this won't always be true |
| 297 | gsed -i -e 's/^##* \([a-z0-9-]\{1,\}\)/@node \1\n@section \1\n/' workfile |
| 298 | fi |
| 299 | |
| 300 | # turns --switches into @option{--switches} |
| 301 | sed -i -e 's/--\([[:alnum:]-]\{1,\}\)/@option\{--\1\}/g' workfile |
| 302 | |
| 303 | # ... and adds it to the output file with a spacer line |
| 304 | cat workfile >> fossil.texi |
| 305 | echo "" >> fossil.texi |
| 306 | |
| 307 | # Add in common args |
| 308 | echo "Grab common args" |
| 309 | echo "@node Common arguments,License,Test commands,Top |
| 310 | @chapter Common arguments |
| 311 | |
| 312 | These are commandline arguments that are common to all fossil commands. |
| 313 | |
| 314 | " >> fossil.texi |
| 315 |