App-SVN-Bisect
view release on metacpan or search on metacpan
bin/svn-bisect view on Meta::CPAN
=head2 unskip
svn-bisect unskip <rev> [<rev>...]
Tell svn-bisect to no longer skip the specified revision. You must specify
at least one revision to unskip. If you specify more than one, they will
all be unskipped.
=head2 run
svn-bisect run <command> [arguments...]
Runs a command repeatedly to automate the bisection process.
Examples:
svn-bisect run ./mytest.sh
svn-bisect run test ! -f file
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.
In other words, "run" will automatically find the last revision for
which the given command returns success. (Keep in mind that in the
shell, "0" means "success".)
The normal caveats apply. In particular, if your script makes any
changes, don't forget to clean up afterwards.
=head2 reset
svn-bisect reset
Clean up after a bisect, and return the repository to the revision it was at
before you started.
=head2 help
svn-bisect help
svn-bisect help start
Gives you some useful descriptions and usage information.
=head1 EXAMPLE
...Because, you know, no software documentation is complete without a flashy
screenshot, these days.
So, lets say you were wondering when the subversion project added the
"Last Changed Rev:" line to the output of "svn info". Determining the
existence of this change is a straightforward matter of searching for the
text string... if a result was found, the current revision is "after",
otherwise it was "before". So a bisect looks like this:
$ svn co http://svn.apache.org/repos/asf/subversion/trunk/subversion
[snip lots of subversion checkout spam]
Checked out revision 980012.
$ cd subversion
$ ack --nocolor --nogroup 'Last Changed Rev'
svn/info-cmd.c:362: SVN_ERR(svn_cmdline_printf(pool, _("Last Changed Rev: %ld\n"),
tests/cmdline/depth_tests.py:2056: 'Last Changed Rev' : '^1$',
tests/cmdline/upgrade_tests.py:387: 'Last Changed Rev' : '7'
tests/cmdline/upgrade_tests.py:396: 'Last Changed Rev' : '10'
$ date
Wed Jul 28 06:40:03 EDT 2010
$ svn-bisect --min 0 start
$ svn-bisect after
Fetching history from r0 to r980012; it may take a while.
There are 24349 revs left in the pool. Choosing r862045.
$ ack --nocolor --nogroup 'Last Changed Rev'
svn/info-cmd.c:348: SVN_ERR(svn_cmdline_printf(pool, _("Last Changed Rev: %ld\n"),
$ svn-bisect after
There are 12174 revs left in the pool. Choosing r845633.
$ ack --nocolor --nogroup 'Last Changed Rev'
clients/cmdline/info-cmd.c:153: printf ("Last Changed Rev: %" SVN_REVNUM_T_FMT "\n", entry->cmt_rev);
$ svn-bisect after
There are 6087 revs left in the pool. Choosing r840416.
$ ack --nocolor --nogroup 'Last Changed Rev'
$ svn-bisect before
There are 3043 revs left in the pool. Choosing r842636.
# ack --nocolor --nogroup 'Last Changed Rev'
clients/cmdline/info-cmd.c:153: printf ("Last Changed Rev: %" SVN_REVNUM_T_FMT "\n", entry->cmt_rev);
$ svn-bisect after
There are 1521 revs left in the pool. Choosing r841463.
$ ack --nocolor --nogroup 'Last Changed Rev'
$ svn-bisect before
There are 760 revs left in the pool. Choosing r841993.
$ ack --nocolor --nogroup 'Last Changed Rev'
clients/cmdline/info-cmd.c:161: printf ("Last Changed Rev: %" SVN_REVNUM_T_FMT "\n", entry->cmt_rev);
$ svn-bisect after
There are 380 revs left in the pool. Choosing r841730.
$ ack --nocolor --nogroup 'Last Changed Rev'
$ svn-bisect before
There are 189 revs left in the pool. Choosing r841860.
( run in 1.445 second using v1.01-cache-2.11-cpan-8f98c5d2c55 )