native_client_sdk/src/build_tools/build_version.py
def ParseCommitPosition(commit_position):
  '''Parse a Chrome commit position into its components.

  Given a commit position like:
    0178d4831bd36b5fb9ff477f03dc43b11626a6dc-refs/heads/main@{#292238}
  Returns:
    ("0178d4831bd36b5fb9ff477f03dc43b11626a6dc", "refs/heads/main", "292238")
  '''
  m = re.match(r'([0-9a-fA-F]+)(?:-([^@]+)@{#(\d+)})?', commit_position)
  if m:
    return m.groups()
  return None
Parse a Chrome commit position into its components.

  Given a commit position like:
    0178d4831bd36b5fb9ff477f03dc43b11626a6dc-refs/heads/main@{#292238}
  Returns:
    ("0178d4831bd36b5fb9ff477f03dc43b11626a6dc", "refs/heads/main", "292238")
  
Parse a Chrome commit position into its components.
Parse a Chrome commit position into its components .
def ParseCommitPosition(commit_position):
  m = re.match(r'([0-9a-fA-F]+)(?:-([^@]+)@{#(\d+)})?', commit_position)
  if m:
    return m.groups()
  return None
def ParseCommitPosition ( commit_position ) : m = re . match ( r'([0-9a-fA-F]+)(?:-([^@]+)@{#(\d+)})?' , commit_position ) if m : return m . groups ( ) return None
Parse a Chrome commit position into its components.
Parse a Chrome commit position into its components .
'''Parse a Chrome commit position into its components.

  Given a commit position like:
    0178d4831bd36b5fb9ff477f03dc43b11626a6dc-refs/heads/main@{#292238}
  Returns:
    ("0178d4831bd36b5fb9ff477f03dc43b11626a6dc", "refs/heads/main", "292238")
  '''
None
commit_position