def is_conflict_free(path):
 rgx = re.compile(u'^(<<<<<<<|\\|\\|\\|\\|\\|\\|\\||>>>>>>>) ')
 try:
  with core.xopen(path, u'r') as f:
   for line in f:
    line = core.decode(line, errors=u'ignore')
    if rgx.match(line):
     if should_stage_conflicts(path):
      return True
     else:
      return False
 except IOError:
  pass
 return True

def is_conflict_free ( path ) : rgx = re . compile ( u'^(<<<<<<<|\\|\\|\\|\\|\\|\\|\\||>>>>>>>) ' ) try : with core . xopen ( path , u'r' ) as f : for line in f : line = core . decode ( line , errors = u'ignore' ) if rgx . match ( line ) : if should_stage_conflicts ( path ) : return True else : return False except IOError : pass return True
return true if path contains no conflict markers .