findmissing/missing: Handle duplicate upstream SHAs

In some situations the same commit is listed in the upstream kernel under
multiple SHAs. This is seen a lot with drm patches, presumably due to the
way merges are applied to the drm and/or i915 subsystem. This can result
in duplicate patch submissions. To avoid this, search the fixes database
for entries affecting the same branch which have the same patch ID but are
associated with a different upstream SHA. If found, do not create a new CL,
but mark associated upstream SHAs as duplicates.

Ignore MySQLdb import error (MySQLdb is imported in virtual environment)

BUG=None
TEST=No more duplicate submissions by patch robot

Change-Id: Ic7bd8442b3024e5a10ab455cfc9c01a2e879be11
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/dev-util/+/2279952
Reviewed-by: Curtis Malainey <cujomalainey@chromium.org>
Commit-Queue: Guenter Roeck <groeck@chromium.org>
Tested-by: Guenter Roeck <groeck@chromium.org>
1 file changed