~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: Martin Pool
  • Date: 2009-09-15 01:52:34 UTC
  • mfrom: (4685 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4689.
  • Revision ID: mbp@sourcefrog.net-20090915015234-lbvl4euj2z353zjl
merge trunk

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)