~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-09-09 16:21:06 UTC
  • mfrom: (4681.1.1 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20090909162106-ar32j79ayhfrkap3
(vila) Handle pending merges as uncommitted changes

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
3653
3653
        verified = 'inapplicable'
3654
3654
        tree = WorkingTree.open_containing(directory)[0]
3655
3655
 
3656
 
        # die as quickly as possible if there are uncommitted changes
3657
3656
        try:
3658
3657
            basis_tree = tree.revision_tree(tree.last_revision())
3659
3658
        except errors.NoSuchRevision:
3660
3659
            basis_tree = tree.basis_tree()
 
3660
 
 
3661
        # die as quickly as possible if there are uncommitted changes
3661
3662
        if not force:
3662
 
            if tree.has_changes(basis_tree):
 
3663
            if tree.has_changes(basis_tree) or len(tree.get_parent_ids()) > 1:
3663
3664
                raise errors.UncommittedChanges(tree)
3664
3665
 
3665
3666
        view_info = _get_view_info_for_change_reporter(tree)