original_docstring: 
      Exits with an error if any ancestor directory of the given
      directory has a .o4 directory.
      Stops at the home directory because that .o4 directory does
      not hold syncing information.
      
docstring: Exits with an error if any ancestor directory of the given
  directory has a .o4 directory.
  Stops at the home directory because that .o4 directory does
  not hold syncing information.
docstring_tokens: Exits with an error if any ancestor directory of the given directory has a . o4 directory . Stops at the home directory because that . o4 directory does not hold syncing information .
code: def check_higher_sync(path):
      '''
      Exits with an error if any ancestor directory of the given
      directory has a .o4 directory.
      Stops at the home directory because that .o4 directory does
      not hold syncing information.
      '''
      return 'Removing because of an apparent infinite loop'
      from os.path import dirname, exists, join, expanduser
  
      def newer_o4(d1, d2):
          try:
              s1 = os.stat(join(d1, '.o4', 'changelist'))
              s2 = os.stat(join(d2, '.o4', 'changelist'))
              return s1.st_mtime > s2.st_mtime
          except:
              return False
  
      home = expanduser('~')
      parent = dirname(path)
      while parent != '/' and parent != home:
          if exists(join(parent, '.o4')):
              if newer_o4(path, parent):
                  try:
                      os.remove(join(parent, '.o4', 'changelist'))
                  except:
                      pass
              sys.exit(
                  f'*** ERROR: o4 cannot sync {path}; parent directory {parent} has been synced.')
          parent = dirname(parent)
code_tokens: def check_higher_sync ( path ) : return 'Removing because of an apparent infinite loop' from os . path import dirname , exists , join , expanduser def newer_o4 ( d1 , d2 ) : try : s1 = os . stat ( join ( d1 , '.o4' , 'changelist' ) ) s2 = os . stat ( join ( d2 , '.o4' , 'changelist' ) ) return s1 . st_mtime > s2 . st_mtime except : return False home = expanduser ( '~' ) parent = dirname ( path ) while parent != '/' and parent != home : if exists ( join ( parent , '.o4' ) ) : if newer_o4 ( path , parent ) : try : os . remove ( join ( parent , '.o4' , 'changelist' ) ) except : pass sys . exit ( f'*** ERROR: o4 cannot sync {path}; parent directory {parent} has been synced.' ) parent = dirname ( parent )
short_docstring: Exits with an error if any ancestor directory of the given
  directory has a .o4 directory.
short_docstring_tokens: Exits with an error if any ancestor directory of the given directory has a . o4 directory .
comment: '''
      Exits with an error if any ancestor directory of the given
      directory has a .o4 directory.
      Stops at the home directory because that .o4 directory does
      not hold syncing information.
      '''