Previously this logic checked only if topic was on top
of its relative branch. If it had no relative branch, it
always assumed the base is correct, which may not be true.
Update the logic for non-relative reviews to check if the remote
parent commit is an ancestor of the local base ref. If it is,
this indicates that the review should be a rebase. If it is not,
the base must have moved and the review needs to be pushed.
This will take a tiny bit more time to run for cases where the
ancestor check triggers (patch ids match but parent doesn't match
exactly).
Previously this logic checked only if topic was on top of its relative branch. If it had no relative branch, it always assumed the base is correct, which may not be true.
Update the logic for non-relative reviews to check if the remote parent commit is an ancestor of the local base ref. If it is, this indicates that the review should be a rebase. If it is not, the base must have moved and the review needs to be pushed.
This will take a tiny bit more time to run for cases where the ancestor check triggers (patch ids match but parent doesn't match exactly).
Topic: uploadbase Reviewers: brian-k