The previous implementation, matching the old PatchSetAncestors implementation, did a breadth-first walk of descendants. When there are multiple parallel descendant branches, this tends to interleave the branches, which can produce somewhat confusing results. Use a depth-first walk to get slightly better behavior in more cases. Change-Id: I2e52d475db68fba0aeb10dc3bc37ff19f055a829