~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/option.py

  • Committer: Michael Ellerman
  • Date: 2006-02-28 14:45:51 UTC
  • mto: (1558.1.18 Aaron's integration)
  • mto: This revision was merged to the branch mainline in revision 1586.
  • Revision ID: michael@ellerman.id.au-20060228144551-3d9941ecde4a0b0a
Update contrib/pwk for -p1 diffs from bzr

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2004, 2005, 2006 by Canonical Ltd
 
1
# Copyright (C) 2004, 2005 by Canonical Ltd
2
2
 
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
14
14
# along with this program; if not, write to the Free Software
15
15
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
16
16
 
17
 
# TODO: For things like --diff-prefix, we want a way to customize the display
18
 
# of the option argument.
19
17
 
20
18
import re
21
19
 
22
 
from bzrlib.trace import warning
 
20
import bzrlib.commands
 
21
from bzrlib.trace import warning, mutter
23
22
from bzrlib.revisionspec import RevisionSpec
24
23
from bzrlib.errors import BzrCommandError
25
24
 
134
133
        argname -- name of option argument, if any
135
134
        """
136
135
        # TODO: perhaps a subclass that automatically does 
137
 
        # --option, --no-option for reversible booleans
 
136
        # --option, --no-option for reversable booleans
138
137
        self.name = name
139
138
        self.help = help
140
139
        self.type = type
162
161
_global_option('overwrite', help='Ignore differences between branches and '
163
162
               'overwrite unconditionally')
164
163
_global_option('basis', type=str)
165
 
_global_option('bound')
166
164
_global_option('diff-options', type=str)
167
165
_global_option('help',
168
166
               help='show help message')
172
170
_global_option('forward')
173
171
_global_option('message', type=unicode)
174
172
_global_option('no-recurse')
175
 
_global_option('prefix', type=str, 
176
 
               help='Set prefixes to added to old and new filenames, as '
177
 
                    'two values separated by a colon.')
178
173
_global_option('profile',
179
174
               help='show performance profiling information')
180
175
_global_option('revision', type=_parse_revision_str)
 
176
_global_option('short')
181
177
_global_option('show-ids', 
182
178
               help='show internal object ids')
183
179
_global_option('timezone', 
184
180
               type=str,
185
181
               help='display timezone as local, original, or utc')
186
 
_global_option('unbound')
187
182
_global_option('verbose',
188
183
               help='display more information')
189
184
_global_option('version')
195
190
_global_option('line', help='Use log format with one line per revision. Same as --log-format line')
196
191
_global_option('root', type=str)
197
192
_global_option('no-backup')
198
 
_global_option('merge-type', type=_parse_merge_type, 
199
 
               help='Select a particular merge algorithm')
 
193
_global_option('merge-type', type=_parse_merge_type)
200
194
_global_option('pattern', type=str)
201
195
_global_option('quiet')
202
196
_global_option('remember', help='Remember the specified location as a'
219
213
Option.SHORT_OPTIONS['v'] = Option.OPTIONS['verbose']
220
214
Option.SHORT_OPTIONS['l'] = Option.OPTIONS['long']
221
215
Option.SHORT_OPTIONS['q'] = Option.OPTIONS['quiet']
222
 
Option.SHORT_OPTIONS['p'] = Option.OPTIONS['prefix']