parameters: (commit)
return_statement: return None
docstring: Returns the closest master position for the specified Chromium commit.
docstring_summary: Returns the closest master position for the specified Chromium commit.
docstring_tokens: Returns the closest master position for the specified Chromium commit .
function: def get_chromium_master_position(commit):
    """ Returns the closest master position for the specified Chromium commit. """
    # Using -2 because a "Publish DEPS" commit which does not have a master
    # position may be first.
    cmd = "%s log -2 %s" % (git_exe, commit)
    result = exec_cmd(cmd, chromium_src_dir)
    if result['out'] != '':
      match = re.search(r'refs/heads/master@{#([\d]+)}', result['out'])
      assert match != None, 'Failed to find position'
      return int(match.groups()[0])
    return None
function_tokens: def get_chromium_master_position ( commit ) : # Using -2 because a "Publish DEPS" commit which does not have a master # position may be first. cmd = "%s log -2 %s" % ( git_exe , commit ) result = exec_cmd ( cmd , chromium_src_dir ) if result [ 'out' ] != '' : match = re . search ( r'refs/heads/master@{#([\d]+)}' , result [ 'out' ] ) assert match != None , 'Failed to find position' return int ( match . groups ( ) [ 0 ] ) return None