/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: Ian Clatworthy
  • Date: 2009-07-13 06:04:28 UTC
  • mfrom: (4527 +trunk)
  • mto: (4527.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 4529.
  • Revision ID: ian.clatworthy@canonical.com-20090713060428-5m6apiywie6aqg6v
merge bzr.dev r4527

Show diffs side-by-side

added added

removed removed

Lines of Context:
45
45
    revision as _mod_revision,
46
46
    symbol_versioning,
47
47
    transport,
48
 
    tree as _mod_tree,
49
48
    ui,
50
49
    urlutils,
51
50
    views,
450
449
        except errors.NoWorkingTree:
451
450
            raise errors.BzrCommandError("No working tree to remove")
452
451
        except errors.NotLocalUrl:
453
 
            raise errors.BzrCommandError("You cannot remove the working tree of a "
454
 
                                         "remote path")
 
452
            raise errors.BzrCommandError("You cannot remove the working tree"
 
453
                                         " of a remote path")
455
454
        if not force:
456
 
            changes = working.changes_from(working.basis_tree())
457
 
            if changes.has_changed():
 
455
            # XXX: What about pending merges ? -- vila 20090629
 
456
            if working.has_changes(working.basis_tree()):
458
457
                raise errors.UncommittedChanges(working)
459
458
 
460
459
        working_path = working.bzrdir.root_transport.base
461
460
        branch_path = working.branch.bzrdir.root_transport.base
462
461
        if working_path != branch_path:
463
 
            raise errors.BzrCommandError("You cannot remove the working tree from "
464
 
                                         "a lightweight checkout")
 
462
            raise errors.BzrCommandError("You cannot remove the working tree"
 
463
                                         " from a lightweight checkout")
465
464
 
466
465
        d.destroy_workingtree()
467
466
 
1115
1114
            revision_id = None
1116
1115
        if (tree is not None and revision_id is None
1117
1116
            and (strict is None or strict)): # Default to True:
1118
 
            changes = tree.changes_from(tree.basis_tree())
1119
 
            if changes.has_changed() or len(tree.get_parent_ids()) > 1:
 
1117
            if (tree.has_changes(tree.basis_tree())
 
1118
                 or len(tree.get_parent_ids()) > 1):
1120
1119
                raise errors.UncommittedChanges(
1121
1120
                    tree, more='Use --no-strict to force the push.')
1122
1121
            if tree.last_revision() != tree.branch.last_revision():
3642
3641
        except errors.NoSuchRevision:
3643
3642
            basis_tree = tree.basis_tree()
3644
3643
        if not force:
3645
 
            changes = tree.changes_from(basis_tree)
3646
 
            if changes.has_changed():
 
3644
            if tree.has_changes(basis_tree):
3647
3645
                raise errors.UncommittedChanges(tree)
3648
3646
 
3649
3647
        view_info = _get_view_info_for_change_reporter(tree)