b.option : module documentation

Part of bzrlib

No module docstring
Function get_merge_type Attempt to find the merge class/factory associated with a string.
Class Option Description of a command line option
Class ListOption Option used to provide a list of values.
Class RegistryOption Option based on a registry
Class OptionParser OptionParser that raises exceptions instead of exiting
Class GettextIndentedHelpFormatter Adds gettext() call to format_option()
Function get_optparser Generate an optparse parser for bzrlib-style options
Function custom_help Clone a common option overriding the help.
Class MergeTypeRegistry Undocumented
Function _parse_revision_str This handles a revision string -> revno.
Function _parse_change_str Parse the revision string and return a tuple with left-most
Function _parse_merge_type Undocumented
Function _standard_option Register a standard option.
Function _standard_list_option Register a standard option.
Function _global_option Register a global option.
Function _global_registry_option Undocumented
Function _verbosity_level_callback Undocumented
def _parse_revision_str(revstr):

This handles a revision string -> revno.

This always returns a list. The list will have one element for each revision specifier supplied.

>>> _parse_revision_str('234')
[<RevisionSpec_dwim 234>]
>>> _parse_revision_str('234..567')
[<RevisionSpec_dwim 234>, <RevisionSpec_dwim 567>]
>>> _parse_revision_str('..')
[<RevisionSpec None>, <RevisionSpec None>]
>>> _parse_revision_str('..234')
[<RevisionSpec None>, <RevisionSpec_dwim 234>]
>>> _parse_revision_str('234..')
[<RevisionSpec_dwim 234>, <RevisionSpec None>]
>>> _parse_revision_str('234..456..789') # Maybe this should be an error
[<RevisionSpec_dwim 234>, <RevisionSpec_dwim 456>, <RevisionSpec_dwim 789>]
>>> _parse_revision_str('234....789') #Error ?
[<RevisionSpec_dwim 234>, <RevisionSpec None>, <RevisionSpec_dwim 789>]
>>> _parse_revision_str('revid:test@other.com-234234')
[<RevisionSpec_revid revid:test@other.com-234234>]
>>> _parse_revision_str('revid:test@other.com-234234..revid:test@other.com-234235')
[<RevisionSpec_revid revid:test@other.com-234234>, <RevisionSpec_revid revid:test@other.com-234235>]
>>> _parse_revision_str('revid:test@other.com-234234..23')
[<RevisionSpec_revid revid:test@other.com-234234>, <RevisionSpec_dwim 23>]
>>> _parse_revision_str('date:2005-04-12')
[<RevisionSpec_date date:2005-04-12>]
>>> _parse_revision_str('date:2005-04-12 12:24:33')
[<RevisionSpec_date date:2005-04-12 12:24:33>]
>>> _parse_revision_str('date:2005-04-12T12:24:33')
[<RevisionSpec_date date:2005-04-12T12:24:33>]
>>> _parse_revision_str('date:2005-04-12,12:24:33')
[<RevisionSpec_date date:2005-04-12,12:24:33>]
>>> _parse_revision_str('-5..23')
[<RevisionSpec_dwim -5>, <RevisionSpec_dwim 23>]
>>> _parse_revision_str('-5')
[<RevisionSpec_dwim -5>]
>>> _parse_revision_str('123a')
[<RevisionSpec_dwim 123a>]
>>> _parse_revision_str('abc')
[<RevisionSpec_dwim abc>]
>>> _parse_revision_str('branch:../branch2')
[<RevisionSpec_branch branch:../branch2>]
>>> _parse_revision_str('branch:../../branch2')
[<RevisionSpec_branch branch:../../branch2>]
>>> _parse_revision_str('branch:../../branch2..23')
[<RevisionSpec_branch branch:../../branch2>, <RevisionSpec_dwim 23>]
>>> _parse_revision_str('branch:..\\branch2')
[<RevisionSpec_branch branch:..\branch2>]
>>> _parse_revision_str('branch:..\\..\\branch2..23')
[<RevisionSpec_branch branch:..\..\branch2>, <RevisionSpec_dwim 23>]
def _parse_change_str(revstr):

Parse the revision string and return a tuple with left-most parent of the revision.

>>> _parse_change_str('123')
(<RevisionSpec_before before:123>, <RevisionSpec_dwim 123>)
>>> _parse_change_str('123..124')
Traceback (most recent call last):
  ...
RangeInChangeOption: Option --change does not accept revision ranges
def _parse_merge_type(typestring):
Undocumented
def get_merge_type(typestring):
Attempt to find the merge class/factory associated with a string.
def get_optparser(options):
Generate an optparse parser for bzrlib-style options
def custom_help(name, help):
Clone a common option overriding the help.
def _standard_option(name, **kwargs):
Register a standard option.
def _standard_list_option(name, **kwargs):
Register a standard option.
def _global_option(name, **kwargs):
Register a global option.
def _global_registry_option(name, help, registry=None, **kwargs):
Undocumented
def _verbosity_level_callback(option, opt_str, value, parser):
Undocumented
API Documentation for Bazaar, generated by pydoctor at 2017-11-18 00:17:16.