~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: 2010-06-04 10:10:50 UTC
  • mfrom: (5268.3.1 trunk)
  • Revision ID: pqm@pqm.ubuntu.com-20100604101050-5iiiag2n2soczg1l
(mbp) remove-tree now refuses to run without --force if there are shelved
 changes. (#586639) (Matt Giuca)

Show diffs side-by-side

added added

removed removed

Lines of Context:
491
491
    takes_options = [
492
492
        Option('force',
493
493
               help='Remove the working tree even if it has '
494
 
                    'uncommitted changes.'),
 
494
                    'uncommitted or shelved changes.'),
495
495
        ]
496
496
 
497
497
    def run(self, location_list, force=False):
511
511
            if not force:
512
512
                if (working.has_changes()):
513
513
                    raise errors.UncommittedChanges(working)
 
514
                if working.get_shelf_manager().last_shelf() is not None:
 
515
                    raise errors.ShelvedChanges(working)
514
516
 
515
517
            if working.user_url != working.branch.user_url:
516
518
                raise errors.BzrCommandError("You cannot remove the working tree"