tools: repopick: Correctly order changeset
* Without key=int sorting is done in alphabetical order.
This cause 999 being picked after 1000.
Change-Id: I540f0e55093a33d80d78a0cf0c31dc83f7168279
diff --git a/build/tools/repopick.py b/build/tools/repopick.py
index 0132124..beda846 100755
--- a/build/tools/repopick.py
+++ b/build/tools/repopick.py
@@ -260,10 +260,10 @@
change_numbers = []
if args.topic:
reviews = fetch_query(args.gerrit, 'topic:{0}'.format(args.topic))
- change_numbers = sorted([str(r['number']) for r in reviews])
+ change_numbers = sorted([str(r['number']) for r in reviews], key=int)
if args.query:
reviews = fetch_query(args.gerrit, args.query)
- change_numbers = sorted([str(r['number']) for r in reviews])
+ change_numbers = sorted([str(r['number']) for r in reviews], key=int)
if args.change_number:
for c in args.change_number:
if '-' in c: