old_contents: import logging
  import pkg_resources
  
  ENTRYPOINT = "chtulhubot.commands"
  
  from cthulhubot.commands.config import *
  from cthulhubot.commands.package import *
  from cthulhubot.commands.sleep import *
  from cthulhubot.commands.tests import *
  from cthulhubot.commands.vcs import *
  from cthulhubot.commands.version import *
  
  log = logging.getLogger("cthulhubot.commands")
  
  ADDITIONAL_COMMANDS = {}
  
  def get_core_commands():
      return dict([
          (globals()[candidate].identifier, globals()[candidate]) for candidate in globals().keys() if hasattr(globals()[candidate], 'identifier')
      ])
  
  
  def get_available_commands():
      commands = get_core_commands()
      
      # add setuptools-registered commands
      for dist in pkg_resources.working_set.iter_entry_points("cthulhubot.commands"):
          try:
              commands[dist.name] = dist.load()
          except ImportError, err:
              logging.error("Error while loading command %s: %s" % (dist.name, str(err)))
  
      # add "mocked" ADDITIONAL_COMMANDS
      commands.update(ADDITIONAL_COMMANDS)
  
      return commands
  
  def get_command(slug):
      commands = get_available_commands()
      if slug in commands:
          return commands[slug]
  
  def get_undiscovered_commands():
      """
      Return all commands not yet configured for usage (i.e. not in database).
      @return dict {'slug' : Command}
      """
      #FIXME: Circural dependency, domain vs. ORM object
      from cthulhubot.models import Command
      available = get_available_commands()
      configured = [cmd.slug for cmd in Command.objects.all()]
      return dict([
          (command, available[command]) for command in available
          if command not in configured
      ])
  
new_contents: import logging
  import pkg_resources
  
  ENTRYPOINT = "chtulhubot.commands"
  
  from cthulhubot.commands.build import *
  from cthulhubot.commands.config import *
  from cthulhubot.commands.package import *
  from cthulhubot.commands.sleep import *
  from cthulhubot.commands.tests import *
  from cthulhubot.commands.vcs import *
  from cthulhubot.commands.version import *
  
  log = logging.getLogger("cthulhubot.commands")
  
  ADDITIONAL_COMMANDS = {}
  
  def get_core_commands():
      return dict([
          (globals()[candidate].identifier, globals()[candidate]) for candidate in globals().keys() if hasattr(globals()[candidate], 'identifier')
      ])
  
  
  def get_available_commands():
      commands = get_core_commands()
      
      # add setuptools-registered commands
      for dist in pkg_resources.working_set.iter_entry_points("cthulhubot.commands"):
          try:
              commands[dist.name] = dist.load()
          except ImportError, err:
              logging.error("Error while loading command %s: %s" % (dist.name, str(err)))
  
      # add "mocked" ADDITIONAL_COMMANDS
      commands.update(ADDITIONAL_COMMANDS)
  
      return commands
  
  def get_command(slug):
      commands = get_available_commands()
      if slug in commands:
          return commands[slug]
  
  def get_undiscovered_commands():
      """
      Return all commands not yet configured for usage (i.e. not in database).
      @return dict {'slug' : Command}
      """
      #FIXME: Circural dependency, domain vs. ORM object
      from cthulhubot.models import Command
      available = get_available_commands()
      configured = [cmd.slug for cmd in Command.objects.all()]
      return dict([
          (command, available[command]) for command in available
          if command not in configured
      ])
  
subject: Build must be imported to be recognized