Use gitbisect to quickly locate the version with the introduced error

Source: Internet
Author: User
Now there is a project. during one day's development, a bug was introduced by an engineer, and the concurrent access to the system fails, and the database connection is directly locked. The project uses the java platform for version management on svn. I don't want to check the versions of codereview one by one, so I thought of the most violent half-version search method. of course, it is very time-consuming to do so on svn, which means that the versions should be checkout one by one, now, git-bisect is my only choice. Now there is a project. during one day's development, a bug was introduced by an engineer, and the concurrent access to the system fails, and the database connection is directly locked. The project uses the java platform for version management on svn. I don't want to review the version code one by one, so I thought of the most violent half-version search method. of course, if I do this on svn, I need to check the version one by one. for such a large project, it is also time-consuming. at this time, git-bisect is my only choice.

First, export the svn library as a git Library:
$ Git svn clone-s http://svn.xxx.com/svn/xxxxx
Then, start git bisect:
$ Git bisect start
Mark the current version as an error:
$ Git bisect bad
Locate the version of the previous day and create a tag (tag20090106). If the test is correct, mark it as follows:
$ Git bisect good tag20090106
In this case, git will tell you that an intermediate version is selected, and then compilation and testing will begin. if it fails, execute:
$ Git bisect bad
Git will use the half-fold method to find an intermediate version and start compilation and testing. if it passes, execute:
$ Git bisect good
Git will continue to locate revision until it finally finds a version with an introduced error. then, it will analyze the cause and find the troublesome engineer PK. after the PK is finished, it will be returned and executed:
$ Git bisect reset
Git returns to the current HEAD.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.