in libmozevent/mercurial.py [0:0]
def get_base_identifier(self, needed_stack: list[PhabricatorPatch]) -> str:
"""Return the base identifier to apply patches against."""
if self.use_latest_revision:
# Use `tip` when `use_latest_revision` is `True`.
return "tip"
# Otherwise use the base/parent revision of first revision in the stack.
return needed_stack[0].base_revision