~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: Matt Giuca
  • Date: 2010-05-28 06:04:57 UTC
  • mto: This revision was merged to the branch mainline in revision 5282.
  • Revision ID: matt.giuca@gmail.com-20100528060457-v03aq5pfd0vzjvej
remove-tree now refuses to run without --force if there are shelved changes.
    (#586639)

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"