~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to __init__.py

  • Committer: Aaron Bentley
  • Date: 2006-08-09 17:16:46 UTC
  • mfrom: (423.1.7 bzrtools)
  • Revision ID: abentley@panoramicfeedback.com-20060809171646-317f34d7ab1da7fe
Merge from other bzrtools

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/usr/bin/python
2
1
"""\
3
2
Various useful plugins for working with bzr.
4
3
"""
164
163
 
165
164
    takes_args = ['file*']
166
165
    takes_options = ['message', 'revision',
167
 
            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')]
168
168
 
169
 
    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):
170
171
        if revision is not None and revision:
171
172
            if len(revision) == 1:
172
173
                revision = revision[0]
176
177
 
177
178
        source = BzrPatchSource(revision, file_list)
178
179
        s = Shelf(source.base)
179
 
        s.shelve(source, all, message)
 
180
        s.shelve(source, all, message, no_color)
180
181
        return 0
181
182
 
182
183
 
295
296
    takes_options = [
296
297
            Option('all', help='Unshelve all changes without prompting'),
297
298
            Option('force', help='Force unshelving even if errors occur'),
298
 
    ]
 
299
            Option('no-color', help='Never display changes in color')
 
300
        ]
299
301
    takes_args = ['patch?']
300
 
    def run(self, patch=None, all=False, force=False):
 
302
    def run(self, patch=None, all=False, force=False, no_color=False):
301
303
        source = BzrPatchSource()
302
304
        s = Shelf(source.base)
303
 
        s.unshelve(source, patch, all, force)
 
305
        s.unshelve(source, patch, all, force, no_color)
304
306
        return 0
305
307
 
306
308