~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to __init__.py

  • Committer: Aaron Bentley
  • Date: 2007-01-17 14:30:19 UTC
  • Revision ID: abentley@panoramicfeedback.com-20070117143019-rj3n4op1aqav7bs5
Update versions to 0.15

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
import bzrlib
24
24
 
25
25
 
26
 
__version__ = '0.14.0'
 
26
__version__ = '0.15.0'
27
27
 
28
28
 
29
29
version_info = tuple(int(n) for n in __version__.split('.'))
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):
547
548
class cmd_cdiff(bzrlib.commands.Command):
548
549
    """A color version of bzr's diff"""
549
550
    takes_args = property(lambda x: get_cmd_object('diff').takes_args)
550
 
    takes_options = property(lambda x: get_cmd_object('diff').takes_options)
551
 
    def run(*args, **kwargs):
 
551
 
 
552
    def _takes_options(self):
 
553
        options = list(get_cmd_object('diff').takes_options)
 
554
        options.append(Option('check-style',
 
555
            help='Warn if trailing whitespace or spurious changes have been'
 
556
                 ' added.'))
 
557
        return options
 
558
 
 
559
    takes_options = property(_takes_options)
 
560
 
 
561
    def run(self, check_style=False, *args, **kwargs):
552
562
        from colordiff import colordiff
553
 
        colordiff(*args, **kwargs)
 
563
        colordiff(check_style, *args, **kwargs)
554
564
 
555
565
 
556
566
class cmd_baz_import(bzrlib.commands.Command):