cros_merge_to_branch uses git.MatchSingleBranchName(), which doesn't know how to handle when there are two similar branches, like this:
---
$ git ls-remote https://chromium.googlesource.com/chromiumos/third_party/kernel | grep factory-gru-8557.B-chromeos-4.4
b9eaded3931b945e91c92c82b40f0fdd8557cea2 refs/heads/factory-gru-8557.B-chromeos-4.4
21b77f965a6cc9fc95232b88f0c05dd239e41926 refs/heads/factory-gru-8557.B-chromeos-4.4-original
---
---
~/trunk/src/third_party/kernel/v4.4 $ cros_merge_to_branch 358134 358135 358136 actory-gru-8557.B-chromeos-4.4
08:24:40: NOTICE: Setting up dir /tmp/cros_merge_to_branch_Mb_Td/chromiumos/third_party/kernel for uploading changes to https://chromium-review.googlesource.com/chromiumos/third_party/kernel
08:29:17: WARNING: ############## SOME CHANGES FAILED TO UPLOAD ############
08:29:17: ERROR: Upload failed with Did not match exactly 1 branch: ['factory-gru-8557.B-chromeos-4.4', 'factory-gru-8557.B-chromeos-4.4-original']
08:29:17: ERROR: --nowipe not set thus deleting the work directory. If you wish to debug this, re-run the script with change(s) 358134 358135 358136 and --nowipe by running:
/mnt/host/source/chromite/bin/cros_merge_to_branch 358134 358135 358136 actory-gru-8557.B-chromeos-4.4 --nowipe
---
(Note: I may have left off the 'f' in 'factory'; but I don't think that changes the code path.)
I'm not sure what component chromite bugs should be filed under.
Comment 1 by dshi@chromium.org
, Jul 26 2016Labels: Hotlist-Fixit