git cl + git numberer: fix 3+ lineage ordering.
In other words, end 2 end test was a really awesome idea.
R=machenbach@chromium.org,sergiyb@chromium.org
BUG=642493
TEST=git cl land of https://codereview.chromium.org/2575043003 succeeded
Change-Id: I568ce79baf109b2aa556e4343527b63f39c10d00
Reviewed-on: https://chromium-review.googlesource.com/419478
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>
diff --git a/git_cl.py b/git_cl.py
index c13d6a6..8a2a8a1 100755
--- a/git_cl.py
+++ b/git_cl.py
@@ -3333,7 +3333,7 @@
parsed_footers[i] = (k.replace('Cr-', 'Cr-Original-'), v)
# Add Position and Lineage footers based on the parent.
- lineage = parent_footer_map.get('Cr-Branched-From', [])
+ lineage = list(reversed(parent_footer_map.get('Cr-Branched-From', [])))
if parent_position[0] == dest_ref:
# Same branch as parent.
number = int(parent_position[1]) + 1