/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/bisect.py

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2017-06-10 00:34:23 UTC
  • mfrom: (6656.2.5 integrate-bisect)
  • Revision ID: breezy.the.bot@gmail.com-20170610003423-k8jgc8v3rqizmytc
Integrate 'bisect' command properly into core.

Merged from https://code.launchpad.net/~jelmer/brz/integrate-bisect/+merge/325110

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
#
13
13
# You should have received a copy of the GNU General Public License
14
14
# along with this program; if not, write to the Free Software
15
 
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
17
17
"""bisect command implementations."""
18
18
 
20
20
 
21
21
import sys
22
22
import os
23
 
from ...controldir import ControlDir
24
 
from ... import revision as _mod_revision
25
 
from ...commands import Command
26
 
from ...errors import BzrCommandError
27
 
from ...option import Option
28
 
from ...trace import note
 
23
from .controldir import ControlDir
 
24
from . import revision as _mod_revision
 
25
from .commands import Command
 
26
from .errors import BzrCommandError
 
27
from .option import Option
 
28
from .trace import note
29
29
 
30
30
bisect_info_path = ".bzr/bisect"
31
31
bisect_rev_path = ".bzr/bisect_revid"
34
34
class BisectCurrent(object):
35
35
    """Bisect class for managing the current revision."""
36
36
 
37
 
    def __init__(self, filename = bisect_rev_path):
 
37
    def __init__(self, filename=bisect_rev_path):
38
38
        self._filename = filename
39
39
        self._bzrdir = ControlDir.open_containing(".")[0]
40
40
        self._bzrbranch = self._bzrdir.open_branch()
288
288
    of which changes the state of the bisection.  The
289
289
    subcommands are:
290
290
 
291
 
    bzr bisect start
 
291
    brz bisect start
292
292
        Start a bisect, possibly clearing out a previous bisect.
293
293
 
294
 
    bzr bisect yes [-r rev]
 
294
    brz bisect yes [-r rev]
295
295
        The specified revision (or the current revision, if not given)
296
296
        has the characteristic we're looking for,
297
297
 
298
 
    bzr bisect no [-r rev]
 
298
    brz bisect no [-r rev]
299
299
        The specified revision (or the current revision, if not given)
300
300
        does not have the characteristic we're looking for,
301
301
 
302
 
    bzr bisect move -r rev
 
302
    brz bisect move -r rev
303
303
        Switch to a different revision manually.  Use if the bisect
304
304
        algorithm chooses a revision that is not suitable.  Try to
305
305
        move as little as possible.
306
306
 
307
 
    bzr bisect reset
 
307
    brz bisect reset
308
308
        Clear out a bisection in progress.
309
309
 
310
 
    bzr bisect log [-o file]
 
310
    brz bisect log [-o file]
311
311
        Output a log of the current bisection to standard output, or
312
312
        to the specified file.
313
313
 
314
 
    bzr bisect replay <logfile>
 
314
    brz bisect replay <logfile>
315
315
        Replay a previously-saved bisect log, forgetting any bisection
316
316
        that might be in progress.
317
317
 
318
 
    bzr bisect run <script>
 
318
    brz bisect run <script>
319
319
        Bisect automatically using <script> to determine 'yes' or 'no'.
320
320
        <script> should exit with:
321
321
           0 for yes