~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to __init__.py

  • Committer: Aaron Bentley
  • Date: 2007-01-15 15:19:20 UTC
  • Revision ID: abentley@panoramicfeedback.com-20070115151920-pb4eto22dzk34co2
Add --silent option to patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
188
188
    """Apply a named patch to the current tree.
189
189
    """
190
190
    takes_args = ['filename?']
191
 
    takes_options = [Option('strip', type=int, help=strip_help)]
192
 
    def run(self, filename=None, strip=None):
 
191
    takes_options = [Option('strip', type=int, help=strip_help),
 
192
                     Option('silent', help='Suppress chatter')]
 
193
    def run(self, filename=None, strip=None, silent=False):
193
194
        from patch import patch
194
195
        from bzrlib.workingtree import WorkingTree
195
196
        wt = WorkingTree.open_containing('.')[0]
196
197
        if strip is None:
197
198
            strip = 0
198
 
        return patch(wt, filename, strip)
 
199
        return patch(wt, filename, strip, silent)
199
200
 
200
201
 
201
202
class cmd_shelve(bzrlib.commands.Command):