~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

- more refactoring of and tests for option parsing

Show diffs side-by-side

added added

removed removed

Lines of Context:
703
703
                     'show-ids', 'revision',
704
704
                     'long', 
705
705
                     Option('message',
706
 
                            help='show revisions whose message matches this regexp'),
 
706
                            help='show revisions whose message matches this regexp',
 
707
                            type=str),
707
708
                     'short',]
708
709
    
709
710
    def run(self, filename=None, timezone='original',
716
717
            short=False):
717
718
        from bzrlib.log import log_formatter, show_log
718
719
        import codecs
719
 
 
 
720
        assert isinstance(message, basestring), \
 
721
            "invalid message argument %r" % message
720
722
        direction = (forward and 'forward') or 'reverse'
721
723
        
722
724
        if filename:
995
997
    # XXX: verbose currently does nothing
996
998
 
997
999
    takes_args = ['selected*']
998
 
    takes_options = ['message', 'verbose', 'unchanged',
999
 
                     Option('file', type=str, help='file containing commit message'),
 
1000
    takes_options = ['message', 'verbose', 
 
1001
                     Option('unchanged',
 
1002
                            help='commit even if nothing has changed'),
 
1003
                     Option('file', type=str, 
 
1004
                            argname='msgfile',
 
1005
                            help='file containing commit message'),
1000
1006
                     ]
1001
1007
    aliases = ['ci', 'checkin']
1002
1008