1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-07-17 01:12:23 +02:00

Remove internal commands from HTML and man command references.

Some of these commands will be made public in the future but for now their interfaces are not stable so they remain internal.
This commit is contained in:
David Steele
2020-06-29 15:07:17 -04:00
parent c2dea180fb
commit be16bf69a8
2 changed files with 16 additions and 0 deletions

View File

@ -27,6 +27,7 @@ use constant CONFIG_HELP_DEFAULT => 'default'
use constant CONFIG_HELP_DESCRIPTION => 'description';
push @EXPORT, qw(CONFIG_HELP_DESCRIPTION);
use constant CONFIG_HELP_EXAMPLE => 'example';
use constant CONFIG_HELP_INTERNAL => 'internal';
use constant CONFIG_HELP_NAME => 'name';
use constant CONFIG_HELP_NAME_ALT => 'name-alt';
push @EXPORT, qw(CONFIG_HELP_NAME_ALT);
@ -203,6 +204,7 @@ sub process
$$oCommand{&CONFIG_HELP_SUMMARY} = $oCommandDoc->nodeGet('summary')->textGet();
$$oCommand{&CONFIG_HELP_DESCRIPTION} = $oCommandDoc->textGet();
$oCommand->{&CONFIG_HELP_INTERNAL} = cfgDefineCommand()->{$strCommand}{&CFGDEF_INTERNAL};
}
# Iterate through all options
@ -425,6 +427,9 @@ sub manGet
foreach my $strCommand (sort(keys(%{$$hConfig{&CONFIG_HELP_COMMAND}})))
{
# Skip internal commands
next if $hConfig->{&CONFIG_HELP_COMMAND}{$strCommand}{&CONFIG_HELP_INTERNAL};
my $hCommand = $$hConfig{&CONFIG_HELP_COMMAND}{$strCommand};
$iCommandMaxLen = length($strCommand) > $iCommandMaxLen ? length($strCommand) : $iCommandMaxLen;
@ -676,6 +681,9 @@ sub helpCommandDocGet
foreach my $strCommand (sort(keys(%{$$oConfigHash{&CONFIG_HELP_COMMAND}})))
{
# Skip internal commands
next if $oConfigHash->{&CONFIG_HELP_COMMAND}{$strCommand}{&CONFIG_HELP_INTERNAL};
my $oCommandHash = $$oConfigHash{&CONFIG_HELP_COMMAND}{$strCommand};
my $oSectionElement = $oDoc->nodeAdd('section', undef, {id => "command-${strCommand}"});

View File

@ -106,6 +106,14 @@
<p>Fix incorrect example for <br-option>repo-retention-full-type</br-option> option.</p>
</release-item>
<release-item>
<release-item-contributor-list>
<release-item-ideator id="cynthia.shang"/>
</release-item-contributor-list>
<p>Remove internal commands from <proper>HTML</proper> and <proper>man</proper> command references.</p>
</release-item>
</release-bug-list>
<release-improvement-list>