~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: Aaron Bentley
  • Date: 2007-09-14 14:13:14 UTC
  • mto: This revision was merged to the branch mainline in revision 2826.
  • Revision ID: abentley@panoramicfeedback.com-20070914141314-iypr5xj1vnjf1yqt
More updates from review

Show diffs side-by-side

added added

removed removed

Lines of Context:
4159
4159
 
4160
4160
 
4161
4161
class cmd_reconfigure(Command):
4162
 
    """Reconfigure the type of a bzr directory"""
 
4162
    """Reconfigure the type of a bzr directory.
 
4163
 
 
4164
    A target configuration must be specified.
 
4165
 
 
4166
    For checkouts, the bind-to location will be auto-detected if not specified.
 
4167
    The order of preference is
 
4168
    1. For a lightweight checkout, the current bound location.
 
4169
    2. For branches that used to be checkouts, the previously-bound location.
 
4170
    3. The push location.
 
4171
    4. The parent location.
 
4172
    If none of these is available, --bind-to must be specified.
 
4173
    """
4163
4174
 
4164
4175
    takes_args = ['location?']
4165
4176
    takes_options = [RegistryOption.from_kwargs('target_type',
4178
4189
 
4179
4190
    def run(self, location=None, target_type=None, bind_to=None, force=False):
4180
4191
        directory = bzrdir.BzrDir.open(location)
4181
 
        if target_type == 'branch':
 
4192
        if target_type is None:
 
4193
            raise BzrCommandError('No target configuration specified')
 
4194
        elif target_type == 'branch':
4182
4195
            reconfiguration = reconfigure.Reconfigure.to_branch(directory)
4183
4196
        elif target_type == 'tree':
4184
4197
            reconfiguration = reconfigure.Reconfigure.to_tree(directory)