~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to __init__.py

  • Committer: Aaron Bentley
  • Date: 2006-08-07 03:07:35 UTC
  • mto: This revision was merged to the branch mainline in revision 425.
  • Revision ID: aaron.bentley@utoronto.ca-20060807030735-0a9f8330ce1a836a
Add --no-color option to shelf

Show diffs side-by-side

added added

removed removed

Lines of Context:
163
163
 
164
164
    takes_args = ['file*']
165
165
    takes_options = ['message', 'revision',
166
 
            Option('all', help='Shelve all changes without prompting')]
 
166
            Option('all', help='Shelve all changes without prompting'), 
 
167
            Option('no-color', help='Never display changes in color')]
167
168
 
168
 
    def run(self, all=False, file_list=None, message=None, revision=None):
 
169
    def run(self, all=False, file_list=None, message=None, revision=None,
 
170
            no_color=False):
169
171
        if revision is not None and revision:
170
172
            if len(revision) == 1:
171
173
                revision = revision[0]
175
177
 
176
178
        source = BzrPatchSource(revision, file_list)
177
179
        s = Shelf(source.base)
178
 
        s.shelve(source, all, message)
 
180
        s.shelve(source, all, message, no_color)
179
181
        return 0
180
182
 
181
183
 
294
296
    takes_options = [
295
297
            Option('all', help='Unshelve all changes without prompting'),
296
298
            Option('force', help='Force unshelving even if errors occur'),
297
 
    ]
 
299
            Option('no-color', help='Never display changes in color')
 
300
        ]
298
301
    takes_args = ['patch?']
299
 
    def run(self, patch=None, all=False, force=False):
 
302
    def run(self, patch=None, all=False, force=False, no_color=False):
300
303
        source = BzrPatchSource()
301
304
        s = Shelf(source.base)
302
 
        s.unshelve(source, patch, all, force)
 
305
        s.unshelve(source, patch, all, force, no_color)
303
306
        return 0
304
307
 
305
308