/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 bzrlib/builtins.py

  • Committer: Andrew Bennetts
  • Date: 2009-09-24 05:31:23 UTC
  • mfrom: (4712 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4713.
  • Revision ID: andrew.bennetts@canonical.com-20090924053123-ztws4evq98lfgbr2
Merge bzr.dev; fix test isolation glitch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
461
461
            raise errors.BzrCommandError("You cannot remove the working tree"
462
462
                                         " of a remote path")
463
463
        if not force:
464
 
            # XXX: What about pending merges ? -- vila 20090629
465
 
            if working.has_changes(working.basis_tree()):
 
464
            if (working.has_changes(working.basis_tree())
 
465
                or len(working.get_parent_ids()) > 1):
466
466
                raise errors.UncommittedChanges(working)
467
467
 
468
468
        working_path = working.bzrdir.root_transport.base
3340
3340
    Tests that need working space on disk use a common temporary directory,
3341
3341
    typically inside $TMPDIR or /tmp.
3342
3342
 
 
3343
    If you set BZR_TEST_PDB=1 when running selftest, failing tests will drop
 
3344
    into a pdb postmortem session.
 
3345
 
3343
3346
    :Examples:
3344
3347
        Run only tests relating to 'ignore'::
3345
3348
 
3382
3385
                     Option('lsprof-timed',
3383
3386
                            help='Generate lsprof output for benchmarked'
3384
3387
                                 ' sections of code.'),
 
3388
                     Option('lsprof-tests',
 
3389
                            help='Generate lsprof output for each test.'),
3385
3390
                     Option('cache-dir', type=str,
3386
3391
                            help='Cache intermediate benchmark output in this '
3387
3392
                                 'directory.'),
3428
3433
            first=False, list_only=False,
3429
3434
            randomize=None, exclude=None, strict=False,
3430
3435
            load_list=None, debugflag=None, starting_with=None, subunit=False,
3431
 
            parallel=None):
 
3436
            parallel=None, lsprof_tests=False):
3432
3437
        from bzrlib.tests import selftest
3433
3438
        import bzrlib.benchmarks as benchmarks
3434
3439
        from bzrlib.benchmarks import tree_creator
3468
3473
                              "transport": transport,
3469
3474
                              "test_suite_factory": test_suite_factory,
3470
3475
                              "lsprof_timed": lsprof_timed,
 
3476
                              "lsprof_tests": lsprof_tests,
3471
3477
                              "bench_history": benchfile,
3472
3478
                              "matching_tests_first": first,
3473
3479
                              "list_only": list_only,
3650
3656
        verified = 'inapplicable'
3651
3657
        tree = WorkingTree.open_containing(directory)[0]
3652
3658
 
3653
 
        # die as quickly as possible if there are uncommitted changes
3654
3659
        try:
3655
3660
            basis_tree = tree.revision_tree(tree.last_revision())
3656
3661
        except errors.NoSuchRevision:
3657
3662
            basis_tree = tree.basis_tree()
 
3663
 
 
3664
        # die as quickly as possible if there are uncommitted changes
3658
3665
        if not force:
3659
 
            if tree.has_changes(basis_tree):
 
3666
            if tree.has_changes(basis_tree) or len(tree.get_parent_ids()) > 1:
3660
3667
                raise errors.UncommittedChanges(tree)
3661
3668
 
3662
3669
        view_info = _get_view_info_for_change_reporter(tree)