llvm_tools: Catch dup SHAs in get_upstream_patch

If a duplicate SHA is listed in get_upstream_patch.py,
we need to report this as an error and not do anything.

This commit adds this functionality, as well as
some structures to make adding this feature easier.

BUG=b:187795686
TEST=get_upstream_patch.py $args --sha $SHA --sha $SHA

Change-Id: I56f1159d5bdd34c52efc00e991b7f1333b7ba3f7
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3351166
Commit-Queue: Christopher Di Bella <cjdb@google.com>
Reviewed-by: Christopher Di Bella <cjdb@google.com>
Commit-Queue: Jordan Abrahams <ajordanr@google.com>
Tested-by: Jordan Abrahams <ajordanr@google.com>
1 file changed