Refactor adding message to source change in cherry pick
When a change is cherry picked from one branch to another resulting in
a new change, a message is added to the source change:
"This patch set was cherry picked to branch <name> as commit <sha1>"
Confusingly, this message is being added to the source change through
the ChangeInserter that is set up to insert the destination change. It
is being correctly added on the source change because the ChangeMessage
object stores the ID of the change to which the message belongs.
Refactor it so that the message is explicitly added to the source change,
rather than through the ChangeInserter for the destination change.
This is less efficient, as we now need instances of the change messages
utility and change update factory in the cherry pick, but it is rather
less confusing than before.
Change-Id: I49bd269969da61fb0a75fe9cbbdcd59016cb8a63
1 file changed