INNER CODE UNIT · Python
get_object_tags
mongodb/mongo-cxx-driver · etc/calc_release_version.py:266
def get_object_tags(): # type: () -> dict[str, list[str]]
"""
Obtain a mapping between commit hashes and a list of tags that point to
that commit. Untagged commits will not be included in the resulting map.
"""
ret = {} # type: dict[str, list[str]]
for obj, tagobj, tag in iter_tag_lines():
if obj:
ret.setdefault(obj, []).append(tag)
ret.setdefault(tagobj, []).append(tag)
return ret
def process_and_sort_tags(tags): # type: (list[str]) -> list[str]
"""
Given a string (as returned from get_branch_tags), return a sorted list of
zero or more tags (sorted based on the Version comparison) which meet
the following criteria: