/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 bzrlib/builtins.py

  • Committer: Vincent Ladeuil
  • Date: 2009-02-16 16:43:54 UTC
  • mto: (4009.2.2 bzr.integration)
  • mto: This revision was merged to the branch mainline in revision 4011.
  • Revision ID: v.ladeuil+lp@free.fr-20090216164354-oq6wugejopvahynr
Fix indentation as per Aaron's review and then some.

* bzrlib/reconfigure.py:
(Reconfigure.set_repository_trees): Fix indentation.

* bzrlib/errors.py:
(AlreadyWithTrees, AlreadyWithNoTrees): Fix indentation.

* bzrlib/builtins.py:
(cmd_reconfigure): Reformat as last Options are lost in the
RegistryOption formatting.

Show diffs side-by-side

added added

removed removed

Lines of Context:
4980
4980
 
4981
4981
    _see_also = ['branches', 'checkouts', 'standalone-trees', 'working-trees']
4982
4982
    takes_args = ['location?']
4983
 
    takes_options = [RegistryOption.from_kwargs('target_type',
4984
 
                     title='Target type',
4985
 
                     help='The type to reconfigure the directory to.',
4986
 
                     value_switches=True, enum_switch=False,
4987
 
                     branch='Reconfigure to be an unbound branch '
4988
 
                        'with no working tree.',
4989
 
                     tree='Reconfigure to be an unbound branch '
4990
 
                        'with a working tree.',
4991
 
                     checkout='Reconfigure to be a bound branch '
4992
 
                        'with a working tree.',
4993
 
                     lightweight_checkout='Reconfigure to be a lightweight'
4994
 
                     ' checkout (with no local history).',
4995
 
                     standalone='Reconfigure to be a standalone branch '
4996
 
                        '(i.e. stop using shared repository).',
4997
 
                     use_shared='Reconfigure to use a shared repository.',
4998
 
                     with_trees='Reconfigure repository to create '
4999
 
                        'working trees on branches by default',
5000
 
                     with_no_trees='Reconfigure repository to not create '
5001
 
                        'working trees on branches by default'),
5002
 
                     Option('bind-to', help='Branch to bind checkout to.',
5003
 
                            type=str),
5004
 
                     Option('force',
5005
 
                        help='Perform reconfiguration even if local changes'
5006
 
                        ' will be lost.')
5007
 
                     ]
 
4983
    takes_options = [
 
4984
        RegistryOption.from_kwargs(
 
4985
            'target_type',
 
4986
            title='Target type',
 
4987
            help='The type to reconfigure the directory to.',
 
4988
            value_switches=True, enum_switch=False,
 
4989
            branch='Reconfigure to be an unbound branch with no working tree.',
 
4990
            tree='Reconfigure to be an unbound branch with a working tree.',
 
4991
            checkout='Reconfigure to be a bound branch with a working tree.',
 
4992
            lightweight_checkout='Reconfigure to be a lightweight'
 
4993
                ' checkout (with no local history).',
 
4994
            standalone='Reconfigure to be a standalone branch '
 
4995
                '(i.e. stop using shared repository).',
 
4996
            use_shared='Reconfigure to use a shared repository.',
 
4997
            with_trees='Reconfigure repository to create '
 
4998
                'working trees on branches by default.',
 
4999
            with_no_trees='Reconfigure repository to not create '
 
5000
                'working trees on branches by default.'
 
5001
            ),
 
5002
        Option('bind-to', help='Branch to bind checkout to.', type=str),
 
5003
        Option('force',
 
5004
               help='Perform reconfiguration even if local changes'
 
5005
               ' will be lost.')
 
5006
        ]
5008
5007
 
5009
5008
    def run(self, location=None, target_type=None, bind_to=None, force=False):
5010
5009
        directory = bzrdir.BzrDir.open(location)
5015
5014
        elif target_type == 'tree':
5016
5015
            reconfiguration = reconfigure.Reconfigure.to_tree(directory)
5017
5016
        elif target_type == 'checkout':
5018
 
            reconfiguration = reconfigure.Reconfigure.to_checkout(directory,
5019
 
                                                                  bind_to)
 
5017
            reconfiguration = reconfigure.Reconfigure.to_checkout(
 
5018
                directory, bind_to)
5020
5019
        elif target_type == 'lightweight-checkout':
5021
5020
            reconfiguration = reconfigure.Reconfigure.to_lightweight_checkout(
5022
5021
                directory, bind_to)