App::SVN::Bisect(3pm)
โจ App::SVN::Bisect โจ
okay bestie, so this is App::SVN::Bisect โ yes it's a Perl module (3pm, she's a library manual, not a command), and yes she's literally the brains behind svn-bisect. binary search through svn revisions?? it's giving detective energy ๐๐
๐ฆ SYNOPSIS ๐ฆ
my $bisect = App::SVN::Bisect->new(
Action => $action,
Min => $min,
Max => $max
);
$bisect->do_something_intelligent(@ARGV);
๐ DESCRIPTION ๐
so this module is the whole backend of the svn-bisect command line tool. the glow-up is real. if you wanna know how to actually use the command line thing, go read the POD documentation of that tool โ that's where the usage details live. this page is the behind-the-scenes lore ๐ฌ
๐ API METHODS ๐
๐ธ new
$self = App::SVN::Bisect->new(Action => "bad", Min => 0, Max => undef);
creates an App::SVN::Bisect object, periodt. the arguments are typically parsed straight off the command line, no cap.
the Action argument has to be listed in the %actions table โ like, that's non-negotiable bestie. and the "read_config" attribute of the action decides whether the metadata file (typically named .svn/bisect.yaml) is gonna get read.
๐ do_something_intelligent
$self->do_something_intelligent(@ARGV);
runs whichever action the user asked for. the deets live in the "Action methods" section right below this one ๐
if the action's "write_config" bit is set in the %actions table, then the metadata file gets written after the action runs. and if that bit was not set? the metadata file gets removed. bye bitch ๐ซถ
๐ ACTION METHODS ๐
๐ start
kicks off a bisect session. sets up the parameters, goes and asks the subversion repository some nosy questions, and then serves you your very first bisect. main character entrance fr.
๐ฆ before
sets the "min" parameter to the revision you specified (or the current one, if you didn't specify), and then yeets you to the middle of the resulting range.
๐ after
sets the "max" parameter to the revision you specified (or the current one), and then yeets you to the middle of the resulting range. she's symmetric like that โจ
๐ง reset
cleans up after a bisect session โ the whole post-party tidy-up. and if you pass --back, she also moves the working tree back to the original revision it had when start was first called. nostalgic queen.
โญ skip
tells svn-bisect to ignore the revision you specified (or the current one), then moves you to another, strategically useful revision. we love strategy.
you may specify as many revisions at once as you like. go off.
๐ unskip
tells svn-bisect to stop ignoring the specified revision, then moves you to another, strategically useful revision. un-ignoring is self care.
you may specify as many revisions at once as you like. again, go off.
๐ฅ run
runs a command over and over again to automate the whole bisection process. it's giving hands free.
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. here's the whole menu of return codes that are handled, don't skip this part:
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. i'm serious bestie, clean up your mess ๐ญ
๐ซถ help
lets the user get some descriptions and usage information. wholesome.
this function calls exit() directly, specifically so that do_something_intelligent() doesn't go and remove the metadata file. sneaky but iconic.
๐ธ view
lets the user get some information about the current state of things. very "let me check my notes" of her.
this function also calls exit() directly, to prevent do_something_intelligent() from removing the metadata file. same trick, same slay.
๐ฎ INTERNAL METHODS ๐ฎ
๐ cmd
my $stdout = $self->cmd("svn info");
runs a command, returns its output. that's it, that's the whole thing.
๐ ready
$self->next_rev() if $self->ready();
returns a true value if we have enough information to begin bisecting. specifically, this returns true if we've been given at least one "bad" and one "good" revision. those can come in as arguments to the "before" and "after" commands, or as --min and --max arguments to the "start" command. two data points, that's the vibe check โ
โจ next_rev
$self->next_rev();
finds a spot in the middle of the current "suspect revisions" list, and calls "svn update" to move the checkout directory to that revision. right in the middle, like a true diplomat.
๐ list_revs
my @revs = $self->list_revs();
returns the set of valid revisions between the current "min" and "max" values, exclusive. (exclusive, bestie โ not inclusive. don't come for me.)
she's 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). smart girl summer.
๐ stdout
$self->stdout("Hello, world!\n");
outputs a message to stdout. it's basically just the "print" function, except we do it as a method so the testsuite can override it through subclassing. fancy for a reason โจ
๐ฆ verbose
$self->verbose("Hello, world!\n");
outputs a message to stdout, if the user specified the --verbose option. it's basically just a conditional wrapper around the "print" function. shy but only on purpose.
๐ exit
$self->exit(0);
exits. this lets the test suite override exiting. it does not provide any other features above and beyond what the normal exit system call provides โ so don't expect extra โจ, it's just exit with a wig on.
๐ง SUBVERSION ACCESSOR METHODS ๐ง
โญ update_to
$self->update_to(25000);
calls svn update to move to the specified revision. chauffeur behavior.
๐ fetch_log_revs
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(), up above. teamwork makes the dream work ๐ซถ
๐ฅ find_max
my $rev = $self->find_max();
plays some tricks with "svn log" to figure out the latest revision contained within the repository. she's doing stunts for the plot.
๐ธ find_cur
my $rev = $self->find_cur();
parses the output of "svn info" to figure out what the current revision is. nosy, in the best way.
๐ AUTHOR ๐
Mark Glines <mark-cpan@glines.org>
๐ซถ THANKS ๐ซถ
- thanks to the git-bisect author(s), for coming up with a user interface that I actually like. (their words, and honestly valid.)
- 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. chaos creating necessity, iconic honestly.
๐ SEE ALSO ๐
App::SVNBinarySearch by Will Coleda: <http://search.cpan.org/dist/App-SVNBinarySearch/>
๐ COPYRIGHT AND LICENSE ๐
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. read it bestie, licenses are self care ๐
and that's the whole page!! this was perl v5.42.0, dated 2025-07-25 โ shoutout to App::SVN::Bisect(3pm), she's booked, she's busy, she's bisecting. mwah ๐โจ
๐ฆ where this page comes from
- fedora 43: perl-App-SVN-Bisect 1.1-41.fc43 ยท Artistic-2.0
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms