parameters: (deps_filename, old_cr_revision, new_cr_revision,
                     changed_deps)
docstring: Update the DEPS file with the new revision.
docstring_summary: Update the DEPS file with the new revision.
docstring_tokens: Update the DEPS file with the new revision .
function: def UpdateDepsFile(deps_filename, old_cr_revision, new_cr_revision,
                     changed_deps):
    """Update the DEPS file with the new revision."""
  
    # Update the chromium_revision variable.
    with open(deps_filename, 'rb') as deps_file:
      deps_content = deps_file.read()
    deps_content = deps_content.replace(old_cr_revision, new_cr_revision)
    with open(deps_filename, 'wb') as deps_file:
      deps_file.write(deps_content)
  
    # Update each individual DEPS entry.
    for dep in changed_deps:
      local_dep_dir = os.path.join(CHECKOUT_ROOT_DIR, dep.path)
      if not os.path.isdir(local_dep_dir):
        raise RollError(
            'Cannot find local directory %s. Either run\n'
            'gclient sync --deps=all\n'
            'or make sure the .gclient file for your solution contains all '
            'platforms in the target_os list, i.e.\n'
            'target_os = ["android", "unix", "mac", "ios", "win"];\n'
            'Then run "gclient sync" again.' % local_dep_dir)
      _, stderr = _RunCommand(
        ['roll-dep-svn', '--no-verify-revision', dep.path, dep.new_rev],
        working_dir=CHECKOUT_SRC_DIR, ignore_exit_code=True)
      if stderr:
        logging.warning('roll-dep-svn: %s', stderr)
function_tokens: def UpdateDepsFile ( deps_filename , old_cr_revision , new_cr_revision , changed_deps ) : # Update the chromium_revision variable. with open ( deps_filename , 'rb' ) as deps_file : deps_content = deps_file . read ( ) deps_content = deps_content . replace ( old_cr_revision , new_cr_revision ) with open ( deps_filename , 'wb' ) as deps_file : deps_file . write ( deps_content ) # Update each individual DEPS entry. for dep in changed_deps : local_dep_dir = os . path . join ( CHECKOUT_ROOT_DIR , dep . path ) if not os . path . isdir ( local_dep_dir ) : raise RollError ( 'Cannot find local directory %s. Either run\n' 'gclient sync --deps=all\n' 'or make sure the .gclient file for your solution contains all ' 'platforms in the target_os list, i.e.\n' 'target_os = ["android", "unix", "mac", "ios", "win"];\n' 'Then run "gclient sync" again.' % local_dep_dir ) _ , stderr = _RunCommand ( [ 'roll-dep-svn' , '--no-verify-revision' , dep . path , dep . new_rev ] , working_dir = CHECKOUT_SRC_DIR , ignore_exit_code = True ) if stderr : logging . warning ( 'roll-dep-svn: %s' , stderr )