def CommandNeedsSource(func):
    """Decorator @CommandNeedsSource annotates a command handler indicating
    that the command requires an up-to-date source checkout. This means that
    the builder host will check out the revision matching the request and
    perform a `gclient sync` if necessary along with preparing the build
    directory.

    Usage:
      @CommandNeedsSource
      def foo_Command():
        pass
        
    """
    vars(func)['needs_source'] = True
    return func