/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/option.py

  • Committer: Gary van der Merwe
  • Date: 2010-05-05 08:18:32 UTC
  • mfrom: (5206 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5211.
  • Revision ID: garyvdm@gmail.com-20100505081832-ar75izyz4z37r425
Merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
276
276
        parser.add_option(action='callback',
277
277
                          callback=self._optparse_callback,
278
278
                          type='string', metavar=self.argname.upper(),
279
 
                          help=self.help, default=[],
 
279
                          help=self.help, dest=self._param_name, default=[],
280
280
                          *option_strings)
281
281
 
282
282
    def _optparse_callback(self, option, opt, value, parser):
364
364
        as values for the option, and their value is treated as the help.
365
365
        """
366
366
        reg = _mod_registry.Registry()
367
 
        for name, switch_help in kwargs.iteritems():
 
367
        for name, switch_help in sorted(kwargs.items()):
368
368
            name = name.replace('_', '-')
369
369
            reg.register(name, name, help=switch_help)
370
370
            if not value_switches:
570
570
_global_option('dry-run',
571
571
               help="Show what would be done, but don't actually do anything.")
572
572
_global_option('name-from-revision', help='The path name in the old tree.')
 
573
_global_option('directory', short_name='d', type=unicode,
 
574
               help='Branch to operate on, instead of working directory')
573
575
 
574
576
diff_writer_registry = _mod_registry.Registry()
575
577
diff_writer_registry.register('plain', lambda x: x, 'Plaintext diff output.')