parameters: (self, patch_directories=None)
return_statement: return scm_system
docstring: Return the default SCM object as determined by the CWD and running code.
  
          Returns the default SCM object for the current working directory; if the
          CWD is not in a checkout, then we attempt to figure out if the SCM module
          itself is part of a checkout, and return that one. If neither is part of
          a checkout, None is returned.
docstring_summary: Return the default SCM object as determined by the CWD and running code.
docstring_tokens: Return the default SCM object as determined by the CWD and running code .
function: def default_scm(self, patch_directories=None):
          """Return the default SCM object as determined by the CWD and running code.
  
          Returns the default SCM object for the current working directory; if the
          CWD is not in a checkout, then we attempt to figure out if the SCM module
          itself is part of a checkout, and return that one. If neither is part of
          a checkout, None is returned.
          """
          cwd = self._filesystem.getcwd()
          scm_system = self.detect_scm_system(cwd, patch_directories)
          if not scm_system:
              script_directory = self._filesystem.dirname(self._filesystem.path_to_module(self.__module__))
              scm_system = self.detect_scm_system(script_directory, patch_directories)
              if scm_system:
                  _log.info("The current directory (%s) is not a WebKit checkout, using %s" % (cwd, scm_system.checkout_root))
              else:
                  raise Exception("FATAL: Failed to determine the SCM system for either %s or %s" % (cwd, script_directory))
          return scm_system
function_tokens: def default_scm ( self , patch_directories = None ) : cwd = self . _filesystem . getcwd ( ) scm_system = self . detect_scm_system ( cwd , patch_directories ) if not scm_system : script_directory = self . _filesystem . dirname ( self . _filesystem . path_to_module ( self . __module__ ) ) scm_system = self . detect_scm_system ( script_directory , patch_directories ) if scm_system : _log . info ( "The current directory (%s) is not a WebKit checkout, using %s" % ( cwd , scm_system . checkout_root ) ) else : raise Exception ( "FATAL: Failed to determine the SCM system for either %s or %s" % ( cwd , script_directory ) ) return scm_system