~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_options.py

  • Committer: Joe Julian
  • Date: 2010-01-10 02:25:31 UTC
  • mto: (4634.119.7 2.0)
  • mto: This revision was merged to the branch mainline in revision 4959.
  • Revision ID: joe@julianfamily.org-20100110022531-wqk61rsagz8xsiga
Added MANIFEST.in to allow bdist_rpm to have all the required include files and tools. bdist_rpm will still fail to build correctly on some distributions due to a disttools bug http://bugs.python.org/issue644744

Show diffs side-by-side

added added

removed removed

Lines of Context:
324
324
 
325
325
    def get_builtin_command_options(self):
326
326
        g = []
327
 
        for cmd_name, cmd_class in sorted(commands.get_all_cmds()):
328
 
            cmd = cmd_class()
 
327
        for cmd_name in sorted(commands.all_command_names()):
 
328
            cmd = commands.get_cmd_object(cmd_name)
329
329
            for opt_name, opt in sorted(cmd.options().items()):
330
330
                g.append((cmd_name, opt))
331
331
        return g
338
338
        g = dict(option.Option.OPTIONS.items())
339
339
        used_globals = {}
340
340
        msgs = []
341
 
        for cmd_name, cmd_class in sorted(commands.get_all_cmds()):
342
 
            for option_or_name in sorted(cmd_class.takes_options):
 
341
        for cmd_name in sorted(commands.all_command_names()):
 
342
            cmd = commands.get_cmd_object(cmd_name)
 
343
            for option_or_name in sorted(cmd.takes_options):
343
344
                if not isinstance(option_or_name, basestring):
344
345
                    self.assertIsInstance(option_or_name, option.Option)
345
346
                elif not option_or_name in g:
346
347
                    msgs.append("apparent reference to undefined "
347
348
                        "global option %r from %r"
348
 
                        % (option_or_name, cmd_class))
 
349
                        % (option_or_name, cmd))
349
350
                else:
350
351
                    used_globals.setdefault(option_or_name, []).append(cmd_name)
351
352
        unused_globals = set(g.keys()) - set(used_globals.keys())