~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-03-12 07:52:22 UTC
  • mfrom: (4100.3.6 destructive-shelve)
  • Revision ID: pqm@pqm.ubuntu.com-20090312075222-g575i2pcrliafetw
(abentley) shelve now supports --destroy option.

Show diffs side-by-side

added added

removed removed

Lines of Context:
5397
5397
                       value_switches=True, enum_switch=False),
5398
5398
 
5399
5399
        Option('list', help='List shelved changes.'),
 
5400
        Option('destroy',
 
5401
               help='Destroy removed changes instead of shelving them.'),
5400
5402
    ]
5401
5403
    _see_also = ['unshelve']
5402
5404
 
5403
5405
    def run(self, revision=None, all=False, file_list=None, message=None,
5404
 
            writer=None, list=False):
 
5406
            writer=None, list=False, destroy=False):
5405
5407
        if list:
5406
5408
            return self.run_for_list()
5407
5409
        from bzrlib.shelf_ui import Shelver
5409
5411
            writer = bzrlib.option.diff_writer_registry.get()
5410
5412
        try:
5411
5413
            Shelver.from_args(writer(sys.stdout), revision, all, file_list,
5412
 
                              message).run()
 
5414
                              message, destroy=destroy).run()
5413
5415
        except errors.UserAbort:
5414
5416
            return 0
5415
5417