/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/option.py

  • Committer: Gustav Hartvigsson
  • Date: 2021-01-09 21:36:27 UTC
  • Revision ID: gustav.hartvigsson@gmail.com-20210109213627-h1xwcutzy9m7a99b
Added 'Case Preserving Working Tree Use Cases' from Canonical Wiki

* Addod a page from the Canonical Bazaar wiki
  with information on the scmeatics of case
  perserving filesystems an a case insensitive
  filesystem works.
  
  * Needs re-work, but this will do as it is the
    same inforamoton as what was on the linked
    page in the currint documentation.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
# TODO: For things like --diff-prefix, we want a way to customize the display
18
18
# of the option argument.
19
19
 
20
 
from __future__ import absolute_import
21
 
 
22
20
import optparse
23
21
import re
24
22
 
27
25
    registry as _mod_registry,
28
26
    revisionspec,
29
27
    )
30
 
from .sixish import (
31
 
    text_type,
32
 
    )
33
28
 
34
29
 
35
30
class BadOptionValue(errors.BzrError):
111
106
    >>> _parse_change_str('123..124')
112
107
    Traceback (most recent call last):
113
108
      ...
114
 
    RangeInChangeOption: Option --change does not accept revision ranges
 
109
    breezy.errors.RangeInChangeOption: Option --change does not accept revision ranges
115
110
    """
116
111
    revs = _parse_revision_str(revstr)
117
112
    if len(revs) > 1:
135
130
        type_list = '\n'.join(lines)
136
131
        msg = "No known merge type %s. Supported types are:\n%s" %\
137
132
            (typestring, type_list)
138
 
        raise errors.BzrCommandError(msg)
 
133
        raise errors.CommandError(msg)
139
134
 
140
135
 
141
136
class Option(object):
460
455
        self.formatter = GettextIndentedHelpFormatter()
461
456
 
462
457
    def error(self, message):
463
 
        raise errors.BzrCommandError(message)
 
458
        raise errors.CommandError(message)
464
459
 
465
460
 
466
461
class GettextIndentedHelpFormatter(optparse.IndentedHelpFormatter):
564
559
               short_name='c',
565
560
               param_name='revision',
566
561
               help='Select changes introduced by the specified revision. See also "help revisionspec".')
567
 
_global_option('directory', short_name='d', type=text_type,
 
562
_global_option('directory', short_name='d', type=str,
568
563
               help='Branch to operate on, instead of working directory.')
569
 
_global_option('file', type=text_type, short_name='F')
 
564
_global_option('file', type=str, short_name='F')
570
565
_global_registry_option('log-format', "Use specified log format.",
571
566
                        lazy_registry=('breezy.log', 'log_formatter_registry'),
572
567
                        value_switches=True, title='Log format',
574
569
_global_registry_option('merge-type', 'Select a particular merge algorithm.',
575
570
                        lazy_registry=('breezy.merge', 'merge_type_registry'),
576
571
                        value_switches=True, title='Merge algorithm')
577
 
_global_option('message', type=text_type,
 
572
_global_option('message', type=str,
578
573
               short_name='m',
579
574
               help='Message string.')
580
575
_global_option('null', short_name='0',