App-SVN-Bisect

 view release on metacpan or  search on metacpan

lib/App/SVN/Bisect.pm  view on Meta::CPAN

This function calls exit() directly, to prevent do_something_intelligent()
from removing the metadata file.

=cut

sub help {
    my ($self, $subcommand) = @_;
    $subcommand = '_' unless defined $subcommand;
    my %help = (
        '_' => <<"END",
Usage: $0 <subcommand>
where subcommand is one of:
    after  (alias: "bad")
    before (alias: "good")
    help   (hey, that's me!)
    reset
    run
    skip
    start
    unskip
    view

For more info on a subcommand, try: $0 help <subcommand>
END
        'after' => <<"END",
Usage: $0 after [rev]
Alias: $0 bad [rev]

Tells the bisect routine that the specified (or current) checkout is
*after* the wanted change - after the bug was introduced, after the
change in behavior, whatever.
END
        'before' => <<"END",
Usage: $0 before [rev]
Alias: $0 good [rev]

Tells the bisect routine that the specified (or current) checkout is
*before* the wanted change - before the bug was introduced, before the
change in behavior, whatever.
END
        'reset' => <<"END",
Usage: $0 [--back] reset

Cleans up after a bisect, removes the temporary data file.  if you
specify --back, it will also reset your checkout back to the original
version.
END
        'skip' => <<"END",
Usage: $0 skip [<rev> [<rev>...]]

This will tell $0 to ignore the specified (or current)
revision.  You might want to do this if, for example, the current rev
does not compile for reasons unrelated to the current session.  You
may specify more than one revision, and they will all be skipped at
once.
END
        'start' => <<"END",
Usage: $0 [--min <rev>] [--max <rev>] start

Starts a new bisect session.  You may specify the initial upper and lower
bounds, with the --min and --max options.  These will be updated during the
course of the bisection, with the "before" and "after" commands.

This command will prepare the checkout for a bisect session, and start off
with a rev in the middle of the list of suspect revisions.
END
        'unskip' => <<"END",
Usage: $0 unskip <rev> [<rev>...]

Undoes the effects of "skip <rev>", putting the specified revision
back into the normal rotation (if it is still within the range of revisions
currently under scrutiny).  The revision argument is required.  You may
specify more than one revision, and they will all be unskipped at once.
END
        'run' => <<"END",
Usage: $0 run <command> [arguments...]

Runs a command repeatedly to automate the bisection process.

The command is run with the specified arguments until a conclusion is
reached.  The command (usually a shell script) tells us about the
current revision by way of its return code.  The following return codes
are handled:

    0: This revision is before the change we're looking for
    1-124, 126-127: This revision includes the change we're looking for
    125: This revision is untestable and should be skipped
    any other value: The command failed to run, abort bisection.

The normal caveats apply.  In particular, if your script makes any
changes, don't forget to clean up afterwards.
END
        'view' => <<"END",
Usage: $0 view

Outputs some descriptive information about where we're at, and about
the revisions remaining to be tested.  The output looks like:

    There are currently 7 revisions under scrutiny.
    The last known-unaffected rev is 28913.
    The first known- affected rev is 28928.
    Currently testing 28924.
    
    Revision chart:
    28913] 28914 28918 28921 28924 28925 28926 28927 [28928

END
    );
    die("No known help topic \"$subcommand\".  Try \"$0 help\" for a list of topics.\n")
        unless exists $help{$subcommand};
    $self->stdout($help{$subcommand});
    $self->exit(0);
}


=head2 view

Allows the user to get some information about the current state of things.

This function calls exit() directly, to prevent do_something_intelligent()
from removing the metadata file.



( run in 0.867 second using v1.01-cache-2.11-cpan-39bf76dae61 )