GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
App::SVN::Bisect(3) User Contributed Perl Documentation App::SVN::Bisect(3)

App::SVN::Bisect - binary search through svn revisions

    my $bisect = App::SVN::Bisect->new(
        Action => $action,
        Min => $min,
        Max => $max
    );
    $bisect->do_something_intelligent(@ARGV);

This module implements the backend of the "svn-bisect" command line tool. See the POD documentation of that tool, for usage details.

    $self = App::SVN::Bisect->new(Action => "bad", Min => 0, Max => undef);

Create an App::SVN::Bisect object. The arguments are typically parsed from the command line.

The Action argument must be listed in the %actions table. The "read_config" attribute of the action determines whether the metadata file (typically named .svn/bisect.yaml) will be read.

    $self->do_something_intelligent(@ARGV);

Executes the action specified by the user. See the "Action methods" section, below, for the details.

If the action's "write_config" bit is set in the %actions table, the metadata file will be written after executing the action. If the bit was not set, the metadata file is removed.

Begins a bisect session. Sets up the parameters, queries some stuff about the subversion repository, and starts the user off with the first bisect.

Sets the "min" parameter to the specified (or current) revision, and then moves the user to the middle of the resulting range.

Sets the "max" parameter to the specified (or current) revision, and then moves the user to the middle of the resulting range.

Cleans up after a bisect session. If --back is passed, it also moves the working tree back to the original revision it had when "start" was first called.

Tells svn-bisect to ignore the specified (or current) revision, and then moves the user to another, strategically useful revision.

You may specify as many revisions at once as you like.

Tells svn-bisect to stop ignoring the specified revision, then moves the user to another, strategically useful revision.

You may specify as many revisions at once as you like.

Runs a command repeatedly to automate the bisection process.

We run the command and 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.

Allows the user to get some descriptions and usage information.

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

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.

    my $stdout = $self->cmd("svn info");

Runs a command, returns its output.

    $self->next_rev() if $self->ready();

Returns a true value if we have enough information to begin bisecting. Specifically, this returns true if we have been given at least one "bad" and one "good" revision. These can be specified as arguments to the "before" and "after" commands, or as --min and --max arguments to the "start" command.

    $self->next_rev();

Find a spot in the middle of the current "suspect revisions" list, and calls "svn update" to move the checkout directory to that revision.

    my @revs = $self->list_revs();

Returns the set of valid revisions between the current "min" and "max" values, exclusive.

This is smart about revisions that don't affect the current tree (because they won't be returned by fetch_log_revs, below) and about skipped revisions (which the user may specify with the "skip" command).

    $self->stdout("Hello, world!\n");

Output a message to stdout. This is basically just the "print" function, but we use a method so the testsuite can override it through subclassing.

    $self->verbose("Hello, world!\n");

Output a message to stdout, if the user specified the --verbose option. This is basically just a conditional wrapper around the "print" function.

    $self->exit(0);

Exits. This allows the test suite to override exiting; it does not provide any other features above and beyond what the normal exit system call provides.

    $self->update_to(25000);

Calls 'svn update' to move to the specified revision.

    my $hashref = $self->fetch_log_revs();

Calls "svn log" and parses the output. Returns a hash reference whose keys are valid revision numbers; so you can use exists() to find out whether a number is in the list. This hash reference is used by list_revs(), above.

    my $rev = $self->find_max();

Plays some tricks with "svn log" to figure out the latest revision contained within the repository.

    my $rev = $self->find_cur();

Parses the output of "svn info" to figure out what the current revision is.

    Mark Glines <mark-cpan@glines.org>

* Thanks to the git-bisect author(s), for coming up with a user interface that I actually like.

* Thanks to Will Coleda for inspiring me to actually write and release this.

* Thanks to the Parrot project for having so much random stuff going on as to make a tool like this necessary.

App::SVNBinarySearch by Will Coleda: <http://search.cpan.org/dist/App-SVNBinarySearch/>

This software is copyright (c) 2008-2009 Mark Glines.

It is distributed under the terms of the Artistic License 2.0. For details, see the "LICENSE" file packaged alongside this module.

2010-08-29 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.