parameters: (webrtc_deps, new_cr_deps)
return_statement: return sorted(result)
docstring: Calculate changed deps entries based on entries defined in the WebRTC DEPS
    file:
       - If a shared dependency with the Chromium DEPS file: roll it to the same
         revision as Chromium (i.e. entry in the new_cr_deps dict)
       - If it's a Chromium sub-directory, roll it to the HEAD revision (notice
         this means it may be ahead of the chromium_revision, but generally these
         should be close).
       - If it's another DEPS entry (not shared with Chromium), roll it to HEAD
         unless it's configured to be skipped.
  
    Returns:
      A list of ChangedDep objects representing the changed deps.
docstring_summary: Calculate changed deps entries based on entries defined in the WebRTC DEPS
    file:
       - If a shared dependency with the Chromium DEPS file: roll it to the same
         revision as Chromium (i.e. entry in the new_cr_deps dict)
       - If it's a Chromium sub-directory, roll it to the HEAD revision (notice
         this means it may be ahead of the chromium_revision, but generally these
         should be close).
       - If it's another DEPS entry (not shared with Chromium), roll it to HEAD
         unless it's configured to be skipped.
docstring_tokens: Calculate changed deps entries based on entries defined in the WebRTC DEPS file : - If a shared dependency with the Chromium DEPS file : roll it to the same revision as Chromium ( i . e . entry in the new_cr_deps dict ) - If it s a Chromium sub - directory roll it to the HEAD revision ( notice this means it may be ahead of the chromium_revision but generally these should be close ) . - If it s another DEPS entry ( not shared with Chromium ) roll it to HEAD unless it s configured to be skipped .
function: def CalculateChangedDeps(webrtc_deps, new_cr_deps):
    """
    Calculate changed deps entries based on entries defined in the WebRTC DEPS
    file:
       - If a shared dependency with the Chromium DEPS file: roll it to the same
         revision as Chromium (i.e. entry in the new_cr_deps dict)
       - If it's a Chromium sub-directory, roll it to the HEAD revision (notice
         this means it may be ahead of the chromium_revision, but generally these
         should be close).
       - If it's another DEPS entry (not shared with Chromium), roll it to HEAD
         unless it's configured to be skipped.
  
    Returns:
      A list of ChangedDep objects representing the changed deps.
    """
    result = []
    webrtc_entries = BuildDepsentryDict(webrtc_deps)
    new_cr_entries = BuildDepsentryDict(new_cr_deps)
    for path, webrtc_deps_entry in webrtc_entries.iteritems():
      if path in DONT_AUTOROLL_THESE:
        continue
      cr_deps_entry = new_cr_entries.get(path)
      if cr_deps_entry:
        # Use the revision from Chromium's DEPS file.
        new_rev = cr_deps_entry.revision
        assert webrtc_deps_entry.url == cr_deps_entry.url, (
          'WebRTC DEPS entry %s has a different URL (%s) than Chromium (%s).' %
          (path, webrtc_deps_entry.url, cr_deps_entry.url))
      else:
        # Use the HEAD of the deps repo.
        stdout, _ = _RunCommand(['git', 'ls-remote', webrtc_deps_entry.url,
                                 'HEAD'])
        new_rev = stdout.strip().split('\t')[0]
  
      # Check if an update is necessary.
      if webrtc_deps_entry.revision != new_rev:
        logging.debug('Roll dependency %s to %s', path, new_rev)
        result.append(ChangedDep(path, webrtc_deps_entry.url,
                                 webrtc_deps_entry.revision, new_rev))
    return sorted(result)
function_tokens: def CalculateChangedDeps ( webrtc_deps , new_cr_deps ) : result = [ ] webrtc_entries = BuildDepsentryDict ( webrtc_deps ) new_cr_entries = BuildDepsentryDict ( new_cr_deps ) for path , webrtc_deps_entry in webrtc_entries . iteritems ( ) : if path in DONT_AUTOROLL_THESE : continue cr_deps_entry = new_cr_entries . get ( path ) if cr_deps_entry : # Use the revision from Chromium's DEPS file. new_rev = cr_deps_entry . revision assert webrtc_deps_entry . url == cr_deps_entry . url , ( 'WebRTC DEPS entry %s has a different URL (%s) than Chromium (%s).' % ( path , webrtc_deps_entry . url , cr_deps_entry . url ) ) else : # Use the HEAD of the deps repo. stdout , _ = _RunCommand ( [ 'git' , 'ls-remote' , webrtc_deps_entry . url , 'HEAD' ] ) new_rev = stdout . strip ( ) . split ( '\t' ) [ 0 ] # Check if an update is necessary. if webrtc_deps_entry . revision != new_rev : logging . debug ( 'Roll dependency %s to %s' , path , new_rev ) result . append ( ChangedDep ( path , webrtc_deps_entry . url , webrtc_deps_entry . revision , new_rev ) ) return sorted ( result )